diff --git a/tangle-subxt/metadata/tangle-testnet-runtime.scale b/tangle-subxt/metadata/tangle-testnet-runtime.scale index 88f5cdb6..60482482 100644 Binary files a/tangle-subxt/metadata/tangle-testnet-runtime.scale and b/tangle-subxt/metadata/tangle-testnet-runtime.scale differ diff --git a/tangle-subxt/src/tangle_testnet_runtime.rs b/tangle-subxt/src/tangle_testnet_runtime.rs index 8b137891..ebb8d111 100644 --- a/tangle-subxt/src/tangle_testnet_runtime.rs +++ b/tangle-subxt/src/tangle_testnet_runtime.rs @@ -1 +1,64518 @@ - +#[allow(dead_code, unused_imports, non_camel_case_types)] +#[allow(clippy::all)] +#[allow(rustdoc::broken_intra_doc_links)] +pub mod api { + #[allow(unused_imports)] + mod root_mod { + pub use super::*; + } + pub static PALLETS: [&str; 43usize] = [ + "System", + "Timestamp", + "Sudo", + "RandomnessCollectiveFlip", + "Assets", + "Balances", + "TransactionPayment", + "Authorship", + "Babe", + "Grandpa", + "Indices", + "Democracy", + "Council", + "Vesting", + "Elections", + "ElectionProviderMultiPhase", + "Staking", + "Session", + "Historical", + "Treasury", + "Bounties", + "ChildBounties", + "BagsList", + "NominationPools", + "Scheduler", + "Preimage", + "Offences", + "TxPause", + "ImOnline", + "Identity", + "Utility", + "Multisig", + "Ethereum", + "EVM", + "EVMChainId", + "DynamicFee", + "BaseFee", + "HotfixSufficients", + "Claims", + "Proxy", + "MultiAssetDelegation", + "Services", + "Lst", + ]; + pub static RUNTIME_APIS: [&str; 16usize] = [ + "Core", + "Metadata", + "BlockBuilder", + "ServicesApi", + "EthereumRuntimeRPCApi", + "ConvertTransactionRuntimeApi", + "TaggedTransactionQueue", + "OffchainWorkerApi", + "SessionKeys", + "BabeApi", + "AccountNonceApi", + "TransactionPaymentApi", + "GrandpaApi", + "DebugRuntimeApi", + "TxPoolRuntimeApi", + "GenesisBuilder", + ]; + #[doc = r" The error type returned when there is a runtime issue."] + pub type DispatchError = runtime_types::sp_runtime::DispatchError; + #[doc = r" The outer event enum."] + pub type Event = runtime_types::tangle_testnet_runtime::RuntimeEvent; + #[doc = r" The outer extrinsic enum."] + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + #[doc = r" The outer error enum representing the DispatchError's Module variant."] + pub type Error = runtime_types::tangle_testnet_runtime::RuntimeError; + pub fn constants() -> ConstantsApi { + ConstantsApi + } + pub fn storage() -> StorageApi { + StorageApi + } + pub fn tx() -> TransactionApi { + TransactionApi + } + pub fn apis() -> runtime_apis::RuntimeApi { + runtime_apis::RuntimeApi + } + pub mod runtime_apis { + use super::root_mod; + use super::runtime_types; + use ::subxt_core::ext::codec::Encode; + pub struct RuntimeApi; + impl RuntimeApi { + pub fn core(&self) -> core::Core { + core::Core + } + pub fn metadata(&self) -> metadata::Metadata { + metadata::Metadata + } + pub fn block_builder(&self) -> block_builder::BlockBuilder { + block_builder::BlockBuilder + } + pub fn services_api(&self) -> services_api::ServicesApi { + services_api::ServicesApi + } + pub fn ethereum_runtime_rpc_api( + &self, + ) -> ethereum_runtime_rpc_api::EthereumRuntimeRPCApi { + ethereum_runtime_rpc_api::EthereumRuntimeRPCApi + } + pub fn convert_transaction_runtime_api( + &self, + ) -> convert_transaction_runtime_api::ConvertTransactionRuntimeApi { + convert_transaction_runtime_api::ConvertTransactionRuntimeApi + } + pub fn tagged_transaction_queue( + &self, + ) -> tagged_transaction_queue::TaggedTransactionQueue { + tagged_transaction_queue::TaggedTransactionQueue + } + pub fn offchain_worker_api(&self) -> offchain_worker_api::OffchainWorkerApi { + offchain_worker_api::OffchainWorkerApi + } + pub fn session_keys(&self) -> session_keys::SessionKeys { + session_keys::SessionKeys + } + pub fn babe_api(&self) -> babe_api::BabeApi { + babe_api::BabeApi + } + pub fn account_nonce_api(&self) -> account_nonce_api::AccountNonceApi { + account_nonce_api::AccountNonceApi + } + pub fn transaction_payment_api( + &self, + ) -> transaction_payment_api::TransactionPaymentApi { + transaction_payment_api::TransactionPaymentApi + } + pub fn grandpa_api(&self) -> grandpa_api::GrandpaApi { + grandpa_api::GrandpaApi + } + pub fn debug_runtime_api(&self) -> debug_runtime_api::DebugRuntimeApi { + debug_runtime_api::DebugRuntimeApi + } + pub fn tx_pool_runtime_api(&self) -> tx_pool_runtime_api::TxPoolRuntimeApi { + tx_pool_runtime_api::TxPoolRuntimeApi + } + pub fn genesis_builder(&self) -> genesis_builder::GenesisBuilder { + genesis_builder::GenesisBuilder + } + } + pub mod core { + use super::root_mod; + use super::runtime_types; + #[doc = " The `Core` runtime api that every Substrate runtime needs to implement."] + pub struct Core; + impl Core { + #[doc = " Returns the version of the runtime."] + pub fn version( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Version, + types::version::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Core", + "version", + types::Version {}, + [ + 76u8, 202u8, 17u8, 117u8, 189u8, 237u8, 239u8, 237u8, 151u8, 17u8, + 125u8, 159u8, 218u8, 92u8, 57u8, 238u8, 64u8, 147u8, 40u8, 72u8, 157u8, + 116u8, 37u8, 195u8, 156u8, 27u8, 123u8, 173u8, 178u8, 102u8, 136u8, + 6u8, + ], + ) + } + #[doc = " Execute the given block."] + pub fn execute_block( + &self, + block: types::execute_block::Block, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ExecuteBlock, + types::execute_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Core", + "execute_block", + types::ExecuteBlock { block }, + [ + 200u8, 29u8, 171u8, 41u8, 8u8, 93u8, 153u8, 56u8, 180u8, 96u8, 155u8, + 206u8, 141u8, 20u8, 230u8, 221u8, 153u8, 233u8, 14u8, 55u8, 185u8, + 140u8, 67u8, 162u8, 154u8, 238u8, 212u8, 116u8, 230u8, 53u8, 155u8, + 231u8, + ], + ) + } + #[doc = " Initialize a block with the given header and return the runtime executive mode."] + pub fn initialize_block( + &self, + header: types::initialize_block::Header, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::InitializeBlock, + types::initialize_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Core", + "initialize_block", + types::InitializeBlock { header }, + [ + 132u8, 46u8, 150u8, 220u8, 71u8, 41u8, 12u8, 159u8, 48u8, 221u8, 178u8, + 85u8, 118u8, 128u8, 103u8, 26u8, 37u8, 71u8, 131u8, 152u8, 31u8, 248u8, + 74u8, 200u8, 212u8, 96u8, 88u8, 90u8, 102u8, 128u8, 148u8, 233u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod version { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_version::RuntimeVersion; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Version {} + pub mod execute_block { + use super::runtime_types; + pub type Block = runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u64 > , runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub mod output { + use super::runtime_types; + pub type Output = (); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ExecuteBlock { + pub block: execute_block::Block, + } + pub mod initialize_block { + use super::runtime_types; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u64>; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_runtime::ExtrinsicInclusionMode; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct InitializeBlock { + pub header: initialize_block::Header, + } + } + } + pub mod metadata { + use super::root_mod; + use super::runtime_types; + #[doc = " The `Metadata` api trait that returns metadata for the runtime."] + pub struct Metadata; + impl Metadata { + #[doc = " Returns the metadata of a runtime."] + pub fn metadata( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Metadata, + types::metadata::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Metadata", + "metadata", + types::Metadata {}, + [ + 231u8, 24u8, 67u8, 152u8, 23u8, 26u8, 188u8, 82u8, 229u8, 6u8, 185u8, + 27u8, 175u8, 68u8, 83u8, 122u8, 69u8, 89u8, 185u8, 74u8, 248u8, 87u8, + 217u8, 124u8, 193u8, 252u8, 199u8, 186u8, 196u8, 179u8, 179u8, 96u8, + ], + ) + } + #[doc = " Returns the metadata at a given version."] + #[doc = ""] + #[doc = " If the given `version` isn't supported, this will return `None`."] + #[doc = " Use [`Self::metadata_versions`] to find out about supported metadata version of the runtime."] + pub fn metadata_at_version( + &self, + version: types::metadata_at_version::Version, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::MetadataAtVersion, + types::metadata_at_version::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Metadata", + "metadata_at_version", + types::MetadataAtVersion { version }, + [ + 131u8, 53u8, 212u8, 234u8, 16u8, 25u8, 120u8, 252u8, 153u8, 153u8, + 216u8, 28u8, 54u8, 113u8, 52u8, 236u8, 146u8, 68u8, 142u8, 8u8, 10u8, + 169u8, 131u8, 142u8, 204u8, 38u8, 48u8, 108u8, 134u8, 86u8, 226u8, + 61u8, + ], + ) + } + #[doc = " Returns the supported metadata versions."] + #[doc = ""] + #[doc = " This can be used to call `metadata_at_version`."] + pub fn metadata_versions( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::MetadataVersions, + types::metadata_versions::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "Metadata", + "metadata_versions", + types::MetadataVersions {}, + [ + 23u8, 144u8, 137u8, 91u8, 188u8, 39u8, 231u8, 208u8, 252u8, 218u8, + 224u8, 176u8, 77u8, 32u8, 130u8, 212u8, 223u8, 76u8, 100u8, 190u8, + 82u8, 94u8, 190u8, 8u8, 82u8, 244u8, 225u8, 179u8, 85u8, 176u8, 56u8, + 16u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod metadata { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_core::OpaqueMetadata; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Metadata {} + pub mod metadata_at_version { + use super::runtime_types; + pub type Version = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::option::Option; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MetadataAtVersion { + pub version: metadata_at_version::Version, + } + pub mod metadata_versions { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MetadataVersions {} + } + } + pub mod block_builder { + use super::root_mod; + use super::runtime_types; + #[doc = " The `BlockBuilder` api trait that provides the required functionality for building a block."] + pub struct BlockBuilder; + impl BlockBuilder { + #[doc = " Apply the given extrinsic."] + #[doc = ""] + #[doc = " Returns an inclusion outcome which specifies if this extrinsic is included in"] + #[doc = " this block or not."] + pub fn apply_extrinsic( + &self, + extrinsic: types::apply_extrinsic::Extrinsic, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ApplyExtrinsic, + types::apply_extrinsic::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "apply_extrinsic", + types::ApplyExtrinsic { extrinsic }, + [ + 93u8, 122u8, 238u8, 143u8, 82u8, 1u8, 206u8, 107u8, 167u8, 31u8, 22u8, + 6u8, 113u8, 221u8, 141u8, 95u8, 189u8, 75u8, 186u8, 177u8, 5u8, 149u8, + 68u8, 91u8, 171u8, 82u8, 234u8, 147u8, 165u8, 141u8, 13u8, 254u8, + ], + ) + } + #[doc = " Finish the current block."] + pub fn finalize_block( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::FinalizeBlock, + types::finalize_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "finalize_block", + types::FinalizeBlock {}, + [ + 18u8, 71u8, 151u8, 202u8, 31u8, 14u8, 188u8, 81u8, 3u8, 98u8, 192u8, + 204u8, 115u8, 87u8, 31u8, 84u8, 252u8, 73u8, 190u8, 58u8, 146u8, 72u8, + 92u8, 230u8, 117u8, 127u8, 218u8, 10u8, 217u8, 123u8, 229u8, 71u8, + ], + ) + } + #[doc = " Generate inherent extrinsics. The inherent data will vary from chain to chain."] + pub fn inherent_extrinsics( + &self, + inherent: types::inherent_extrinsics::Inherent, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::InherentExtrinsics, + types::inherent_extrinsics::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "inherent_extrinsics", + types::InherentExtrinsics { inherent }, + [ + 38u8, 7u8, 22u8, 96u8, 164u8, 159u8, 19u8, 22u8, 13u8, 1u8, 194u8, + 99u8, 146u8, 217u8, 97u8, 235u8, 104u8, 166u8, 20u8, 158u8, 193u8, + 203u8, 97u8, 247u8, 30u8, 246u8, 196u8, 113u8, 166u8, 78u8, 194u8, + 163u8, + ], + ) + } + #[doc = " Check that the inherents are valid. The inherent data will vary from chain to chain."] + pub fn check_inherents( + &self, + block: types::check_inherents::Block, + data: types::check_inherents::Data, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CheckInherents, + types::check_inherents::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BlockBuilder", + "check_inherents", + types::CheckInherents { block, data }, + [ + 109u8, 92u8, 240u8, 167u8, 131u8, 93u8, 36u8, 22u8, 254u8, 199u8, 52u8, + 108u8, 74u8, 107u8, 80u8, 149u8, 246u8, 13u8, 17u8, 239u8, 214u8, 87u8, + 229u8, 197u8, 178u8, 25u8, 45u8, 234u8, 114u8, 222u8, 200u8, 72u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod apply_extrinsic { + use super::runtime_types; + pub type Extrinsic = runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > ; + pub mod output { + use super::runtime_types; + pub type Output = :: core :: result :: Result < :: core :: result :: Result < () , runtime_types :: sp_runtime :: DispatchError > , runtime_types :: sp_runtime :: transaction_validity :: TransactionValidityError > ; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ApplyExtrinsic { + pub extrinsic: apply_extrinsic::Extrinsic, + } + pub mod finalize_block { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u64, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct FinalizeBlock {} + pub mod inherent_extrinsics { + use super::runtime_types; + pub type Inherent = runtime_types::sp_inherents::InherentData; + pub mod output { + use super::runtime_types; + pub type Output = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct InherentExtrinsics { + pub inherent: inherent_extrinsics::Inherent, + } + pub mod check_inherents { + use super::runtime_types; + pub type Block = runtime_types :: sp_runtime :: generic :: block :: Block < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u64 > , runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub type Data = runtime_types::sp_inherents::InherentData; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_inherents::CheckInherentsResult; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckInherents { + pub block: check_inherents::Block, + pub data: check_inherents::Data, + } + } + } + pub mod services_api { + use super::root_mod; + use super::runtime_types; + pub struct ServicesApi; + impl ServicesApi { + #[doc = " Query all the services that this operator is providing along with their blueprints."] + #[doc = ""] + #[doc = " ## Arguments"] + #[doc = " - `operator`: The operator account id."] + #[doc = " ## Return"] + #[doc = " - [`RpcServicesWithBlueprint`]: A list of services with their blueprints."] + pub fn query_services_with_blueprints_by_operator( + &self, + operator: types::query_services_with_blueprints_by_operator::Operator, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::QueryServicesWithBlueprintsByOperator, + types::query_services_with_blueprints_by_operator::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "ServicesApi", + "query_services_with_blueprints_by_operator", + types::QueryServicesWithBlueprintsByOperator { operator }, + [ + 114u8, 198u8, 130u8, 220u8, 208u8, 27u8, 139u8, 174u8, 212u8, 204u8, + 214u8, 62u8, 40u8, 166u8, 131u8, 98u8, 221u8, 20u8, 19u8, 24u8, 40u8, + 253u8, 205u8, 213u8, 16u8, 236u8, 242u8, 255u8, 37u8, 130u8, 85u8, + 91u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod query_services_with_blueprints_by_operator { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub mod output { + use super::runtime_types; + pub type Output = :: core :: result :: Result < :: subxt_core :: alloc :: vec :: Vec < runtime_types :: tangle_primitives :: services :: RpcServicesWithBlueprint < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u64 , :: core :: primitive :: u128 > > , runtime_types :: sp_runtime :: DispatchError > ; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct QueryServicesWithBlueprintsByOperator { + pub operator: query_services_with_blueprints_by_operator::Operator, + } + } + } + pub mod ethereum_runtime_rpc_api { + use super::root_mod; + use super::runtime_types; + #[doc = " API necessary for Ethereum-compatibility layer."] + pub struct EthereumRuntimeRPCApi; + impl EthereumRuntimeRPCApi { + #[doc = " Returns runtime defined pallet_evm::ChainId."] + pub fn chain_id( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ChainId, + types::chain_id::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "chain_id", + types::ChainId {}, + [ + 119u8, 123u8, 11u8, 231u8, 92u8, 198u8, 90u8, 85u8, 52u8, 55u8, 105u8, + 101u8, 142u8, 11u8, 27u8, 201u8, 110u8, 228u8, 114u8, 128u8, 217u8, + 236u8, 146u8, 229u8, 7u8, 81u8, 102u8, 18u8, 115u8, 141u8, 216u8, + 164u8, + ], + ) + } + #[doc = " Returns pallet_evm::Accounts by address."] + pub fn account_basic( + &self, + address: types::account_basic::Address, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::AccountBasic, + types::account_basic::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "account_basic", + types::AccountBasic { address }, + [ + 253u8, 214u8, 163u8, 33u8, 163u8, 38u8, 64u8, 14u8, 118u8, 135u8, 77u8, + 215u8, 45u8, 161u8, 43u8, 40u8, 140u8, 131u8, 209u8, 187u8, 171u8, + 129u8, 42u8, 206u8, 175u8, 50u8, 208u8, 186u8, 216u8, 109u8, 166u8, + 123u8, + ], + ) + } + #[doc = " Returns FixedGasPrice::min_gas_price"] + pub fn gas_price( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GasPrice, + types::gas_price::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "gas_price", + types::GasPrice {}, + [ + 109u8, 203u8, 181u8, 107u8, 184u8, 171u8, 218u8, 171u8, 23u8, 235u8, + 214u8, 209u8, 233u8, 89u8, 99u8, 63u8, 16u8, 175u8, 44u8, 31u8, 241u8, + 122u8, 126u8, 146u8, 146u8, 131u8, 11u8, 84u8, 129u8, 203u8, 249u8, + 235u8, + ], + ) + } + #[doc = " For a given account address, returns pallet_evm::AccountCodes."] + pub fn account_code_at( + &self, + address: types::account_code_at::Address, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::AccountCodeAt, + types::account_code_at::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "account_code_at", + types::AccountCodeAt { address }, + [ + 140u8, 192u8, 250u8, 89u8, 84u8, 152u8, 124u8, 241u8, 255u8, 64u8, + 238u8, 86u8, 13u8, 46u8, 252u8, 66u8, 62u8, 109u8, 46u8, 229u8, 126u8, + 188u8, 64u8, 24u8, 75u8, 157u8, 217u8, 154u8, 102u8, 207u8, 181u8, + 254u8, + ], + ) + } + #[doc = " Returns the converted FindAuthor::find_author authority id."] + pub fn author( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Author, + types::author::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "author", + types::Author {}, + [ + 101u8, 105u8, 12u8, 234u8, 72u8, 53u8, 32u8, 56u8, 226u8, 189u8, 216u8, + 228u8, 196u8, 14u8, 147u8, 191u8, 144u8, 203u8, 195u8, 85u8, 162u8, + 67u8, 86u8, 196u8, 116u8, 129u8, 57u8, 102u8, 223u8, 129u8, 222u8, + 71u8, + ], + ) + } + #[doc = " For a given account address and index, returns pallet_evm::AccountStorages."] + pub fn storage_at( + &self, + address: types::storage_at::Address, + index: types::storage_at::Index, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::StorageAt, + types::storage_at::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "storage_at", + types::StorageAt { address, index }, + [ + 19u8, 29u8, 54u8, 70u8, 199u8, 223u8, 39u8, 4u8, 126u8, 126u8, 81u8, + 102u8, 223u8, 60u8, 2u8, 155u8, 60u8, 167u8, 0u8, 219u8, 98u8, 236u8, + 145u8, 115u8, 202u8, 87u8, 183u8, 131u8, 230u8, 189u8, 228u8, 91u8, + ], + ) + } + pub fn call( + &self, + from: types::call::From, + to: types::call::To, + data: types::call::Data, + value: types::call::Value, + gas_limit: types::call::GasLimit, + max_fee_per_gas: types::call::MaxFeePerGas, + max_priority_fee_per_gas: types::call::MaxPriorityFeePerGas, + nonce: types::call::Nonce, + estimate: types::call::Estimate, + access_list: types::call::AccessList, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Call, + types::call::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "call", + types::Call { + from, + to, + data, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + estimate, + access_list, + }, + [ + 42u8, 174u8, 110u8, 248u8, 167u8, 56u8, 238u8, 141u8, 64u8, 147u8, + 191u8, 107u8, 1u8, 132u8, 120u8, 22u8, 189u8, 52u8, 90u8, 121u8, 5u8, + 88u8, 147u8, 123u8, 53u8, 198u8, 212u8, 4u8, 141u8, 168u8, 56u8, 111u8, + ], + ) + } + pub fn create( + &self, + from: types::create::From, + data: types::create::Data, + value: types::create::Value, + gas_limit: types::create::GasLimit, + max_fee_per_gas: types::create::MaxFeePerGas, + max_priority_fee_per_gas: types::create::MaxPriorityFeePerGas, + nonce: types::create::Nonce, + estimate: types::create::Estimate, + access_list: types::create::AccessList, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Create, + types::create::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "create", + types::Create { + from, + data, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + estimate, + access_list, + }, + [ + 251u8, 141u8, 86u8, 140u8, 222u8, 79u8, 227u8, 54u8, 84u8, 205u8, 69u8, + 204u8, 211u8, 29u8, 110u8, 132u8, 59u8, 139u8, 181u8, 48u8, 7u8, 158u8, + 39u8, 175u8, 40u8, 230u8, 79u8, 254u8, 115u8, 179u8, 136u8, 120u8, + ], + ) + } + #[doc = " Return the current block."] + pub fn current_block( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentBlock, + types::current_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "current_block", + types::CurrentBlock {}, + [ + 223u8, 174u8, 72u8, 237u8, 254u8, 149u8, 89u8, 18u8, 134u8, 21u8, + 192u8, 75u8, 29u8, 248u8, 230u8, 130u8, 137u8, 203u8, 81u8, 96u8, + 179u8, 133u8, 232u8, 183u8, 62u8, 196u8, 175u8, 136u8, 181u8, 66u8, + 230u8, 115u8, + ], + ) + } + #[doc = " Return the current receipt."] + pub fn current_receipts( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentReceipts, + types::current_receipts::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "current_receipts", + types::CurrentReceipts {}, + [ + 174u8, 101u8, 240u8, 50u8, 204u8, 64u8, 207u8, 220u8, 200u8, 196u8, + 248u8, 93u8, 30u8, 53u8, 208u8, 184u8, 110u8, 47u8, 19u8, 200u8, 35u8, + 70u8, 26u8, 66u8, 181u8, 129u8, 237u8, 115u8, 81u8, 169u8, 213u8, + 137u8, + ], + ) + } + #[doc = " Return the current transaction status."] + pub fn current_transaction_statuses( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentTransactionStatuses, + types::current_transaction_statuses::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "current_transaction_statuses", + types::CurrentTransactionStatuses {}, + [ + 104u8, 186u8, 112u8, 255u8, 185u8, 24u8, 178u8, 204u8, 141u8, 184u8, + 235u8, 60u8, 152u8, 200u8, 223u8, 154u8, 105u8, 193u8, 211u8, 82u8, + 77u8, 157u8, 122u8, 36u8, 86u8, 224u8, 150u8, 32u8, 48u8, 176u8, 129u8, + 33u8, + ], + ) + } + pub fn current_all( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentAll, + types::current_all::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "current_all", + types::CurrentAll {}, + [ + 140u8, 52u8, 171u8, 209u8, 255u8, 183u8, 119u8, 234u8, 65u8, 156u8, + 128u8, 33u8, 217u8, 78u8, 181u8, 48u8, 162u8, 34u8, 92u8, 253u8, 132u8, + 67u8, 54u8, 1u8, 254u8, 44u8, 219u8, 112u8, 205u8, 2u8, 219u8, 225u8, + ], + ) + } + #[doc = " Receives a `Vec` and filters all the ethereum transactions."] + pub fn extrinsic_filter( + &self, + xts: types::extrinsic_filter::Xts, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ExtrinsicFilter, + types::extrinsic_filter::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "extrinsic_filter", + types::ExtrinsicFilter { xts }, + [ + 34u8, 199u8, 221u8, 81u8, 136u8, 126u8, 202u8, 122u8, 232u8, 184u8, + 41u8, 211u8, 199u8, 24u8, 250u8, 176u8, 199u8, 94u8, 233u8, 221u8, + 104u8, 94u8, 198u8, 52u8, 218u8, 125u8, 104u8, 91u8, 178u8, 133u8, + 195u8, 113u8, + ], + ) + } + #[doc = " Return the elasticity multiplier."] + pub fn elasticity( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Elasticity, + types::elasticity::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "elasticity", + types::Elasticity {}, + [ + 231u8, 129u8, 189u8, 25u8, 156u8, 180u8, 55u8, 76u8, 115u8, 115u8, + 97u8, 87u8, 113u8, 235u8, 49u8, 153u8, 82u8, 254u8, 238u8, 66u8, 99u8, + 243u8, 179u8, 91u8, 186u8, 122u8, 112u8, 79u8, 0u8, 240u8, 239u8, 97u8, + ], + ) + } + #[doc = " Used to determine if gas limit multiplier for non-transactional calls (eth_call/estimateGas)"] + #[doc = " is supported."] + pub fn gas_limit_multiplier_support( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GasLimitMultiplierSupport, + types::gas_limit_multiplier_support::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "gas_limit_multiplier_support", + types::GasLimitMultiplierSupport {}, + [ + 156u8, 34u8, 145u8, 114u8, 36u8, 174u8, 36u8, 65u8, 158u8, 45u8, 203u8, + 4u8, 160u8, 170u8, 43u8, 227u8, 204u8, 213u8, 197u8, 230u8, 190u8, + 119u8, 166u8, 243u8, 225u8, 138u8, 134u8, 169u8, 187u8, 95u8, 245u8, + 102u8, + ], + ) + } + #[doc = " Return the pending block."] + pub fn pending_block( + &self, + xts: types::pending_block::Xts, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::PendingBlock, + types::pending_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "pending_block", + types::PendingBlock { xts }, + [ + 173u8, 229u8, 156u8, 7u8, 102u8, 234u8, 114u8, 87u8, 242u8, 104u8, + 174u8, 57u8, 202u8, 118u8, 125u8, 215u8, 117u8, 85u8, 137u8, 215u8, + 13u8, 146u8, 45u8, 197u8, 223u8, 59u8, 146u8, 30u8, 14u8, 209u8, 45u8, + 198u8, + ], + ) + } + #[doc = " Initialize the pending block."] + #[doc = " The behavior should be the same as the runtime api Core_initialize_block but"] + #[doc = " for a \"pending\" block."] + #[doc = " If your project don't need to have a different behavior to initialize \"pending\" blocks,"] + #[doc = " you can copy your Core_initialize_block implementation."] + pub fn initialize_pending_block( + &self, + header: types::initialize_pending_block::Header, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::InitializePendingBlock, + types::initialize_pending_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "EthereumRuntimeRPCApi", + "initialize_pending_block", + types::InitializePendingBlock { header }, + [ + 144u8, 233u8, 136u8, 244u8, 126u8, 226u8, 84u8, 97u8, 226u8, 246u8, + 87u8, 230u8, 14u8, 68u8, 224u8, 56u8, 150u8, 179u8, 7u8, 2u8, 22u8, + 225u8, 163u8, 11u8, 106u8, 70u8, 200u8, 52u8, 217u8, 199u8, 253u8, + 227u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod chain_id { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u64; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ChainId {} + pub mod account_basic { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::evm::backend::Basic; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AccountBasic { + pub address: account_basic::Address, + } + pub mod gas_price { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::primitive_types::U256; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GasPrice {} + pub mod account_code_at { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AccountCodeAt { + pub address: account_code_at::Address, + } + pub mod author { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::utils::H160; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Author {} + pub mod storage_at { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + pub type Index = runtime_types::primitive_types::U256; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::utils::H256; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct StorageAt { + pub address: storage_at::Address, + pub index: storage_at::Index, + } + pub mod call { + use super::runtime_types; + pub type From = ::subxt_core::utils::H160; + pub type To = ::subxt_core::utils::H160; + pub type Data = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Value = runtime_types::primitive_types::U256; + pub type GasLimit = runtime_types::primitive_types::U256; + pub type MaxFeePerGas = + ::core::option::Option; + pub type MaxPriorityFeePerGas = + ::core::option::Option; + pub type Nonce = ::core::option::Option; + pub type Estimate = ::core::primitive::bool; + pub type AccessList = ::core::option::Option< + ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>, + >; + pub mod output { + use super::runtime_types; + pub type Output = ::core::result::Result< + runtime_types::fp_evm::ExecutionInfoV2< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + runtime_types::sp_runtime::DispatchError, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Call { + pub from: call::From, + pub to: call::To, + pub data: call::Data, + pub value: call::Value, + pub gas_limit: call::GasLimit, + pub max_fee_per_gas: call::MaxFeePerGas, + pub max_priority_fee_per_gas: call::MaxPriorityFeePerGas, + pub nonce: call::Nonce, + pub estimate: call::Estimate, + pub access_list: call::AccessList, + } + pub mod create { + use super::runtime_types; + pub type From = ::subxt_core::utils::H160; + pub type Data = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Value = runtime_types::primitive_types::U256; + pub type GasLimit = runtime_types::primitive_types::U256; + pub type MaxFeePerGas = + ::core::option::Option; + pub type MaxPriorityFeePerGas = + ::core::option::Option; + pub type Nonce = ::core::option::Option; + pub type Estimate = ::core::primitive::bool; + pub type AccessList = ::core::option::Option< + ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>, + >; + pub mod output { + use super::runtime_types; + pub type Output = ::core::result::Result< + runtime_types::fp_evm::ExecutionInfoV2<::subxt_core::utils::H160>, + runtime_types::sp_runtime::DispatchError, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Create { + pub from: create::From, + pub data: create::Data, + pub value: create::Value, + pub gas_limit: create::GasLimit, + pub max_fee_per_gas: create::MaxFeePerGas, + pub max_priority_fee_per_gas: create::MaxPriorityFeePerGas, + pub nonce: create::Nonce, + pub estimate: create::Estimate, + pub access_list: create::AccessList, + } + pub mod current_block { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + runtime_types::ethereum::block::Block< + runtime_types::ethereum::transaction::TransactionV2, + >, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentBlock {} + pub mod current_receipts { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::receipt::ReceiptV3, + >, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentReceipts {} + pub mod current_transaction_statuses { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + ::subxt_core::alloc::vec::Vec, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentTransactionStatuses {} + pub mod current_all { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ( + ::core::option::Option< + runtime_types::ethereum::block::Block< + runtime_types::ethereum::transaction::TransactionV2, + >, + >, + ::core::option::Option< + ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::receipt::ReceiptV3, + >, + >, + ::core::option::Option< + ::subxt_core::alloc::vec::Vec< + runtime_types::fp_rpc::TransactionStatus, + >, + >, + ); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentAll {} + pub mod extrinsic_filter { + use super::runtime_types; + pub type Xts = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::transaction::TransactionV2, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ExtrinsicFilter { + pub xts: extrinsic_filter::Xts, + } + pub mod elasticity { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + runtime_types::sp_arithmetic::per_things::Permill, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Elasticity {} + pub mod gas_limit_multiplier_support { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = (); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GasLimitMultiplierSupport {} + pub mod pending_block { + use super::runtime_types; + pub type Xts = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub mod output { + use super::runtime_types; + pub type Output = ( + ::core::option::Option< + runtime_types::ethereum::block::Block< + runtime_types::ethereum::transaction::TransactionV2, + >, + >, + ::core::option::Option< + ::subxt_core::alloc::vec::Vec< + runtime_types::fp_rpc::TransactionStatus, + >, + >, + ); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PendingBlock { + pub xts: pending_block::Xts, + } + pub mod initialize_pending_block { + use super::runtime_types; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u64>; + pub mod output { + use super::runtime_types; + pub type Output = (); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct InitializePendingBlock { + pub header: initialize_pending_block::Header, + } + } + } + pub mod convert_transaction_runtime_api { + use super::root_mod; + use super::runtime_types; + pub struct ConvertTransactionRuntimeApi; + impl ConvertTransactionRuntimeApi { + pub fn convert_transaction( + &self, + transaction: types::convert_transaction::Transaction, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ConvertTransaction, + types::convert_transaction::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "ConvertTransactionRuntimeApi", + "convert_transaction", + types::ConvertTransaction { transaction }, + [ + 38u8, 3u8, 65u8, 131u8, 104u8, 95u8, 86u8, 42u8, 177u8, 179u8, 245u8, + 253u8, 51u8, 174u8, 207u8, 232u8, 181u8, 68u8, 71u8, 91u8, 213u8, 63u8, + 48u8, 83u8, 142u8, 178u8, 236u8, 64u8, 185u8, 64u8, 188u8, 123u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod convert_transaction { + use super::runtime_types; + pub type Transaction = runtime_types::ethereum::transaction::TransactionV2; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > ; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ConvertTransaction { + pub transaction: convert_transaction::Transaction, + } + } + } + pub mod tagged_transaction_queue { + use super::root_mod; + use super::runtime_types; + #[doc = " The `TaggedTransactionQueue` api trait for interfering with the transaction queue."] + pub struct TaggedTransactionQueue; + impl TaggedTransactionQueue { + #[doc = " Validate the transaction."] + #[doc = ""] + #[doc = " This method is invoked by the transaction pool to learn details about given transaction."] + #[doc = " The implementation should make sure to verify the correctness of the transaction"] + #[doc = " against current state. The given `block_hash` corresponds to the hash of the block"] + #[doc = " that is used as current state."] + #[doc = ""] + #[doc = " Note that this call may be performed by the pool multiple times and transactions"] + #[doc = " might be verified in any possible order."] + pub fn validate_transaction( + &self, + source: types::validate_transaction::Source, + tx: types::validate_transaction::Tx, + block_hash: types::validate_transaction::BlockHash, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ValidateTransaction, + types::validate_transaction::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TaggedTransactionQueue", + "validate_transaction", + types::ValidateTransaction { source, tx, block_hash }, + [ + 57u8, 96u8, 17u8, 117u8, 142u8, 93u8, 131u8, 36u8, 26u8, 196u8, 204u8, + 140u8, 147u8, 186u8, 55u8, 141u8, 61u8, 41u8, 59u8, 202u8, 64u8, 185u8, + 138u8, 194u8, 64u8, 61u8, 128u8, 199u8, 19u8, 92u8, 119u8, 187u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod validate_transaction { + use super::runtime_types; + pub type Source = + runtime_types::sp_runtime::transaction_validity::TransactionSource; + pub type Tx = runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > ; + pub type BlockHash = ::subxt_core::utils::H256; + pub mod output { + use super::runtime_types; + pub type Output = :: core :: result :: Result < runtime_types :: sp_runtime :: transaction_validity :: ValidTransaction , runtime_types :: sp_runtime :: transaction_validity :: TransactionValidityError > ; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ValidateTransaction { + pub source: validate_transaction::Source, + pub tx: validate_transaction::Tx, + pub block_hash: validate_transaction::BlockHash, + } + } + } + pub mod offchain_worker_api { + use super::root_mod; + use super::runtime_types; + #[doc = " The offchain worker api."] + pub struct OffchainWorkerApi; + impl OffchainWorkerApi { + #[doc = " Starts the off-chain task for given block header."] + pub fn offchain_worker( + &self, + header: types::offchain_worker::Header, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::OffchainWorker, + types::offchain_worker::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "OffchainWorkerApi", + "offchain_worker", + types::OffchainWorker { header }, + [ + 223u8, 18u8, 78u8, 135u8, 230u8, 162u8, 39u8, 207u8, 100u8, 84u8, + 208u8, 18u8, 251u8, 169u8, 80u8, 26u8, 84u8, 234u8, 10u8, 126u8, 74u8, + 213u8, 12u8, 184u8, 157u8, 15u8, 209u8, 44u8, 49u8, 99u8, 233u8, 111u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod offchain_worker { + use super::runtime_types; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u64>; + pub mod output { + use super::runtime_types; + pub type Output = (); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OffchainWorker { + pub header: offchain_worker::Header, + } + } + } + pub mod session_keys { + use super::root_mod; + use super::runtime_types; + #[doc = " Session keys runtime api."] + pub struct SessionKeys; + impl SessionKeys { + #[doc = " Generate a set of session keys with optionally using the given seed."] + #[doc = " The keys should be stored within the keystore exposed via runtime"] + #[doc = " externalities."] + #[doc = ""] + #[doc = " The seed needs to be a valid `utf8` string."] + #[doc = ""] + #[doc = " Returns the concatenated SCALE encoded public keys."] + pub fn generate_session_keys( + &self, + seed: types::generate_session_keys::Seed, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GenerateSessionKeys, + types::generate_session_keys::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "SessionKeys", + "generate_session_keys", + types::GenerateSessionKeys { seed }, + [ + 96u8, 171u8, 164u8, 166u8, 175u8, 102u8, 101u8, 47u8, 133u8, 95u8, + 102u8, 202u8, 83u8, 26u8, 238u8, 47u8, 126u8, 132u8, 22u8, 11u8, 33u8, + 190u8, 175u8, 94u8, 58u8, 245u8, 46u8, 80u8, 195u8, 184u8, 107u8, 65u8, + ], + ) + } + #[doc = " Decode the given public session keys."] + #[doc = ""] + #[doc = " Returns the list of public raw public keys + key type."] + pub fn decode_session_keys( + &self, + encoded: types::decode_session_keys::Encoded, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::DecodeSessionKeys, + types::decode_session_keys::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "SessionKeys", + "decode_session_keys", + types::DecodeSessionKeys { encoded }, + [ + 57u8, 242u8, 18u8, 51u8, 132u8, 110u8, 238u8, 255u8, 39u8, 194u8, 8u8, + 54u8, 198u8, 178u8, 75u8, 151u8, 148u8, 176u8, 144u8, 197u8, 87u8, + 29u8, 179u8, 235u8, 176u8, 78u8, 252u8, 103u8, 72u8, 203u8, 151u8, + 248u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod generate_session_keys { + use super::runtime_types; + pub type Seed = ::core::option::Option< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GenerateSessionKeys { + pub seed: generate_session_keys::Seed, + } + pub mod decode_session_keys { + use super::runtime_types; + pub type Encoded = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + ::subxt_core::alloc::vec::Vec<( + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + runtime_types::sp_core::crypto::KeyTypeId, + )>, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct DecodeSessionKeys { + pub encoded: decode_session_keys::Encoded, + } + } + } + pub mod babe_api { + use super::root_mod; + use super::runtime_types; + #[doc = " API necessary for block authorship with BABE."] + pub struct BabeApi; + impl BabeApi { + #[doc = " Return the configuration for BABE."] + pub fn configuration( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::Configuration, + types::configuration::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BabeApi", + "configuration", + types::Configuration {}, + [ + 50u8, 198u8, 27u8, 26u8, 92u8, 199u8, 8u8, 181u8, 12u8, 199u8, 116u8, + 247u8, 95u8, 70u8, 241u8, 24u8, 14u8, 250u8, 179u8, 77u8, 251u8, 55u8, + 133u8, 8u8, 142u8, 107u8, 6u8, 214u8, 228u8, 38u8, 134u8, 153u8, + ], + ) + } + #[doc = " Returns the slot that started the current epoch."] + pub fn current_epoch_start( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentEpochStart, + types::current_epoch_start::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BabeApi", + "current_epoch_start", + types::CurrentEpochStart {}, + [ + 122u8, 125u8, 246u8, 170u8, 27u8, 50u8, 128u8, 137u8, 228u8, 62u8, + 145u8, 64u8, 65u8, 119u8, 166u8, 237u8, 115u8, 92u8, 125u8, 124u8, + 11u8, 33u8, 96u8, 88u8, 88u8, 122u8, 141u8, 137u8, 58u8, 182u8, 148u8, + 170u8, + ], + ) + } + #[doc = " Returns information regarding the current epoch."] + pub fn current_epoch( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentEpoch, + types::current_epoch::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BabeApi", + "current_epoch", + types::CurrentEpoch {}, + [ + 70u8, 68u8, 222u8, 110u8, 96u8, 143u8, 126u8, 136u8, 182u8, 163u8, + 104u8, 122u8, 21u8, 156u8, 6u8, 26u8, 86u8, 145u8, 153u8, 133u8, 251u8, + 137u8, 238u8, 218u8, 132u8, 218u8, 222u8, 140u8, 190u8, 232u8, 197u8, + 86u8, + ], + ) + } + #[doc = " Returns information regarding the next epoch (which was already"] + #[doc = " previously announced)."] + pub fn next_epoch( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::NextEpoch, + types::next_epoch::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BabeApi", + "next_epoch", + types::NextEpoch {}, + [ + 141u8, 86u8, 122u8, 185u8, 215u8, 255u8, 142u8, 131u8, 8u8, 178u8, + 143u8, 200u8, 148u8, 84u8, 174u8, 215u8, 91u8, 251u8, 243u8, 155u8, + 92u8, 13u8, 44u8, 53u8, 128u8, 26u8, 165u8, 172u8, 49u8, 33u8, 130u8, + 148u8, + ], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " current epoch. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `slot` as parameter the current"] + #[doc = " implementations ignores this parameter and instead relies on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the epoch for the given slot is live on-chain. Future"] + #[doc = " implementations will instead use indexed data through an offchain"] + #[doc = " worker, not requiring older states to be available."] + pub fn generate_key_ownership_proof( + &self, + slot: types::generate_key_ownership_proof::Slot, + authority_id: types::generate_key_ownership_proof::AuthorityId, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GenerateKeyOwnershipProof, + types::generate_key_ownership_proof::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BabeApi", + "generate_key_ownership_proof", + types::GenerateKeyOwnershipProof { slot, authority_id }, + [ + 13u8, 228u8, 75u8, 150u8, 203u8, 132u8, 82u8, 188u8, 17u8, 70u8, 169u8, + 19u8, 102u8, 96u8, 217u8, 209u8, 215u8, 196u8, 78u8, 141u8, 12u8, 14u8, + 151u8, 65u8, 173u8, 2u8, 100u8, 150u8, 18u8, 99u8, 19u8, 196u8, + ], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof : types :: submit_report_equivocation_unsigned_extrinsic :: EquivocationProof, + key_owner_proof : types :: submit_report_equivocation_unsigned_extrinsic :: KeyOwnerProof, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::SubmitReportEquivocationUnsignedExtrinsic, + types::submit_report_equivocation_unsigned_extrinsic::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "BabeApi", + "submit_report_equivocation_unsigned_extrinsic", + types::SubmitReportEquivocationUnsignedExtrinsic { + equivocation_proof, + key_owner_proof, + }, + [ + 120u8, 243u8, 43u8, 91u8, 247u8, 63u8, 254u8, 169u8, 33u8, 156u8, + 172u8, 212u8, 12u8, 220u8, 253u8, 97u8, 120u8, 194u8, 179u8, 138u8, + 142u8, 93u8, 29u8, 42u8, 62u8, 244u8, 200u8, 214u8, 225u8, 75u8, 251u8, + 100u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod configuration { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_consensus_babe::BabeConfiguration; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Configuration {} + pub mod current_epoch_start { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_consensus_slots::Slot; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentEpochStart {} + pub mod current_epoch { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_consensus_babe::Epoch; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentEpoch {} + pub mod next_epoch { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::sp_consensus_babe::Epoch; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct NextEpoch {} + pub mod generate_key_ownership_proof { + use super::runtime_types; + pub type Slot = runtime_types::sp_consensus_slots::Slot; + pub type AuthorityId = runtime_types::sp_consensus_babe::app::Public; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GenerateKeyOwnershipProof { + pub slot: generate_key_ownership_proof::Slot, + pub authority_id: generate_key_ownership_proof::AuthorityId, + } + pub mod submit_report_equivocation_unsigned_extrinsic { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u64, + >, + runtime_types::sp_consensus_babe::app::Public, + >; + pub type KeyOwnerProof = + runtime_types::sp_consensus_babe::OpaqueKeyOwnershipProof; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option<()>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SubmitReportEquivocationUnsignedExtrinsic { + pub equivocation_proof: + submit_report_equivocation_unsigned_extrinsic::EquivocationProof, + pub key_owner_proof: + submit_report_equivocation_unsigned_extrinsic::KeyOwnerProof, + } + } + } + pub mod account_nonce_api { + use super::root_mod; + use super::runtime_types; + #[doc = " The API to query account nonce."] + pub struct AccountNonceApi; + impl AccountNonceApi { + #[doc = " Get current account nonce of given `AccountId`."] + pub fn account_nonce( + &self, + account: types::account_nonce::Account, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::AccountNonce, + types::account_nonce::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "AccountNonceApi", + "account_nonce", + types::AccountNonce { account }, + [ + 231u8, 82u8, 7u8, 227u8, 131u8, 2u8, 215u8, 252u8, 173u8, 82u8, 11u8, + 103u8, 200u8, 25u8, 114u8, 116u8, 79u8, 229u8, 152u8, 150u8, 236u8, + 37u8, 101u8, 26u8, 220u8, 146u8, 182u8, 101u8, 73u8, 55u8, 191u8, + 171u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod account_nonce { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u32; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AccountNonce { + pub account: account_nonce::Account, + } + } + } + pub mod transaction_payment_api { + use super::root_mod; + use super::runtime_types; + pub struct TransactionPaymentApi; + impl TransactionPaymentApi { + pub fn query_info( + &self, + uxt: types::query_info::Uxt, + len: types::query_info::Len, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::QueryInfo, + types::query_info::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_info", + types::QueryInfo { uxt, len }, + [ + 18u8, 21u8, 49u8, 170u8, 31u8, 239u8, 200u8, 100u8, 31u8, 197u8, 68u8, + 91u8, 138u8, 180u8, 24u8, 255u8, 153u8, 200u8, 167u8, 148u8, 66u8, + 89u8, 215u8, 13u8, 119u8, 183u8, 48u8, 15u8, 187u8, 50u8, 226u8, 111u8, + ], + ) + } + pub fn query_fee_details( + &self, + uxt: types::query_fee_details::Uxt, + len: types::query_fee_details::Len, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::QueryFeeDetails, + types::query_fee_details::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_fee_details", + types::QueryFeeDetails { uxt, len }, + [ + 244u8, 136u8, 121u8, 182u8, 139u8, 54u8, 166u8, 70u8, 32u8, 165u8, + 61u8, 193u8, 186u8, 109u8, 2u8, 165u8, 42u8, 11u8, 113u8, 159u8, 21u8, + 62u8, 14u8, 60u8, 212u8, 124u8, 63u8, 118u8, 183u8, 92u8, 186u8, 52u8, + ], + ) + } + pub fn query_weight_to_fee( + &self, + weight: types::query_weight_to_fee::Weight, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::QueryWeightToFee, + types::query_weight_to_fee::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_weight_to_fee", + types::QueryWeightToFee { weight }, + [ + 206u8, 243u8, 189u8, 83u8, 231u8, 244u8, 247u8, 52u8, 126u8, 208u8, + 224u8, 5u8, 163u8, 108u8, 254u8, 114u8, 214u8, 156u8, 227u8, 217u8, + 211u8, 198u8, 121u8, 164u8, 110u8, 54u8, 181u8, 146u8, 50u8, 146u8, + 146u8, 23u8, + ], + ) + } + pub fn query_length_to_fee( + &self, + length: types::query_length_to_fee::Length, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::QueryLengthToFee, + types::query_length_to_fee::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TransactionPaymentApi", + "query_length_to_fee", + types::QueryLengthToFee { length }, + [ + 92u8, 132u8, 29u8, 119u8, 66u8, 11u8, 196u8, 224u8, 129u8, 23u8, 249u8, + 12u8, 32u8, 28u8, 92u8, 50u8, 188u8, 101u8, 203u8, 229u8, 248u8, 216u8, + 130u8, 150u8, 212u8, 161u8, 81u8, 254u8, 116u8, 89u8, 162u8, 48u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod query_info { + use super::runtime_types; + pub type Uxt = runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > ; + pub type Len = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + runtime_types::pallet_transaction_payment::types::RuntimeDispatchInfo< + ::core::primitive::u128, + runtime_types::sp_weights::weight_v2::Weight, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct QueryInfo { + pub uxt: query_info::Uxt, + pub len: query_info::Len, + } + pub mod query_fee_details { + use super::runtime_types; + pub type Uxt = runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > ; + pub type Len = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = + runtime_types::pallet_transaction_payment::types::FeeDetails< + ::core::primitive::u128, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct QueryFeeDetails { + pub uxt: query_fee_details::Uxt, + pub len: query_fee_details::Len, + } + pub mod query_weight_to_fee { + use super::runtime_types; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u128; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct QueryWeightToFee { + pub weight: query_weight_to_fee::Weight, + } + pub mod query_length_to_fee { + use super::runtime_types; + pub type Length = ::core::primitive::u32; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u128; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct QueryLengthToFee { + pub length: query_length_to_fee::Length, + } + } + } + pub mod grandpa_api { + use super::root_mod; + use super::runtime_types; + #[doc = " APIs for integrating the GRANDPA finality gadget into runtimes."] + #[doc = " This should be implemented on the runtime side."] + #[doc = ""] + #[doc = " This is primarily used for negotiating authority-set changes for the"] + #[doc = " gadget. GRANDPA uses a signaling model of changing authority sets:"] + #[doc = " changes should be signaled with a delay of N blocks, and then automatically"] + #[doc = " applied in the runtime after those N blocks have passed."] + #[doc = ""] + #[doc = " The consensus protocol will coordinate the handoff externally."] + pub struct GrandpaApi; + impl GrandpaApi { + #[doc = " Get the current GRANDPA authorities and weights. This should not change except"] + #[doc = " for when changes are scheduled and the corresponding delay has passed."] + #[doc = ""] + #[doc = " When called at block B, it will return the set of authorities that should be"] + #[doc = " used to finalize descendants of this block (B+1, B+2, ...). The block B itself"] + #[doc = " is finalized by the authorities from block B-1."] + pub fn grandpa_authorities( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GrandpaAuthorities, + types::grandpa_authorities::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GrandpaApi", + "grandpa_authorities", + types::GrandpaAuthorities {}, + [ + 8u8, 1u8, 99u8, 227u8, 52u8, 95u8, 230u8, 139u8, 198u8, 90u8, 159u8, + 146u8, 193u8, 81u8, 37u8, 27u8, 216u8, 227u8, 108u8, 126u8, 12u8, 94u8, + 125u8, 183u8, 143u8, 231u8, 87u8, 101u8, 114u8, 190u8, 193u8, 180u8, + ], + ) + } + #[doc = " Submits an unsigned extrinsic to report an equivocation. The caller"] + #[doc = " must provide the equivocation proof and a key ownership proof"] + #[doc = " (should be obtained using `generate_key_ownership_proof`). The"] + #[doc = " extrinsic will be unsigned and should only be accepted for local"] + #[doc = " authorship (not to be broadcast to the network). This method returns"] + #[doc = " `None` when creation of the extrinsic fails, e.g. if equivocation"] + #[doc = " reporting is disabled for the given runtime (i.e. this method is"] + #[doc = " hardcoded to return `None`). Only useful in an offchain context."] + pub fn submit_report_equivocation_unsigned_extrinsic( + &self, + equivocation_proof : types :: submit_report_equivocation_unsigned_extrinsic :: EquivocationProof, + key_owner_proof : types :: submit_report_equivocation_unsigned_extrinsic :: KeyOwnerProof, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::SubmitReportEquivocationUnsignedExtrinsic, + types::submit_report_equivocation_unsigned_extrinsic::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GrandpaApi", + "submit_report_equivocation_unsigned_extrinsic", + types::SubmitReportEquivocationUnsignedExtrinsic { + equivocation_proof, + key_owner_proof, + }, + [ + 10u8, 132u8, 153u8, 51u8, 160u8, 214u8, 104u8, 202u8, 222u8, 228u8, + 239u8, 137u8, 95u8, 172u8, 67u8, 215u8, 218u8, 182u8, 254u8, 220u8, + 118u8, 155u8, 242u8, 115u8, 182u8, 222u8, 244u8, 122u8, 175u8, 115u8, + 180u8, 115u8, + ], + ) + } + #[doc = " Generates a proof of key ownership for the given authority in the"] + #[doc = " given set. An example usage of this module is coupled with the"] + #[doc = " session historical module to prove that a given authority key is"] + #[doc = " tied to a given staking identity during a specific session. Proofs"] + #[doc = " of key ownership are necessary for submitting equivocation reports."] + #[doc = " NOTE: even though the API takes a `set_id` as parameter the current"] + #[doc = " implementations ignore this parameter and instead rely on this"] + #[doc = " method being called at the correct block height, i.e. any point at"] + #[doc = " which the given set id is live on-chain. Future implementations will"] + #[doc = " instead use indexed data through an offchain worker, not requiring"] + #[doc = " older states to be available."] + pub fn generate_key_ownership_proof( + &self, + set_id: types::generate_key_ownership_proof::SetId, + authority_id: types::generate_key_ownership_proof::AuthorityId, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GenerateKeyOwnershipProof, + types::generate_key_ownership_proof::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GrandpaApi", + "generate_key_ownership_proof", + types::GenerateKeyOwnershipProof { set_id, authority_id }, + [ + 13u8, 144u8, 66u8, 235u8, 24u8, 190u8, 39u8, 75u8, 29u8, 157u8, 215u8, + 181u8, 173u8, 145u8, 224u8, 244u8, 189u8, 79u8, 6u8, 116u8, 139u8, + 196u8, 54u8, 16u8, 89u8, 190u8, 121u8, 43u8, 137u8, 150u8, 117u8, 68u8, + ], + ) + } + #[doc = " Get current GRANDPA authority set id."] + pub fn current_set_id( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::CurrentSetId, + types::current_set_id::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GrandpaApi", + "current_set_id", + types::CurrentSetId {}, + [ + 42u8, 230u8, 120u8, 211u8, 156u8, 245u8, 109u8, 86u8, 100u8, 146u8, + 234u8, 205u8, 41u8, 183u8, 109u8, 42u8, 17u8, 33u8, 156u8, 25u8, 139u8, + 84u8, 101u8, 75u8, 232u8, 198u8, 87u8, 136u8, 218u8, 233u8, 103u8, + 156u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod grandpa_authorities { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::subxt_core::alloc::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GrandpaAuthorities {} + pub mod submit_report_equivocation_unsigned_extrinsic { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt_core::utils::H256, + ::core::primitive::u64, + >; + pub type KeyOwnerProof = runtime_types::sp_runtime::OpaqueValue; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option<()>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SubmitReportEquivocationUnsignedExtrinsic { + pub equivocation_proof: + submit_report_equivocation_unsigned_extrinsic::EquivocationProof, + pub key_owner_proof: + submit_report_equivocation_unsigned_extrinsic::KeyOwnerProof, + } + pub mod generate_key_ownership_proof { + use super::runtime_types; + pub type SetId = ::core::primitive::u64; + pub type AuthorityId = runtime_types::sp_consensus_grandpa::app::Public; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::option::Option; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GenerateKeyOwnershipProof { + pub set_id: generate_key_ownership_proof::SetId, + pub authority_id: generate_key_ownership_proof::AuthorityId, + } + pub mod current_set_id { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = ::core::primitive::u64; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CurrentSetId {} + } + } + pub mod debug_runtime_api { + use super::root_mod; + use super::runtime_types; + pub struct DebugRuntimeApi; + impl DebugRuntimeApi { + pub fn trace_transaction( + &self, + extrinsics: types::trace_transaction::Extrinsics, + transaction: types::trace_transaction::Transaction, + header: types::trace_transaction::Header, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::TraceTransaction, + types::trace_transaction::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "DebugRuntimeApi", + "trace_transaction", + types::TraceTransaction { extrinsics, transaction, header }, + [ + 66u8, 154u8, 238u8, 22u8, 63u8, 217u8, 55u8, 236u8, 121u8, 124u8, 89u8, + 238u8, 141u8, 160u8, 127u8, 66u8, 63u8, 199u8, 130u8, 45u8, 38u8, + 168u8, 83u8, 192u8, 225u8, 139u8, 208u8, 81u8, 59u8, 149u8, 237u8, + 145u8, + ], + ) + } + pub fn trace_block( + &self, + extrinsics: types::trace_block::Extrinsics, + known_transactions: types::trace_block::KnownTransactions, + header: types::trace_block::Header, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::TraceBlock, + types::trace_block::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "DebugRuntimeApi", + "trace_block", + types::TraceBlock { extrinsics, known_transactions, header }, + [ + 88u8, 179u8, 165u8, 231u8, 224u8, 94u8, 42u8, 195u8, 68u8, 120u8, + 222u8, 66u8, 244u8, 167u8, 18u8, 117u8, 139u8, 77u8, 50u8, 237u8, + 118u8, 80u8, 53u8, 151u8, 108u8, 137u8, 229u8, 77u8, 110u8, 86u8, + 160u8, 167u8, + ], + ) + } + pub fn trace_call( + &self, + header: types::trace_call::Header, + from: types::trace_call::From, + to: types::trace_call::To, + data: types::trace_call::Data, + value: types::trace_call::Value, + gas_limit: types::trace_call::GasLimit, + max_fee_per_gas: types::trace_call::MaxFeePerGas, + max_priority_fee_per_gas: types::trace_call::MaxPriorityFeePerGas, + nonce: types::trace_call::Nonce, + access_list: types::trace_call::AccessList, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::TraceCall, + types::trace_call::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "DebugRuntimeApi", + "trace_call", + types::TraceCall { + header, + from, + to, + data, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + access_list, + }, + [ + 199u8, 191u8, 21u8, 6u8, 30u8, 112u8, 60u8, 71u8, 62u8, 191u8, 87u8, + 120u8, 135u8, 117u8, 21u8, 151u8, 74u8, 79u8, 220u8, 240u8, 250u8, + 149u8, 32u8, 96u8, 65u8, 174u8, 191u8, 184u8, 24u8, 152u8, 56u8, 218u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod trace_transaction { + use super::runtime_types; + pub type Extrinsics = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub type Transaction = runtime_types::ethereum::transaction::TransactionV2; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u64>; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TraceTransaction { + pub extrinsics: trace_transaction::Extrinsics, + pub transaction: trace_transaction::Transaction, + pub header: trace_transaction::Header, + } + pub mod trace_block { + use super::runtime_types; + pub type Extrinsics = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub type KnownTransactions = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u64>; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TraceBlock { + pub extrinsics: trace_block::Extrinsics, + pub known_transactions: trace_block::KnownTransactions, + pub header: trace_block::Header, + } + pub mod trace_call { + use super::runtime_types; + pub type Header = + runtime_types::sp_runtime::generic::header::Header<::core::primitive::u64>; + pub type From = ::subxt_core::utils::H160; + pub type To = ::subxt_core::utils::H160; + pub type Data = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Value = runtime_types::primitive_types::U256; + pub type GasLimit = runtime_types::primitive_types::U256; + pub type MaxFeePerGas = + ::core::option::Option; + pub type MaxPriorityFeePerGas = + ::core::option::Option; + pub type Nonce = ::core::option::Option; + pub type AccessList = ::core::option::Option< + ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>, + >; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TraceCall { + pub header: trace_call::Header, + pub from: trace_call::From, + pub to: trace_call::To, + pub data: trace_call::Data, + pub value: trace_call::Value, + pub gas_limit: trace_call::GasLimit, + pub max_fee_per_gas: trace_call::MaxFeePerGas, + pub max_priority_fee_per_gas: trace_call::MaxPriorityFeePerGas, + pub nonce: trace_call::Nonce, + pub access_list: trace_call::AccessList, + } + } + } + pub mod tx_pool_runtime_api { + use super::root_mod; + use super::runtime_types; + pub struct TxPoolRuntimeApi; + impl TxPoolRuntimeApi { + pub fn extrinsic_filter( + &self, + xt_ready: types::extrinsic_filter::XtReady, + xt_future: types::extrinsic_filter::XtFuture, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::ExtrinsicFilter, + types::extrinsic_filter::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "TxPoolRuntimeApi", + "extrinsic_filter", + types::ExtrinsicFilter { xt_ready, xt_future }, + [ + 134u8, 154u8, 125u8, 22u8, 74u8, 169u8, 248u8, 124u8, 232u8, 73u8, + 189u8, 109u8, 48u8, 207u8, 50u8, 60u8, 91u8, 154u8, 214u8, 247u8, 26u8, + 71u8, 174u8, 96u8, 248u8, 6u8, 145u8, 202u8, 130u8, 220u8, 66u8, 127u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod extrinsic_filter { + use super::runtime_types; + pub type XtReady = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub type XtFuture = :: subxt_core :: alloc :: vec :: Vec < runtime_types :: fp_self_contained :: unchecked_extrinsic :: UncheckedExtrinsic < :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , runtime_types :: tangle_testnet_runtime :: RuntimeCall , runtime_types :: sp_runtime :: MultiSignature , (runtime_types :: frame_system :: extensions :: check_non_zero_sender :: CheckNonZeroSender , runtime_types :: frame_system :: extensions :: check_spec_version :: CheckSpecVersion , runtime_types :: frame_system :: extensions :: check_tx_version :: CheckTxVersion , runtime_types :: frame_system :: extensions :: check_genesis :: CheckGenesis , runtime_types :: frame_system :: extensions :: check_mortality :: CheckMortality , runtime_types :: frame_system :: extensions :: check_nonce :: CheckNonce , runtime_types :: frame_system :: extensions :: check_weight :: CheckWeight , runtime_types :: pallet_transaction_payment :: ChargeTransactionPayment , runtime_types :: frame_metadata_hash_extension :: CheckMetadataHash ,) > > ; + pub mod output { + use super::runtime_types; + pub type Output = runtime_types::rpc_primitives_txpool::TxPoolResponse; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ExtrinsicFilter { + pub xt_ready: extrinsic_filter::XtReady, + pub xt_future: extrinsic_filter::XtFuture, + } + } + } + pub mod genesis_builder { + use super::root_mod; + use super::runtime_types; + #[doc = " API to interact with RuntimeGenesisConfig for the runtime"] + pub struct GenesisBuilder; + impl GenesisBuilder { + #[doc = " Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the"] + #[doc = " storage."] + #[doc = ""] + #[doc = " In the case of a FRAME-based runtime, this function deserializes the full `RuntimeGenesisConfig` from the given JSON blob and"] + #[doc = " puts it into the storage. If the provided JSON blob is incorrect or incomplete or the"] + #[doc = " deserialization fails, an error is returned."] + #[doc = ""] + #[doc = " Please note that provided JSON blob must contain all `RuntimeGenesisConfig` fields, no"] + #[doc = " defaults will be used."] + pub fn build_state( + &self, + json: types::build_state::Json, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::BuildState, + types::build_state::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GenesisBuilder", + "build_state", + types::BuildState { json }, + [ + 203u8, 233u8, 104u8, 116u8, 111u8, 131u8, 201u8, 235u8, 117u8, 116u8, + 140u8, 185u8, 93u8, 25u8, 155u8, 210u8, 56u8, 49u8, 23u8, 32u8, 253u8, + 92u8, 149u8, 241u8, 85u8, 245u8, 137u8, 45u8, 209u8, 189u8, 81u8, 2u8, + ], + ) + } + #[doc = " Returns a JSON blob representation of the built-in `RuntimeGenesisConfig` identified by"] + #[doc = " `id`."] + #[doc = ""] + #[doc = " If `id` is `None` the function returns JSON blob representation of the default"] + #[doc = " `RuntimeGenesisConfig` struct of the runtime. Implementation must provide default"] + #[doc = " `RuntimeGenesisConfig`."] + #[doc = ""] + #[doc = " Otherwise function returns a JSON representation of the built-in, named"] + #[doc = " `RuntimeGenesisConfig` preset identified by `id`, or `None` if such preset does not"] + #[doc = " exists. Returned `Vec` contains bytes of JSON blob (patch) which comprises a list of"] + #[doc = " (potentially nested) key-value pairs that are intended for customizing the default"] + #[doc = " runtime genesis config. The patch shall be merged (rfc7386) with the JSON representation"] + #[doc = " of the default `RuntimeGenesisConfig` to create a comprehensive genesis config that can"] + #[doc = " be used in `build_state` method."] + pub fn get_preset( + &self, + id: types::get_preset::Id, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::GetPreset, + types::get_preset::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GenesisBuilder", + "get_preset", + types::GetPreset { id }, + [ + 43u8, 153u8, 23u8, 52u8, 113u8, 161u8, 227u8, 122u8, 169u8, 135u8, + 119u8, 8u8, 128u8, 33u8, 143u8, 235u8, 13u8, 173u8, 58u8, 121u8, 178u8, + 223u8, 66u8, 217u8, 22u8, 244u8, 168u8, 113u8, 202u8, 186u8, 241u8, + 124u8, + ], + ) + } + #[doc = " Returns a list of identifiers for available builtin `RuntimeGenesisConfig` presets."] + #[doc = ""] + #[doc = " The presets from the list can be queried with [`GenesisBuilder::get_preset`] method. If"] + #[doc = " no named presets are provided by the runtime the list is empty."] + pub fn preset_names( + &self, + ) -> ::subxt_core::runtime_api::payload::StaticPayload< + types::PresetNames, + types::preset_names::output::Output, + > { + ::subxt_core::runtime_api::payload::StaticPayload::new_static( + "GenesisBuilder", + "preset_names", + types::PresetNames {}, + [ + 150u8, 117u8, 54u8, 129u8, 221u8, 130u8, 186u8, 71u8, 13u8, 140u8, + 77u8, 180u8, 141u8, 37u8, 22u8, 219u8, 149u8, 218u8, 186u8, 206u8, + 80u8, 42u8, 165u8, 41u8, 99u8, 184u8, 73u8, 37u8, 125u8, 188u8, 167u8, + 122u8, + ], + ) + } + } + pub mod types { + use super::runtime_types; + pub mod build_state { + use super::runtime_types; + pub type Json = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub mod output { + use super::runtime_types; + pub type Output = + ::core::result::Result<(), ::subxt_core::alloc::string::String>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BuildState { + pub json: build_state::Json, + } + pub mod get_preset { + use super::runtime_types; + pub type Id = ::core::option::Option<::subxt_core::alloc::string::String>; + pub mod output { + use super::runtime_types; + pub type Output = ::core::option::Option< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GetPreset { + pub id: get_preset::Id, + } + pub mod preset_names { + use super::runtime_types; + pub mod output { + use super::runtime_types; + pub type Output = + ::subxt_core::alloc::vec::Vec<::subxt_core::alloc::string::String>; + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PresetNames {} + } + } + } + pub fn custom() -> CustomValuesApi { + CustomValuesApi + } + pub struct CustomValuesApi; + impl CustomValuesApi {} + pub struct ConstantsApi; + impl ConstantsApi { + pub fn system(&self) -> system::constants::ConstantsApi { + system::constants::ConstantsApi + } + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { + timestamp::constants::ConstantsApi + } + pub fn assets(&self) -> assets::constants::ConstantsApi { + assets::constants::ConstantsApi + } + pub fn balances(&self) -> balances::constants::ConstantsApi { + balances::constants::ConstantsApi + } + pub fn transaction_payment(&self) -> transaction_payment::constants::ConstantsApi { + transaction_payment::constants::ConstantsApi + } + pub fn babe(&self) -> babe::constants::ConstantsApi { + babe::constants::ConstantsApi + } + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { + grandpa::constants::ConstantsApi + } + pub fn indices(&self) -> indices::constants::ConstantsApi { + indices::constants::ConstantsApi + } + pub fn democracy(&self) -> democracy::constants::ConstantsApi { + democracy::constants::ConstantsApi + } + pub fn council(&self) -> council::constants::ConstantsApi { + council::constants::ConstantsApi + } + pub fn vesting(&self) -> vesting::constants::ConstantsApi { + vesting::constants::ConstantsApi + } + pub fn elections(&self) -> elections::constants::ConstantsApi { + elections::constants::ConstantsApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::constants::ConstantsApi { + election_provider_multi_phase::constants::ConstantsApi + } + pub fn staking(&self) -> staking::constants::ConstantsApi { + staking::constants::ConstantsApi + } + pub fn treasury(&self) -> treasury::constants::ConstantsApi { + treasury::constants::ConstantsApi + } + pub fn bounties(&self) -> bounties::constants::ConstantsApi { + bounties::constants::ConstantsApi + } + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { + child_bounties::constants::ConstantsApi + } + pub fn bags_list(&self) -> bags_list::constants::ConstantsApi { + bags_list::constants::ConstantsApi + } + pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { + nomination_pools::constants::ConstantsApi + } + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { + scheduler::constants::ConstantsApi + } + pub fn tx_pause(&self) -> tx_pause::constants::ConstantsApi { + tx_pause::constants::ConstantsApi + } + pub fn im_online(&self) -> im_online::constants::ConstantsApi { + im_online::constants::ConstantsApi + } + pub fn identity(&self) -> identity::constants::ConstantsApi { + identity::constants::ConstantsApi + } + pub fn utility(&self) -> utility::constants::ConstantsApi { + utility::constants::ConstantsApi + } + pub fn multisig(&self) -> multisig::constants::ConstantsApi { + multisig::constants::ConstantsApi + } + pub fn claims(&self) -> claims::constants::ConstantsApi { + claims::constants::ConstantsApi + } + pub fn proxy(&self) -> proxy::constants::ConstantsApi { + proxy::constants::ConstantsApi + } + pub fn multi_asset_delegation(&self) -> multi_asset_delegation::constants::ConstantsApi { + multi_asset_delegation::constants::ConstantsApi + } + pub fn services(&self) -> services::constants::ConstantsApi { + services::constants::ConstantsApi + } + pub fn lst(&self) -> lst::constants::ConstantsApi { + lst::constants::ConstantsApi + } + } + pub struct StorageApi; + impl StorageApi { + pub fn system(&self) -> system::storage::StorageApi { + system::storage::StorageApi + } + pub fn timestamp(&self) -> timestamp::storage::StorageApi { + timestamp::storage::StorageApi + } + pub fn sudo(&self) -> sudo::storage::StorageApi { + sudo::storage::StorageApi + } + pub fn randomness_collective_flip( + &self, + ) -> randomness_collective_flip::storage::StorageApi { + randomness_collective_flip::storage::StorageApi + } + pub fn assets(&self) -> assets::storage::StorageApi { + assets::storage::StorageApi + } + pub fn balances(&self) -> balances::storage::StorageApi { + balances::storage::StorageApi + } + pub fn transaction_payment(&self) -> transaction_payment::storage::StorageApi { + transaction_payment::storage::StorageApi + } + pub fn authorship(&self) -> authorship::storage::StorageApi { + authorship::storage::StorageApi + } + pub fn babe(&self) -> babe::storage::StorageApi { + babe::storage::StorageApi + } + pub fn grandpa(&self) -> grandpa::storage::StorageApi { + grandpa::storage::StorageApi + } + pub fn indices(&self) -> indices::storage::StorageApi { + indices::storage::StorageApi + } + pub fn democracy(&self) -> democracy::storage::StorageApi { + democracy::storage::StorageApi + } + pub fn council(&self) -> council::storage::StorageApi { + council::storage::StorageApi + } + pub fn vesting(&self) -> vesting::storage::StorageApi { + vesting::storage::StorageApi + } + pub fn elections(&self) -> elections::storage::StorageApi { + elections::storage::StorageApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::storage::StorageApi { + election_provider_multi_phase::storage::StorageApi + } + pub fn staking(&self) -> staking::storage::StorageApi { + staking::storage::StorageApi + } + pub fn session(&self) -> session::storage::StorageApi { + session::storage::StorageApi + } + pub fn historical(&self) -> historical::storage::StorageApi { + historical::storage::StorageApi + } + pub fn treasury(&self) -> treasury::storage::StorageApi { + treasury::storage::StorageApi + } + pub fn bounties(&self) -> bounties::storage::StorageApi { + bounties::storage::StorageApi + } + pub fn child_bounties(&self) -> child_bounties::storage::StorageApi { + child_bounties::storage::StorageApi + } + pub fn bags_list(&self) -> bags_list::storage::StorageApi { + bags_list::storage::StorageApi + } + pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi { + nomination_pools::storage::StorageApi + } + pub fn scheduler(&self) -> scheduler::storage::StorageApi { + scheduler::storage::StorageApi + } + pub fn preimage(&self) -> preimage::storage::StorageApi { + preimage::storage::StorageApi + } + pub fn offences(&self) -> offences::storage::StorageApi { + offences::storage::StorageApi + } + pub fn tx_pause(&self) -> tx_pause::storage::StorageApi { + tx_pause::storage::StorageApi + } + pub fn im_online(&self) -> im_online::storage::StorageApi { + im_online::storage::StorageApi + } + pub fn identity(&self) -> identity::storage::StorageApi { + identity::storage::StorageApi + } + pub fn multisig(&self) -> multisig::storage::StorageApi { + multisig::storage::StorageApi + } + pub fn ethereum(&self) -> ethereum::storage::StorageApi { + ethereum::storage::StorageApi + } + pub fn evm(&self) -> evm::storage::StorageApi { + evm::storage::StorageApi + } + pub fn evm_chain_id(&self) -> evm_chain_id::storage::StorageApi { + evm_chain_id::storage::StorageApi + } + pub fn dynamic_fee(&self) -> dynamic_fee::storage::StorageApi { + dynamic_fee::storage::StorageApi + } + pub fn base_fee(&self) -> base_fee::storage::StorageApi { + base_fee::storage::StorageApi + } + pub fn claims(&self) -> claims::storage::StorageApi { + claims::storage::StorageApi + } + pub fn proxy(&self) -> proxy::storage::StorageApi { + proxy::storage::StorageApi + } + pub fn multi_asset_delegation(&self) -> multi_asset_delegation::storage::StorageApi { + multi_asset_delegation::storage::StorageApi + } + pub fn services(&self) -> services::storage::StorageApi { + services::storage::StorageApi + } + pub fn lst(&self) -> lst::storage::StorageApi { + lst::storage::StorageApi + } + } + pub struct TransactionApi; + impl TransactionApi { + pub fn system(&self) -> system::calls::TransactionApi { + system::calls::TransactionApi + } + pub fn timestamp(&self) -> timestamp::calls::TransactionApi { + timestamp::calls::TransactionApi + } + pub fn sudo(&self) -> sudo::calls::TransactionApi { + sudo::calls::TransactionApi + } + pub fn assets(&self) -> assets::calls::TransactionApi { + assets::calls::TransactionApi + } + pub fn balances(&self) -> balances::calls::TransactionApi { + balances::calls::TransactionApi + } + pub fn babe(&self) -> babe::calls::TransactionApi { + babe::calls::TransactionApi + } + pub fn grandpa(&self) -> grandpa::calls::TransactionApi { + grandpa::calls::TransactionApi + } + pub fn indices(&self) -> indices::calls::TransactionApi { + indices::calls::TransactionApi + } + pub fn democracy(&self) -> democracy::calls::TransactionApi { + democracy::calls::TransactionApi + } + pub fn council(&self) -> council::calls::TransactionApi { + council::calls::TransactionApi + } + pub fn vesting(&self) -> vesting::calls::TransactionApi { + vesting::calls::TransactionApi + } + pub fn elections(&self) -> elections::calls::TransactionApi { + elections::calls::TransactionApi + } + pub fn election_provider_multi_phase( + &self, + ) -> election_provider_multi_phase::calls::TransactionApi { + election_provider_multi_phase::calls::TransactionApi + } + pub fn staking(&self) -> staking::calls::TransactionApi { + staking::calls::TransactionApi + } + pub fn session(&self) -> session::calls::TransactionApi { + session::calls::TransactionApi + } + pub fn treasury(&self) -> treasury::calls::TransactionApi { + treasury::calls::TransactionApi + } + pub fn bounties(&self) -> bounties::calls::TransactionApi { + bounties::calls::TransactionApi + } + pub fn child_bounties(&self) -> child_bounties::calls::TransactionApi { + child_bounties::calls::TransactionApi + } + pub fn bags_list(&self) -> bags_list::calls::TransactionApi { + bags_list::calls::TransactionApi + } + pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi { + nomination_pools::calls::TransactionApi + } + pub fn scheduler(&self) -> scheduler::calls::TransactionApi { + scheduler::calls::TransactionApi + } + pub fn preimage(&self) -> preimage::calls::TransactionApi { + preimage::calls::TransactionApi + } + pub fn tx_pause(&self) -> tx_pause::calls::TransactionApi { + tx_pause::calls::TransactionApi + } + pub fn im_online(&self) -> im_online::calls::TransactionApi { + im_online::calls::TransactionApi + } + pub fn identity(&self) -> identity::calls::TransactionApi { + identity::calls::TransactionApi + } + pub fn utility(&self) -> utility::calls::TransactionApi { + utility::calls::TransactionApi + } + pub fn multisig(&self) -> multisig::calls::TransactionApi { + multisig::calls::TransactionApi + } + pub fn ethereum(&self) -> ethereum::calls::TransactionApi { + ethereum::calls::TransactionApi + } + pub fn evm(&self) -> evm::calls::TransactionApi { + evm::calls::TransactionApi + } + pub fn dynamic_fee(&self) -> dynamic_fee::calls::TransactionApi { + dynamic_fee::calls::TransactionApi + } + pub fn base_fee(&self) -> base_fee::calls::TransactionApi { + base_fee::calls::TransactionApi + } + pub fn hotfix_sufficients(&self) -> hotfix_sufficients::calls::TransactionApi { + hotfix_sufficients::calls::TransactionApi + } + pub fn claims(&self) -> claims::calls::TransactionApi { + claims::calls::TransactionApi + } + pub fn proxy(&self) -> proxy::calls::TransactionApi { + proxy::calls::TransactionApi + } + pub fn multi_asset_delegation(&self) -> multi_asset_delegation::calls::TransactionApi { + multi_asset_delegation::calls::TransactionApi + } + pub fn services(&self) -> services::calls::TransactionApi { + services::calls::TransactionApi + } + pub fn lst(&self) -> lst::calls::TransactionApi { + lst::calls::TransactionApi + } + } + #[doc = r" check whether the metadata provided is aligned with this statically generated code."] + pub fn is_codegen_valid_for(metadata: &::subxt_core::Metadata) -> bool { + let runtime_metadata_hash = metadata + .hasher() + .only_these_pallets(&PALLETS) + .only_these_runtime_apis(&RUNTIME_APIS) + .hash(); + runtime_metadata_hash + == [ + 48u8, 125u8, 115u8, 249u8, 140u8, 115u8, 82u8, 239u8, 14u8, 224u8, 138u8, 44u8, + 94u8, 58u8, 248u8, 201u8, 163u8, 112u8, 143u8, 98u8, 247u8, 83u8, 29u8, 198u8, 8u8, + 155u8, 157u8, 1u8, 135u8, 15u8, 249u8, 213u8, + ] + } + pub mod system { + use super::root_mod; + use super::runtime_types; + #[doc = "Error for the System pallet"] + pub type Error = runtime_types::frame_system::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::frame_system::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "Can be executed by every `origin`."] + pub struct Remark { + pub remark: remark::Remark, + } + pub mod remark { + use super::runtime_types; + pub type Remark = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Remark { + const PALLET: &'static str = "System"; + const CALL: &'static str = "remark"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + pub struct SetHeapPages { + pub pages: set_heap_pages::Pages, + } + pub mod set_heap_pages { + use super::runtime_types; + pub type Pages = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetHeapPages { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_heap_pages"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the new runtime code."] + pub struct SetCode { + pub code: set_code::Code, + } + pub mod set_code { + use super::runtime_types; + pub type Code = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCode { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_code"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] + #[doc = "version!"] + pub struct SetCodeWithoutChecks { + pub code: set_code_without_checks::Code, + } + pub mod set_code_without_checks { + use super::runtime_types; + pub type Code = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCodeWithoutChecks { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_code_without_checks"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set some items of storage."] + pub struct SetStorage { + pub items: set_storage::Items, + } + pub mod set_storage { + use super::runtime_types; + pub type Items = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetStorage { + const PALLET: &'static str = "System"; + const CALL: &'static str = "set_storage"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Kill some items from storage."] + pub struct KillStorage { + pub keys: kill_storage::Keys, + } + pub mod kill_storage { + use super::runtime_types; + pub type Keys = ::subxt_core::alloc::vec::Vec< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for KillStorage { + const PALLET: &'static str = "System"; + const CALL: &'static str = "kill_storage"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Kill all storage items with a key that starts with the given prefix."] + #[doc = ""] + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + pub struct KillPrefix { + pub prefix: kill_prefix::Prefix, + pub subkeys: kill_prefix::Subkeys, + } + pub mod kill_prefix { + use super::runtime_types; + pub type Prefix = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Subkeys = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for KillPrefix { + const PALLET: &'static str = "System"; + const CALL: &'static str = "kill_prefix"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Make some on-chain remark and emit event."] + pub struct RemarkWithEvent { + pub remark: remark_with_event::Remark, + } + pub mod remark_with_event { + use super::runtime_types; + pub type Remark = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemarkWithEvent { + const PALLET: &'static str = "System"; + const CALL: &'static str = "remark_with_event"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "This call requires Root origin."] + pub struct AuthorizeUpgrade { + pub code_hash: authorize_upgrade::CodeHash, + } + pub mod authorize_upgrade { + use super::runtime_types; + pub type CodeHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for AuthorizeUpgrade { + const PALLET: &'static str = "System"; + const CALL: &'static str = "authorize_upgrade"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] + #[doc = "example that the spec name remains the same and that the version number increases. Not"] + #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] + #[doc = ""] + #[doc = "This call requires Root origin."] + pub struct AuthorizeUpgradeWithoutChecks { + pub code_hash: authorize_upgrade_without_checks::CodeHash, + } + pub mod authorize_upgrade_without_checks { + use super::runtime_types; + pub type CodeHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for AuthorizeUpgradeWithoutChecks { + const PALLET: &'static str = "System"; + const CALL: &'static str = "authorize_upgrade_without_checks"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] + #[doc = ""] + #[doc = "If the authorization required a version check, this call will ensure the spec name"] + #[doc = "remains unchanged and that the spec version has increased."] + #[doc = ""] + #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] + #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] + #[doc = ""] + #[doc = "All origins are allowed."] + pub struct ApplyAuthorizedUpgrade { + pub code: apply_authorized_upgrade::Code, + } + pub mod apply_authorized_upgrade { + use super::runtime_types; + pub type Code = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for ApplyAuthorizedUpgrade { + const PALLET: &'static str = "System"; + const CALL: &'static str = "apply_authorized_upgrade"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "Can be executed by every `origin`."] + pub fn remark( + &self, + remark: types::remark::Remark, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "remark", + types::Remark { remark }, + [ + 43u8, 126u8, 180u8, 174u8, 141u8, 48u8, 52u8, 125u8, 166u8, 212u8, + 216u8, 98u8, 100u8, 24u8, 132u8, 71u8, 101u8, 64u8, 246u8, 169u8, 33u8, + 250u8, 147u8, 208u8, 2u8, 40u8, 129u8, 209u8, 232u8, 207u8, 207u8, + 13u8, + ], + ) + } + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + pub fn set_heap_pages( + &self, + pages: types::set_heap_pages::Pages, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "set_heap_pages", + types::SetHeapPages { pages }, + [ + 188u8, 191u8, 99u8, 216u8, 219u8, 109u8, 141u8, 50u8, 78u8, 235u8, + 215u8, 242u8, 195u8, 24u8, 111u8, 76u8, 229u8, 64u8, 99u8, 225u8, + 134u8, 121u8, 81u8, 209u8, 127u8, 223u8, 98u8, 215u8, 150u8, 70u8, + 57u8, 147u8, + ], + ) + } + #[doc = "Set the new runtime code."] + pub fn set_code( + &self, + code: types::set_code::Code, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "set_code", + types::SetCode { code }, + [ + 233u8, 248u8, 88u8, 245u8, 28u8, 65u8, 25u8, 169u8, 35u8, 237u8, 19u8, + 203u8, 136u8, 160u8, 18u8, 3u8, 20u8, 197u8, 81u8, 169u8, 244u8, 188u8, + 27u8, 147u8, 147u8, 236u8, 65u8, 25u8, 3u8, 143u8, 182u8, 22u8, + ], + ) + } + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] + #[doc = "version!"] + pub fn set_code_without_checks( + &self, + code: types::set_code_without_checks::Code, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "set_code_without_checks", + types::SetCodeWithoutChecks { code }, + [ + 82u8, 212u8, 157u8, 44u8, 70u8, 0u8, 143u8, 15u8, 109u8, 109u8, 107u8, + 157u8, 141u8, 42u8, 169u8, 11u8, 15u8, 186u8, 252u8, 138u8, 10u8, + 147u8, 15u8, 178u8, 247u8, 229u8, 213u8, 98u8, 207u8, 231u8, 119u8, + 115u8, + ], + ) + } + #[doc = "Set some items of storage."] + pub fn set_storage( + &self, + items: types::set_storage::Items, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "set_storage", + types::SetStorage { items }, + [ + 141u8, 216u8, 52u8, 222u8, 223u8, 136u8, 123u8, 181u8, 19u8, 75u8, + 163u8, 102u8, 229u8, 189u8, 158u8, 142u8, 95u8, 235u8, 240u8, 49u8, + 150u8, 76u8, 78u8, 137u8, 126u8, 88u8, 183u8, 88u8, 231u8, 146u8, + 234u8, 43u8, + ], + ) + } + #[doc = "Kill some items from storage."] + pub fn kill_storage( + &self, + keys: types::kill_storage::Keys, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "kill_storage", + types::KillStorage { keys }, + [ + 73u8, 63u8, 196u8, 36u8, 144u8, 114u8, 34u8, 213u8, 108u8, 93u8, 209u8, + 234u8, 153u8, 185u8, 33u8, 91u8, 187u8, 195u8, 223u8, 130u8, 58u8, + 156u8, 63u8, 47u8, 228u8, 249u8, 216u8, 139u8, 143u8, 177u8, 41u8, + 35u8, + ], + ) + } + #[doc = "Kill all storage items with a key that starts with the given prefix."] + #[doc = ""] + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + pub fn kill_prefix( + &self, + prefix: types::kill_prefix::Prefix, + subkeys: types::kill_prefix::Subkeys, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "kill_prefix", + types::KillPrefix { prefix, subkeys }, + [ + 184u8, 57u8, 139u8, 24u8, 208u8, 87u8, 108u8, 215u8, 198u8, 189u8, + 175u8, 242u8, 167u8, 215u8, 97u8, 63u8, 110u8, 166u8, 238u8, 98u8, + 67u8, 236u8, 111u8, 110u8, 234u8, 81u8, 102u8, 5u8, 182u8, 5u8, 214u8, + 85u8, + ], + ) + } + #[doc = "Make some on-chain remark and emit event."] + pub fn remark_with_event( + &self, + remark: types::remark_with_event::Remark, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "remark_with_event", + types::RemarkWithEvent { remark }, + [ + 120u8, 120u8, 153u8, 92u8, 184u8, 85u8, 34u8, 2u8, 174u8, 206u8, 105u8, + 228u8, 233u8, 130u8, 80u8, 246u8, 228u8, 59u8, 234u8, 240u8, 4u8, 49u8, + 147u8, 170u8, 115u8, 91u8, 149u8, 200u8, 228u8, 181u8, 8u8, 154u8, + ], + ) + } + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "This call requires Root origin."] + pub fn authorize_upgrade( + &self, + code_hash: types::authorize_upgrade::CodeHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "authorize_upgrade", + types::AuthorizeUpgrade { code_hash }, + [ + 4u8, 14u8, 76u8, 107u8, 209u8, 129u8, 9u8, 39u8, 193u8, 17u8, 84u8, + 254u8, 170u8, 214u8, 24u8, 155u8, 29u8, 184u8, 249u8, 241u8, 109u8, + 58u8, 145u8, 131u8, 109u8, 63u8, 38u8, 165u8, 107u8, 215u8, 217u8, + 172u8, + ], + ) + } + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] + #[doc = "example that the spec name remains the same and that the version number increases. Not"] + #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] + #[doc = ""] + #[doc = "This call requires Root origin."] + pub fn authorize_upgrade_without_checks( + &self, + code_hash: types::authorize_upgrade_without_checks::CodeHash, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "authorize_upgrade_without_checks", + types::AuthorizeUpgradeWithoutChecks { code_hash }, + [ + 126u8, 126u8, 55u8, 26u8, 47u8, 55u8, 66u8, 8u8, 167u8, 18u8, 29u8, + 136u8, 146u8, 14u8, 189u8, 117u8, 16u8, 227u8, 162u8, 61u8, 149u8, + 197u8, 104u8, 184u8, 185u8, 161u8, 99u8, 154u8, 80u8, 125u8, 181u8, + 233u8, + ], + ) + } + #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] + #[doc = ""] + #[doc = "If the authorization required a version check, this call will ensure the spec name"] + #[doc = "remains unchanged and that the spec version has increased."] + #[doc = ""] + #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] + #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] + #[doc = ""] + #[doc = "All origins are allowed."] + pub fn apply_authorized_upgrade( + &self, + code: types::apply_authorized_upgrade::Code, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "System", + "apply_authorized_upgrade", + types::ApplyAuthorizedUpgrade { code }, + [ + 232u8, 107u8, 127u8, 38u8, 230u8, 29u8, 97u8, 4u8, 160u8, 191u8, 222u8, + 156u8, 245u8, 102u8, 196u8, 141u8, 44u8, 163u8, 98u8, 68u8, 125u8, + 32u8, 124u8, 101u8, 108u8, 93u8, 211u8, 52u8, 0u8, 231u8, 33u8, 227u8, + ], + ) + } + } + } + #[doc = "Event for the System pallet."] + pub type Event = runtime_types::frame_system::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An extrinsic completed successfully."] + pub struct ExtrinsicSuccess { + pub dispatch_info: extrinsic_success::DispatchInfo, + } + pub mod extrinsic_success { + use super::runtime_types; + pub type DispatchInfo = runtime_types::frame_support::dispatch::DispatchInfo; + } + impl ::subxt_core::events::StaticEvent for ExtrinsicSuccess { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "ExtrinsicSuccess"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An extrinsic failed."] + pub struct ExtrinsicFailed { + pub dispatch_error: extrinsic_failed::DispatchError, + pub dispatch_info: extrinsic_failed::DispatchInfo, + } + pub mod extrinsic_failed { + use super::runtime_types; + pub type DispatchError = runtime_types::sp_runtime::DispatchError; + pub type DispatchInfo = runtime_types::frame_support::dispatch::DispatchInfo; + } + impl ::subxt_core::events::StaticEvent for ExtrinsicFailed { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "ExtrinsicFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "`:code` was updated."] + pub struct CodeUpdated; + impl ::subxt_core::events::StaticEvent for CodeUpdated { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "CodeUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new account was created."] + pub struct NewAccount { + pub account: new_account::Account, + } + pub mod new_account { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for NewAccount { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "NewAccount"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account was reaped."] + pub struct KilledAccount { + pub account: killed_account::Account, + } + pub mod killed_account { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for KilledAccount { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "KilledAccount"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "On on-chain remark happened."] + pub struct Remarked { + pub sender: remarked::Sender, + pub hash: remarked::Hash, + } + pub mod remarked { + use super::runtime_types; + pub type Sender = ::subxt_core::utils::AccountId32; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Remarked { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "Remarked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An upgrade was authorized."] + pub struct UpgradeAuthorized { + pub code_hash: upgrade_authorized::CodeHash, + pub check_version: upgrade_authorized::CheckVersion, + } + pub mod upgrade_authorized { + use super::runtime_types; + pub type CodeHash = ::subxt_core::utils::H256; + pub type CheckVersion = ::core::primitive::bool; + } + impl ::subxt_core::events::StaticEvent for UpgradeAuthorized { + const PALLET: &'static str = "System"; + const EVENT: &'static str = "UpgradeAuthorized"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod account { + use super::runtime_types; + pub type Account = runtime_types::frame_system::AccountInfo< + ::core::primitive::u32, + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod extrinsic_count { + use super::runtime_types; + pub type ExtrinsicCount = ::core::primitive::u32; + } + pub mod inherents_applied { + use super::runtime_types; + pub type InherentsApplied = ::core::primitive::bool; + } + pub mod block_weight { + use super::runtime_types; + pub type BlockWeight = runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::sp_weights::weight_v2::Weight, + >; + } + pub mod all_extrinsics_len { + use super::runtime_types; + pub type AllExtrinsicsLen = ::core::primitive::u32; + } + pub mod block_hash { + use super::runtime_types; + pub type BlockHash = ::subxt_core::utils::H256; + pub type Param0 = ::core::primitive::u64; + } + pub mod extrinsic_data { + use super::runtime_types; + pub type ExtrinsicData = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Param0 = ::core::primitive::u32; + } + pub mod number { + use super::runtime_types; + pub type Number = ::core::primitive::u64; + } + pub mod parent_hash { + use super::runtime_types; + pub type ParentHash = ::subxt_core::utils::H256; + } + pub mod digest { + use super::runtime_types; + pub type Digest = runtime_types::sp_runtime::generic::digest::Digest; + } + pub mod events { + use super::runtime_types; + pub type Events = ::subxt_core::alloc::vec::Vec< + runtime_types::frame_system::EventRecord< + runtime_types::tangle_testnet_runtime::RuntimeEvent, + ::subxt_core::utils::H256, + >, + >; + } + pub mod event_count { + use super::runtime_types; + pub type EventCount = ::core::primitive::u32; + } + pub mod event_topics { + use super::runtime_types; + pub type EventTopics = ::subxt_core::alloc::vec::Vec<( + ::core::primitive::u64, + ::core::primitive::u32, + )>; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod last_runtime_upgrade { + use super::runtime_types; + pub type LastRuntimeUpgrade = + runtime_types::frame_system::LastRuntimeUpgradeInfo; + } + pub mod upgraded_to_u32_ref_count { + use super::runtime_types; + pub type UpgradedToU32RefCount = ::core::primitive::bool; + } + pub mod upgraded_to_triple_ref_count { + use super::runtime_types; + pub type UpgradedToTripleRefCount = ::core::primitive::bool; + } + pub mod execution_phase { + use super::runtime_types; + pub type ExecutionPhase = runtime_types::frame_system::Phase; + } + pub mod authorized_upgrade { + use super::runtime_types; + pub type AuthorizedUpgrade = + runtime_types::frame_system::CodeUpgradeAuthorization; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The full account information for a particular account ID."] + pub fn account_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account::Account, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "Account", + (), + [ + 14u8, 233u8, 115u8, 214u8, 0u8, 109u8, 222u8, 121u8, 162u8, 65u8, 60u8, + 175u8, 209u8, 79u8, 222u8, 124u8, 22u8, 235u8, 138u8, 176u8, 133u8, + 124u8, 90u8, 158u8, 85u8, 45u8, 37u8, 174u8, 47u8, 79u8, 47u8, 166u8, + ], + ) + } + #[doc = " The full account information for a particular account ID."] + pub fn account( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::account::Account, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "Account", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 14u8, 233u8, 115u8, 214u8, 0u8, 109u8, 222u8, 121u8, 162u8, 65u8, 60u8, + 175u8, 209u8, 79u8, 222u8, 124u8, 22u8, 235u8, 138u8, 176u8, 133u8, + 124u8, 90u8, 158u8, 85u8, 45u8, 37u8, 174u8, 47u8, 79u8, 47u8, 166u8, + ], + ) + } + #[doc = " Total extrinsics count for the current block."] + pub fn extrinsic_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::extrinsic_count::ExtrinsicCount, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "ExtrinsicCount", + (), + [ + 102u8, 76u8, 236u8, 42u8, 40u8, 231u8, 33u8, 222u8, 123u8, 147u8, + 153u8, 148u8, 234u8, 203u8, 181u8, 119u8, 6u8, 187u8, 177u8, 199u8, + 120u8, 47u8, 137u8, 254u8, 96u8, 100u8, 165u8, 182u8, 249u8, 230u8, + 159u8, 79u8, + ], + ) + } + #[doc = " Whether all inherents have been applied."] + pub fn inherents_applied( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::inherents_applied::InherentsApplied, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "InherentsApplied", + (), + [ + 132u8, 249u8, 142u8, 252u8, 8u8, 103u8, 80u8, 120u8, 50u8, 6u8, 188u8, + 223u8, 101u8, 55u8, 165u8, 189u8, 172u8, 249u8, 165u8, 230u8, 183u8, + 109u8, 34u8, 65u8, 185u8, 150u8, 29u8, 8u8, 186u8, 129u8, 135u8, 239u8, + ], + ) + } + #[doc = " The current weight for the block."] + pub fn block_weight( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::block_weight::BlockWeight, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "BlockWeight", + (), + [ + 158u8, 46u8, 228u8, 89u8, 210u8, 214u8, 84u8, 154u8, 50u8, 68u8, 63u8, + 62u8, 43u8, 42u8, 99u8, 27u8, 54u8, 42u8, 146u8, 44u8, 241u8, 216u8, + 229u8, 30u8, 216u8, 255u8, 165u8, 238u8, 181u8, 130u8, 36u8, 102u8, + ], + ) + } + #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."] + pub fn all_extrinsics_len( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::all_extrinsics_len::AllExtrinsicsLen, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "AllExtrinsicsLen", + (), + [ + 117u8, 86u8, 61u8, 243u8, 41u8, 51u8, 102u8, 214u8, 137u8, 100u8, + 243u8, 185u8, 122u8, 174u8, 187u8, 117u8, 86u8, 189u8, 63u8, 135u8, + 101u8, 218u8, 203u8, 201u8, 237u8, 254u8, 128u8, 183u8, 169u8, 221u8, + 242u8, 65u8, + ], + ) + } + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::block_hash::BlockHash, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "BlockHash", + (), + [ + 231u8, 203u8, 53u8, 62u8, 34u8, 38u8, 27u8, 62u8, 10u8, 209u8, 96u8, + 2u8, 207u8, 136u8, 240u8, 67u8, 183u8, 74u8, 239u8, 218u8, 18u8, 200u8, + 211u8, 134u8, 3u8, 164u8, 96u8, 74u8, 67u8, 204u8, 133u8, 127u8, + ], + ) + } + #[doc = " Map of block numbers to block hashes."] + pub fn block_hash( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::block_hash::BlockHash, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "BlockHash", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 231u8, 203u8, 53u8, 62u8, 34u8, 38u8, 27u8, 62u8, 10u8, 209u8, 96u8, + 2u8, 207u8, 136u8, 240u8, 67u8, 183u8, 74u8, 239u8, 218u8, 18u8, 200u8, + 211u8, 134u8, 3u8, 164u8, 96u8, 74u8, 67u8, 204u8, 133u8, 127u8, + ], + ) + } + #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::extrinsic_data::ExtrinsicData, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "ExtrinsicData", + (), + [ + 160u8, 180u8, 122u8, 18u8, 196u8, 26u8, 2u8, 37u8, 115u8, 232u8, 133u8, + 220u8, 106u8, 245u8, 4u8, 129u8, 42u8, 84u8, 241u8, 45u8, 199u8, 179u8, + 128u8, 61u8, 170u8, 137u8, 231u8, 156u8, 247u8, 57u8, 47u8, 38u8, + ], + ) + } + #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."] + pub fn extrinsic_data( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::extrinsic_data::ExtrinsicData, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "ExtrinsicData", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 160u8, 180u8, 122u8, 18u8, 196u8, 26u8, 2u8, 37u8, 115u8, 232u8, 133u8, + 220u8, 106u8, 245u8, 4u8, 129u8, 42u8, 84u8, 241u8, 45u8, 199u8, 179u8, + 128u8, 61u8, 170u8, 137u8, 231u8, 156u8, 247u8, 57u8, 47u8, 38u8, + ], + ) + } + #[doc = " The current block number being processed. Set by `execute_block`."] + pub fn number( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::number::Number, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "Number", + (), + [ + 2u8, 189u8, 173u8, 80u8, 15u8, 128u8, 71u8, 71u8, 14u8, 91u8, 177u8, + 204u8, 54u8, 135u8, 13u8, 212u8, 9u8, 23u8, 219u8, 228u8, 150u8, 137u8, + 199u8, 181u8, 58u8, 241u8, 247u8, 70u8, 19u8, 237u8, 23u8, 77u8, + ], + ) + } + #[doc = " Hash of the previous block."] + pub fn parent_hash( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::parent_hash::ParentHash, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "ParentHash", + (), + [ + 26u8, 130u8, 11u8, 216u8, 155u8, 71u8, 128u8, 170u8, 30u8, 153u8, 21u8, + 192u8, 62u8, 93u8, 137u8, 80u8, 120u8, 81u8, 202u8, 94u8, 248u8, 125u8, + 71u8, 82u8, 141u8, 229u8, 32u8, 56u8, 73u8, 50u8, 101u8, 78u8, + ], + ) + } + #[doc = " Digest of the current block, also part of the block header."] + pub fn digest( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::digest::Digest, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "Digest", + (), + [ + 61u8, 64u8, 237u8, 91u8, 145u8, 232u8, 17u8, 254u8, 181u8, 16u8, 234u8, + 91u8, 51u8, 140u8, 254u8, 131u8, 98u8, 135u8, 21u8, 37u8, 251u8, 20u8, + 58u8, 92u8, 123u8, 141u8, 14u8, 227u8, 146u8, 46u8, 222u8, 117u8, + ], + ) + } + #[doc = " Events deposited for the current block."] + #[doc = ""] + #[doc = " NOTE: The item is unbound and should therefore never be read on chain."] + #[doc = " It could otherwise inflate the PoV size of a block."] + #[doc = ""] + #[doc = " Events have a large in-memory size. Box the events to not go out-of-memory"] + #[doc = " just in case someone still reads them from within the runtime."] + pub fn events( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::events::Events, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "Events", + (), + [ + 141u8, 176u8, 198u8, 78u8, 150u8, 62u8, 53u8, 32u8, 138u8, 140u8, + 130u8, 41u8, 138u8, 213u8, 93u8, 73u8, 180u8, 177u8, 43u8, 130u8, 53u8, + 20u8, 229u8, 48u8, 133u8, 11u8, 98u8, 51u8, 27u8, 25u8, 131u8, 79u8, + ], + ) + } + #[doc = " The number of events in the `Events` list."] + pub fn event_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::event_count::EventCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "EventCount", + (), + [ + 175u8, 24u8, 252u8, 184u8, 210u8, 167u8, 146u8, 143u8, 164u8, 80u8, + 151u8, 205u8, 189u8, 189u8, 55u8, 220u8, 47u8, 101u8, 181u8, 33u8, + 254u8, 131u8, 13u8, 143u8, 3u8, 244u8, 245u8, 45u8, 2u8, 210u8, 79u8, + 133u8, + ], + ) + } + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] + #[doc = ""] + #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] + #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] + #[doc = " in case of changes fetch the list of events of interest."] + #[doc = ""] + #[doc = " The value has the type `(BlockNumberFor, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::event_topics::EventTopics, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "EventTopics", + (), + [ + 190u8, 220u8, 184u8, 246u8, 192u8, 219u8, 183u8, 210u8, 216u8, 1u8, + 239u8, 142u8, 255u8, 35u8, 134u8, 39u8, 114u8, 27u8, 34u8, 194u8, 90u8, + 54u8, 113u8, 119u8, 85u8, 117u8, 23u8, 81u8, 186u8, 94u8, 34u8, 89u8, + ], + ) + } + #[doc = " Mapping between a topic (represented by T::Hash) and a vector of indexes"] + #[doc = " of events in the `>` list."] + #[doc = ""] + #[doc = " All topic vectors have deterministic storage locations depending on the topic. This"] + #[doc = " allows light-clients to leverage the changes trie storage tracking mechanism and"] + #[doc = " in case of changes fetch the list of events of interest."] + #[doc = ""] + #[doc = " The value has the type `(BlockNumberFor, EventIndex)` because if we used only just"] + #[doc = " the `EventIndex` then in case if the topic has the same contents on the next block"] + #[doc = " no notification will be triggered thus the event might be lost."] + pub fn event_topics( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::event_topics::EventTopics, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "EventTopics", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 190u8, 220u8, 184u8, 246u8, 192u8, 219u8, 183u8, 210u8, 216u8, 1u8, + 239u8, 142u8, 255u8, 35u8, 134u8, 39u8, 114u8, 27u8, 34u8, 194u8, 90u8, + 54u8, 113u8, 119u8, 85u8, 117u8, 23u8, 81u8, 186u8, 94u8, 34u8, 89u8, + ], + ) + } + #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."] + pub fn last_runtime_upgrade( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::last_runtime_upgrade::LastRuntimeUpgrade, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "LastRuntimeUpgrade", + (), + [ + 137u8, 29u8, 175u8, 75u8, 197u8, 208u8, 91u8, 207u8, 156u8, 87u8, + 148u8, 68u8, 91u8, 140u8, 22u8, 233u8, 1u8, 229u8, 56u8, 34u8, 40u8, + 194u8, 253u8, 30u8, 163u8, 39u8, 54u8, 209u8, 13u8, 27u8, 139u8, 184u8, + ], + ) + } + #[doc = " True if we have upgraded so that `type RefCount` is `u32`. False (default) if not."] + pub fn upgraded_to_u32_ref_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::upgraded_to_u32_ref_count::UpgradedToU32RefCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "UpgradedToU32RefCount", + (), + [ + 229u8, 73u8, 9u8, 132u8, 186u8, 116u8, 151u8, 171u8, 145u8, 29u8, 34u8, + 130u8, 52u8, 146u8, 124u8, 175u8, 79u8, 189u8, 147u8, 230u8, 234u8, + 107u8, 124u8, 31u8, 2u8, 22u8, 86u8, 190u8, 4u8, 147u8, 50u8, 245u8, + ], + ) + } + #[doc = " True if we have upgraded so that AccountInfo contains three types of `RefCount`. False"] + #[doc = " (default) if not."] + pub fn upgraded_to_triple_ref_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::upgraded_to_triple_ref_count::UpgradedToTripleRefCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "UpgradedToTripleRefCount", + (), + [ + 97u8, 66u8, 124u8, 243u8, 27u8, 167u8, 147u8, 81u8, 254u8, 201u8, + 101u8, 24u8, 40u8, 231u8, 14u8, 179u8, 154u8, 163u8, 71u8, 81u8, 185u8, + 167u8, 82u8, 254u8, 189u8, 3u8, 101u8, 207u8, 206u8, 194u8, 155u8, + 151u8, + ], + ) + } + #[doc = " The execution phase of the block."] + pub fn execution_phase( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::execution_phase::ExecutionPhase, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "ExecutionPhase", + (), + [ + 191u8, 129u8, 100u8, 134u8, 126u8, 116u8, 154u8, 203u8, 220u8, 200u8, + 0u8, 26u8, 161u8, 250u8, 133u8, 205u8, 146u8, 24u8, 5u8, 156u8, 158u8, + 35u8, 36u8, 253u8, 52u8, 235u8, 86u8, 167u8, 35u8, 100u8, 119u8, 27u8, + ], + ) + } + #[doc = " `Some` if a code upgrade has been authorized."] + pub fn authorized_upgrade( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::authorized_upgrade::AuthorizedUpgrade, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "System", + "AuthorizedUpgrade", + (), + [ + 165u8, 97u8, 27u8, 138u8, 2u8, 28u8, 55u8, 92u8, 96u8, 96u8, 168u8, + 169u8, 55u8, 178u8, 44u8, 127u8, 58u8, 140u8, 206u8, 178u8, 1u8, 37u8, + 214u8, 213u8, 251u8, 123u8, 5u8, 111u8, 90u8, 148u8, 217u8, 135u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Block & extrinsics weights: base values and limits."] + pub fn block_weights( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::frame_system::limits::BlockWeights, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "System", + "BlockWeights", + [ + 176u8, 124u8, 225u8, 136u8, 25u8, 73u8, 247u8, 33u8, 82u8, 206u8, 85u8, + 190u8, 127u8, 102u8, 71u8, 11u8, 185u8, 8u8, 58u8, 0u8, 94u8, 55u8, + 163u8, 177u8, 104u8, 59u8, 60u8, 136u8, 246u8, 116u8, 0u8, 239u8, + ], + ) + } + #[doc = " The maximum length of a block (in bytes)."] + pub fn block_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::frame_system::limits::BlockLength, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "System", + "BlockLength", + [ + 23u8, 242u8, 225u8, 39u8, 225u8, 67u8, 152u8, 41u8, 155u8, 104u8, 68u8, + 229u8, 185u8, 133u8, 10u8, 143u8, 184u8, 152u8, 234u8, 44u8, 140u8, + 96u8, 166u8, 235u8, 162u8, 160u8, 72u8, 7u8, 35u8, 194u8, 3u8, 37u8, + ], + ) + } + #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."] + pub fn block_hash_count( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "System", + "BlockHashCount", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The weight of runtime database operations the runtime can invoke."] + pub fn db_weight( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::RuntimeDbWeight, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "System", + "DbWeight", + [ + 42u8, 43u8, 178u8, 142u8, 243u8, 203u8, 60u8, 173u8, 118u8, 111u8, + 200u8, 170u8, 102u8, 70u8, 237u8, 187u8, 198u8, 120u8, 153u8, 232u8, + 183u8, 76u8, 74u8, 10u8, 70u8, 243u8, 14u8, 218u8, 213u8, 126u8, 29u8, + 177u8, + ], + ) + } + #[doc = " Get the chain's in-code version."] + pub fn version( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_version::RuntimeVersion, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "System", + "Version", + [ + 219u8, 45u8, 162u8, 245u8, 177u8, 246u8, 48u8, 126u8, 191u8, 157u8, + 228u8, 83u8, 111u8, 133u8, 183u8, 13u8, 148u8, 108u8, 92u8, 102u8, + 72u8, 205u8, 74u8, 242u8, 233u8, 79u8, 20u8, 170u8, 72u8, 202u8, 158u8, + 165u8, + ], + ) + } + #[doc = " The designated SS58 prefix of this chain."] + #[doc = ""] + #[doc = " This replaces the \"ss58Format\" property declared in the chain spec. Reason is"] + #[doc = " that the runtime should know about the prefix in order to make use of it as"] + #[doc = " an identifier of the chain."] + pub fn ss58_prefix( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u16> { + ::subxt_core::constants::address::StaticAddress::new_static( + "System", + "SS58Prefix", + [ + 116u8, 33u8, 2u8, 170u8, 181u8, 147u8, 171u8, 169u8, 167u8, 227u8, + 41u8, 144u8, 11u8, 236u8, 82u8, 100u8, 74u8, 60u8, 184u8, 72u8, 169u8, + 90u8, 208u8, 135u8, 15u8, 117u8, 10u8, 123u8, 128u8, 193u8, 29u8, 70u8, + ], + ) + } + } + } + } + pub mod timestamp { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_timestamp::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the current time."] + #[doc = ""] + #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] + #[doc = "phase, if this call hasn't been invoked by that time."] + #[doc = ""] + #[doc = "The timestamp should be greater than the previous one by the amount specified by"] + #[doc = "[`Config::MinimumPeriod`]."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] + #[doc = "that changing the complexity of this call could result exhausting the resources in a"] + #[doc = "block to execute any other calls."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + pub struct Set { + #[codec(compact)] + pub now: set::Now, + } + pub mod set { + use super::runtime_types; + pub type Now = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for Set { + const PALLET: &'static str = "Timestamp"; + const CALL: &'static str = "set"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the current time."] + #[doc = ""] + #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] + #[doc = "phase, if this call hasn't been invoked by that time."] + #[doc = ""] + #[doc = "The timestamp should be greater than the previous one by the amount specified by"] + #[doc = "[`Config::MinimumPeriod`]."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] + #[doc = "that changing the complexity of this call could result exhausting the resources in a"] + #[doc = "block to execute any other calls."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + pub fn set( + &self, + now: types::set::Now, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Timestamp", + "set", + types::Set { now }, + [ + 37u8, 95u8, 49u8, 218u8, 24u8, 22u8, 0u8, 95u8, 72u8, 35u8, 155u8, + 199u8, 213u8, 54u8, 207u8, 22u8, 185u8, 193u8, 221u8, 70u8, 18u8, + 200u8, 4u8, 231u8, 195u8, 173u8, 6u8, 122u8, 11u8, 203u8, 231u8, 227u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod now { + use super::runtime_types; + pub type Now = ::core::primitive::u64; + } + pub mod did_update { + use super::runtime_types; + pub type DidUpdate = ::core::primitive::bool; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The current time for the current block."] + pub fn now( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::now::Now, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Timestamp", + "Now", + (), + [ + 44u8, 50u8, 80u8, 30u8, 195u8, 146u8, 123u8, 238u8, 8u8, 163u8, 187u8, + 92u8, 61u8, 39u8, 51u8, 29u8, 173u8, 169u8, 217u8, 158u8, 85u8, 187u8, + 141u8, 26u8, 12u8, 115u8, 51u8, 11u8, 200u8, 244u8, 138u8, 152u8, + ], + ) + } + #[doc = " Whether the timestamp has been updated in this block."] + #[doc = ""] + #[doc = " This value is updated to `true` upon successful submission of a timestamp by a node."] + #[doc = " It is then checked at the end of each block execution in the `on_finalize` hook."] + pub fn did_update( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::did_update::DidUpdate, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Timestamp", + "DidUpdate", + (), + [ + 229u8, 175u8, 246u8, 102u8, 237u8, 158u8, 212u8, 229u8, 238u8, 214u8, + 205u8, 160u8, 164u8, 252u8, 195u8, 75u8, 139u8, 110u8, 22u8, 34u8, + 248u8, 204u8, 107u8, 46u8, 20u8, 200u8, 238u8, 167u8, 71u8, 41u8, + 214u8, 140u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum period between blocks."] + #[doc = ""] + #[doc = " Be aware that this is different to the *expected* period that the block production"] + #[doc = " apparatus provides. Your chosen consensus system will generally work with this to"] + #[doc = " determine a sensible block time. For example, in the Aura pallet it will be double this"] + #[doc = " period on default settings."] + pub fn minimum_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Timestamp", + "MinimumPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod sudo { + use super::root_mod; + use super::runtime_types; + #[doc = "Error for the Sudo pallet."] + pub type Error = runtime_types::pallet_sudo::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_sudo::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + pub struct Sudo { + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod sudo { + use super::runtime_types; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for Sudo { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "sudo"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Sudo user to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub struct SudoUncheckedWeight { + pub call: ::subxt_core::alloc::boxed::Box, + pub weight: sudo_unchecked_weight::Weight, + } + pub mod sudo_unchecked_weight { + use super::runtime_types; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; + } + impl ::subxt_core::blocks::StaticExtrinsic for SudoUncheckedWeight { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "sudo_unchecked_weight"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + pub struct SetKey { + pub new: set_key::New, + } + pub mod set_key { + use super::runtime_types; + pub type New = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetKey { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "set_key"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] + #[doc = "a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub struct SudoAs { + pub who: sudo_as::Who, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod sudo_as { + use super::runtime_types; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for SudoAs { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "sudo_as"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Permanently removes the sudo key."] + #[doc = ""] + #[doc = "**This cannot be un-done.**"] + pub struct RemoveKey; + impl ::subxt_core::blocks::StaticExtrinsic for RemoveKey { + const PALLET: &'static str = "Sudo"; + const CALL: &'static str = "remove_key"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + pub fn sudo( + &self, + call: types::sudo::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Sudo", + "sudo", + types::Sudo { call: ::subxt_core::alloc::boxed::Box::new(call) }, + [ + 30u8, 160u8, 167u8, 190u8, 3u8, 169u8, 28u8, 112u8, 145u8, 81u8, 44u8, + 70u8, 127u8, 231u8, 69u8, 39u8, 126u8, 189u8, 131u8, 43u8, 134u8, + 225u8, 122u8, 166u8, 89u8, 24u8, 140u8, 82u8, 149u8, 145u8, 193u8, + 73u8, + ], + ) + } + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Sudo user to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub fn sudo_unchecked_weight( + &self, + call: types::sudo_unchecked_weight::Call, + weight: types::sudo_unchecked_weight::Weight, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Sudo", + "sudo_unchecked_weight", + types::SudoUncheckedWeight { + call: ::subxt_core::alloc::boxed::Box::new(call), + weight, + }, + [ + 239u8, 196u8, 7u8, 93u8, 209u8, 118u8, 125u8, 71u8, 88u8, 110u8, 96u8, + 131u8, 204u8, 142u8, 234u8, 168u8, 234u8, 4u8, 62u8, 129u8, 42u8, + 226u8, 11u8, 161u8, 44u8, 156u8, 81u8, 78u8, 160u8, 120u8, 70u8, 204u8, + ], + ) + } + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + pub fn set_key( + &self, + new: types::set_key::New, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Sudo", + "set_key", + types::SetKey { new }, + [ + 247u8, 148u8, 125u8, 134u8, 90u8, 138u8, 216u8, 117u8, 246u8, 75u8, + 85u8, 242u8, 229u8, 203u8, 227u8, 242u8, 166u8, 28u8, 247u8, 215u8, + 35u8, 13u8, 243u8, 13u8, 4u8, 48u8, 175u8, 192u8, 63u8, 142u8, 13u8, + 94u8, + ], + ) + } + #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] + #[doc = "a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub fn sudo_as( + &self, + who: types::sudo_as::Who, + call: types::sudo_as::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Sudo", + "sudo_as", + types::SudoAs { who, call: ::subxt_core::alloc::boxed::Box::new(call) }, + [ + 156u8, 242u8, 54u8, 89u8, 223u8, 19u8, 123u8, 91u8, 247u8, 59u8, 213u8, + 70u8, 35u8, 139u8, 1u8, 166u8, 10u8, 120u8, 120u8, 201u8, 159u8, 119u8, + 60u8, 8u8, 55u8, 145u8, 16u8, 181u8, 62u8, 247u8, 180u8, 6u8, + ], + ) + } + #[doc = "Permanently removes the sudo key."] + #[doc = ""] + #[doc = "**This cannot be un-done.**"] + pub fn remove_key( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Sudo", + "remove_key", + types::RemoveKey {}, + [ + 133u8, 253u8, 54u8, 175u8, 202u8, 239u8, 5u8, 198u8, 180u8, 138u8, + 25u8, 28u8, 109u8, 40u8, 30u8, 56u8, 126u8, 100u8, 52u8, 205u8, 250u8, + 191u8, 61u8, 195u8, 172u8, 142u8, 184u8, 239u8, 247u8, 10u8, 211u8, + 79u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_sudo::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A sudo call just took place."] + pub struct Sudid { + pub sudo_result: sudid::SudoResult, + } + pub mod sudid { + use super::runtime_types; + pub type SudoResult = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for Sudid { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "Sudid"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The sudo key has been updated."] + pub struct KeyChanged { + pub old: key_changed::Old, + pub new: key_changed::New, + } + pub mod key_changed { + use super::runtime_types; + pub type Old = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type New = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for KeyChanged { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The key was permanently removed."] + pub struct KeyRemoved; + impl ::subxt_core::events::StaticEvent for KeyRemoved { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "KeyRemoved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] + pub struct SudoAsDone { + pub sudo_result: sudo_as_done::SudoResult, + } + pub mod sudo_as_done { + use super::runtime_types; + pub type SudoResult = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for SudoAsDone { + const PALLET: &'static str = "Sudo"; + const EVENT: &'static str = "SudoAsDone"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod key { + use super::runtime_types; + pub type Key = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The `AccountId` of the sudo key."] + pub fn key( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::key::Key, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Sudo", + "Key", + (), + [ + 72u8, 14u8, 225u8, 162u8, 205u8, 247u8, 227u8, 105u8, 116u8, 57u8, 4u8, + 31u8, 84u8, 137u8, 227u8, 228u8, 133u8, 245u8, 206u8, 227u8, 117u8, + 36u8, 252u8, 151u8, 107u8, 15u8, 180u8, 4u8, 4u8, 152u8, 195u8, 144u8, + ], + ) + } + } + } + } + pub mod randomness_collective_flip { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod random_material { + use super::runtime_types; + pub type RandomMaterial = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::H256, + >; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Series of block headers from the last 81 blocks that acts as random seed material. This"] + #[doc = " is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of"] + #[doc = " the oldest hash."] + pub fn random_material( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::random_material::RandomMaterial, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "RandomnessCollectiveFlip", + "RandomMaterial", + (), + [ + 195u8, 232u8, 244u8, 162u8, 110u8, 137u8, 66u8, 57u8, 51u8, 221u8, + 143u8, 38u8, 51u8, 183u8, 105u8, 245u8, 175u8, 13u8, 33u8, 192u8, 53u8, + 16u8, 161u8, 76u8, 219u8, 177u8, 144u8, 192u8, 96u8, 166u8, 117u8, + 247u8, + ], + ) + } + } + } + } + pub mod assets { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_assets::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_assets::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Issue a new class of fungible assets from a public origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] + #[doc = ""] + #[doc = "Funds of sender are reserved by `AssetDeposit`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] + #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] + #[doc = "member of the asset class's admin team."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct Create { + #[codec(compact)] + pub id: create::Id, + pub admin: create::Admin, + pub min_balance: create::MinBalance, + } + pub mod create { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Admin = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type MinBalance = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Create { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "create"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Issue a new class of fungible assets from a privileged origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] + #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] + #[doc = "over this asset, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ForceCreate { + #[codec(compact)] + pub id: force_create::Id, + pub owner: force_create::Owner, + pub is_sufficient: force_create::IsSufficient, + #[codec(compact)] + pub min_balance: force_create::MinBalance, + } + pub mod force_create { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type IsSufficient = ::core::primitive::bool; + pub type MinBalance = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceCreate { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "force_create"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Start the process of destroying a fungible asset class."] + #[doc = ""] + #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] + #[doc = "destruction of an asset class."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "The asset class must be frozen before calling `start_destroy`."] + pub struct StartDestroy { + #[codec(compact)] + pub id: start_destroy::Id, + } + pub mod start_destroy { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for StartDestroy { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "start_destroy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Destroy all accounts associated with a given asset."] + #[doc = ""] + #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedAccounts` event."] + pub struct DestroyAccounts { + #[codec(compact)] + pub id: destroy_accounts::Id, + } + pub mod destroy_accounts { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for DestroyAccounts { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "destroy_accounts"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] + #[doc = ""] + #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedApprovals` event."] + pub struct DestroyApprovals { + #[codec(compact)] + pub id: destroy_approvals::Id, + } + pub mod destroy_approvals { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for DestroyApprovals { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "destroy_approvals"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Complete destroying asset and unreserve currency."] + #[doc = ""] + #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] + #[doc = "hand."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each successful call emits the `Event::Destroyed` event."] + pub struct FinishDestroy { + #[codec(compact)] + pub id: finish_destroy::Id, + } + pub mod finish_destroy { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for FinishDestroy { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "finish_destroy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Mint assets of a particular class."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount minted."] + #[doc = "- `beneficiary`: The account to be credited with the minted assets."] + #[doc = "- `amount`: The amount of the asset to be minted."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] + pub struct Mint { + #[codec(compact)] + pub id: mint::Id, + pub beneficiary: mint::Beneficiary, + #[codec(compact)] + pub amount: mint::Amount, + } + pub mod mint { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Mint { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "mint"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] + #[doc = ""] + #[doc = "Bails with `NoAccount` if the `who` is already dead."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount burned."] + #[doc = "- `who`: The account to be debited from."] + #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] + #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] + pub struct Burn { + #[codec(compact)] + pub id: burn::Id, + pub who: burn::Who, + #[codec(compact)] + pub amount: burn::Amount, + } + pub mod burn { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Burn { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "burn"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Move some assets from the sender account to another."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + pub struct Transfer { + #[codec(compact)] + pub id: transfer::Id, + pub target: transfer::Target, + #[codec(compact)] + pub amount: transfer::Amount, + } + pub mod transfer { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Transfer { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + pub struct TransferKeepAlive { + #[codec(compact)] + pub id: transfer_keep_alive::Id, + pub target: transfer_keep_alive::Target, + #[codec(compact)] + pub amount: transfer_keep_alive::Amount, + } + pub mod transfer_keep_alive { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for TransferKeepAlive { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "transfer_keep_alive"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Move some assets from one account to another."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `source`: The account to be debited."] + #[doc = "- `dest`: The account to be credited."] + #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] + #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] + #[doc = "below the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] + #[doc = "`dest`."] + pub struct ForceTransfer { + #[codec(compact)] + pub id: force_transfer::Id, + pub source: force_transfer::Source, + pub dest: force_transfer::Dest, + #[codec(compact)] + pub amount: force_transfer::Amount, + } + pub mod force_transfer { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Source = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Dest = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceTransfer { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "force_transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Disallow further unprivileged transfers of an asset `id` from an account `who`. `who`"] + #[doc = "must already exist as an entry in `Account`s of the asset. If you want to freeze an"] + #[doc = "account that does not have an entry, use `touch_other` first."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct Freeze { + #[codec(compact)] + pub id: freeze::Id, + pub who: freeze::Who, + } + pub mod freeze { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Freeze { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "freeze"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allow unprivileged transfers to and from an account again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be unfrozen."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct Thaw { + #[codec(compact)] + pub id: thaw::Id, + pub who: thaw::Who, + } + pub mod thaw { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Thaw { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "thaw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Disallow further unprivileged transfers for the asset class."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct FreezeAsset { + #[codec(compact)] + pub id: freeze_asset::Id, + } + pub mod freeze_asset { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for FreezeAsset { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "freeze_asset"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allow unprivileged transfers for the asset again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ThawAsset { + #[codec(compact)] + pub id: thaw_asset::Id, + } + pub mod thaw_asset { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ThawAsset { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "thaw_asset"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Change the Owner of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct TransferOwnership { + #[codec(compact)] + pub id: transfer_ownership::Id, + pub owner: transfer_ownership::Owner, + } + pub mod transfer_ownership { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for TransferOwnership { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "transfer_ownership"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Change the Issuer, Admin and Freezer of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct SetTeam { + #[codec(compact)] + pub id: set_team::Id, + pub issuer: set_team::Issuer, + pub admin: set_team::Admin, + pub freezer: set_team::Freezer, + } + pub mod set_team { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Issuer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Admin = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Freezer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetTeam { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "set_team"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Funds of sender are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct SetMetadata { + #[codec(compact)] + pub id: set_metadata::Id, + pub name: set_metadata::Name, + pub symbol: set_metadata::Symbol, + pub decimals: set_metadata::Decimals, + } + pub mod set_metadata { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Name = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Symbol = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Decimals = ::core::primitive::u8; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMetadata { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "set_metadata"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Any deposit is freed for the asset owner."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ClearMetadata { + #[codec(compact)] + pub id: clear_metadata::Id, + } + pub mod clear_metadata { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClearMetadata { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "clear_metadata"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force the metadata for an asset to some value."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is left alone."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] + pub struct ForceSetMetadata { + #[codec(compact)] + pub id: force_set_metadata::Id, + pub name: force_set_metadata::Name, + pub symbol: force_set_metadata::Symbol, + pub decimals: force_set_metadata::Decimals, + pub is_frozen: force_set_metadata::IsFrozen, + } + pub mod force_set_metadata { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Name = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Symbol = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Decimals = ::core::primitive::u8; + pub type IsFrozen = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceSetMetadata { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "force_set_metadata"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is returned."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ForceClearMetadata { + #[codec(compact)] + pub id: force_clear_metadata::Id, + } + pub mod force_clear_metadata { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceClearMetadata { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "force_clear_metadata"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Alter the attributes of a given asset."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] + #[doc = "value to account for the state bloat associated with its balance storage. If set to"] + #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] + #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] + #[doc = "growth)."] + #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ForceAssetStatus { + #[codec(compact)] + pub id: force_asset_status::Id, + pub owner: force_asset_status::Owner, + pub issuer: force_asset_status::Issuer, + pub admin: force_asset_status::Admin, + pub freezer: force_asset_status::Freezer, + #[codec(compact)] + pub min_balance: force_asset_status::MinBalance, + pub is_sufficient: force_asset_status::IsSufficient, + pub is_frozen: force_asset_status::IsFrozen, + } + pub mod force_asset_status { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Issuer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Admin = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Freezer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type MinBalance = ::core::primitive::u128; + pub type IsSufficient = ::core::primitive::bool; + pub type IsFrozen = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceAssetStatus { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "force_asset_status"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] + #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] + #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] + #[doc = "meet the right value."] + #[doc = ""] + #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] + #[doc = "making this call."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account to delegate permission to transfer asset."] + #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] + #[doc = "already an approval in place, then this acts additively."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ApproveTransfer { + #[codec(compact)] + pub id: approve_transfer::Id, + pub delegate: approve_transfer::Delegate, + #[codec(compact)] + pub amount: approve_transfer::Amount, + } + pub mod approve_transfer { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ApproveTransfer { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "approve_transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place between signer and"] + #[doc = "`delegate`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct CancelApproval { + #[codec(compact)] + pub id: cancel_approval::Id, + pub delegate: cancel_approval::Delegate, + } + pub mod cancel_approval { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelApproval { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "cancel_approval"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] + #[doc = "account of the asset `id`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ForceCancelApproval { + #[codec(compact)] + pub id: force_cancel_approval::Id, + pub owner: force_cancel_approval::Owner, + pub delegate: force_cancel_approval::Delegate, + } + pub mod force_cancel_approval { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceCancelApproval { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "force_cancel_approval"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] + #[doc = "account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] + #[doc = "signer."] + #[doc = ""] + #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] + #[doc = "reserved by `approve_transfer` is unreserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] + #[doc = "from which the asset balance will be withdrawn."] + #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] + #[doc = "- `amount`: The amount of assets to transfer."] + #[doc = ""] + #[doc = "Emits `TransferredApproved` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct TransferApproved { + #[codec(compact)] + pub id: transfer_approved::Id, + pub owner: transfer_approved::Owner, + pub destination: transfer_approved::Destination, + #[codec(compact)] + pub amount: transfer_approved::Amount, + } + pub mod transfer_approved { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Destination = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for TransferApproved { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "transfer_approved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create an asset account for non-provider assets."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] + #[doc = " to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + pub struct Touch { + #[codec(compact)] + pub id: touch::Id, + } + pub mod touch { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Touch { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "touch"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Return the deposit (if any) of an asset account or a consumer reference (if any) of an"] + #[doc = "account."] + #[doc = ""] + #[doc = "The origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for which the caller would like the deposit"] + #[doc = " refunded."] + #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + pub struct Refund { + #[codec(compact)] + pub id: refund::Id, + pub allow_burn: refund::AllowBurn, + } + pub mod refund { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type AllowBurn = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for Refund { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "refund"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Sets the minimum balance of an asset."] + #[doc = ""] + #[doc = "Only works if there aren't any accounts that are holding the asset or if"] + #[doc = "the new value of `min_balance` is less than the old one."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender has to be the Owner of the"] + #[doc = "asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `min_balance`: The new value of `min_balance`."] + #[doc = ""] + #[doc = "Emits `AssetMinBalanceChanged` event when successful."] + pub struct SetMinBalance { + #[codec(compact)] + pub id: set_min_balance::Id, + pub min_balance: set_min_balance::MinBalance, + } + pub mod set_min_balance { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type MinBalance = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMinBalance { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "set_min_balance"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create an asset account for `who`."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account"] + #[doc = " must have sufficient funds for a deposit to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = "- `who`: The account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + pub struct TouchOther { + #[codec(compact)] + pub id: touch_other::Id, + pub who: touch_other::Who, + } + pub mod touch_other { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for TouchOther { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "touch_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Return the deposit (if any) of a target asset account. Useful if you are the depositor."] + #[doc = ""] + #[doc = "The origin must be Signed and either the account owner, depositor, or asset `Admin`. In"] + #[doc = "order to burn a non-zero balance of the asset, the caller must be the account and should"] + #[doc = "use `refund`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] + #[doc = "- `who`: The account to refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + pub struct RefundOther { + #[codec(compact)] + pub id: refund_other::Id, + pub who: refund_other::Who, + } + pub mod refund_other { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for RefundOther { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "refund_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Disallow further unprivileged transfers of an asset `id` to and from an account `who`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the account's asset."] + #[doc = "- `who`: The account to be unblocked."] + #[doc = ""] + #[doc = "Emits `Blocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct Block { + #[codec(compact)] + pub id: block::Id, + pub who: block::Who, + } + pub mod block { + use super::runtime_types; + pub type Id = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Block { + const PALLET: &'static str = "Assets"; + const CALL: &'static str = "block"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Issue a new class of fungible assets from a public origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] + #[doc = ""] + #[doc = "Funds of sender are reserved by `AssetDeposit`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] + #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] + #[doc = "member of the asset class's admin team."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn create( + &self, + id: types::create::Id, + admin: types::create::Admin, + min_balance: types::create::MinBalance, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "create", + types::Create { id, admin, min_balance }, + [ + 208u8, 49u8, 18u8, 129u8, 207u8, 238u8, 192u8, 47u8, 139u8, 86u8, 78u8, + 41u8, 244u8, 56u8, 244u8, 63u8, 191u8, 157u8, 97u8, 199u8, 89u8, 243u8, + 146u8, 188u8, 103u8, 20u8, 244u8, 207u8, 177u8, 114u8, 180u8, 186u8, + ], + ) + } + #[doc = "Issue a new class of fungible assets from a privileged origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] + #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] + #[doc = "over this asset, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_create( + &self, + id: types::force_create::Id, + owner: types::force_create::Owner, + is_sufficient: types::force_create::IsSufficient, + min_balance: types::force_create::MinBalance, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "force_create", + types::ForceCreate { id, owner, is_sufficient, min_balance }, + [ + 166u8, 39u8, 43u8, 6u8, 142u8, 204u8, 19u8, 177u8, 213u8, 77u8, 153u8, + 14u8, 160u8, 23u8, 77u8, 79u8, 30u8, 126u8, 107u8, 92u8, 216u8, 244u8, + 195u8, 178u8, 8u8, 247u8, 63u8, 116u8, 205u8, 189u8, 148u8, 27u8, + ], + ) + } + #[doc = "Start the process of destroying a fungible asset class."] + #[doc = ""] + #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] + #[doc = "destruction of an asset class."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "The asset class must be frozen before calling `start_destroy`."] + pub fn start_destroy( + &self, + id: types::start_destroy::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "start_destroy", + types::StartDestroy { id }, + [ + 36u8, 72u8, 6u8, 145u8, 192u8, 32u8, 10u8, 242u8, 40u8, 2u8, 163u8, + 102u8, 214u8, 89u8, 25u8, 174u8, 20u8, 151u8, 224u8, 238u8, 117u8, + 94u8, 174u8, 58u8, 77u8, 73u8, 19u8, 15u8, 232u8, 60u8, 150u8, 1u8, + ], + ) + } + #[doc = "Destroy all accounts associated with a given asset."] + #[doc = ""] + #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedAccounts` event."] + pub fn destroy_accounts( + &self, + id: types::destroy_accounts::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "destroy_accounts", + types::DestroyAccounts { id }, + [ + 195u8, 7u8, 198u8, 206u8, 127u8, 210u8, 166u8, 3u8, 39u8, 199u8, 24u8, + 142u8, 239u8, 117u8, 217u8, 110u8, 125u8, 75u8, 89u8, 240u8, 180u8, + 96u8, 72u8, 136u8, 36u8, 10u8, 34u8, 196u8, 112u8, 131u8, 238u8, 121u8, + ], + ) + } + #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] + #[doc = ""] + #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedApprovals` event."] + pub fn destroy_approvals( + &self, + id: types::destroy_approvals::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "destroy_approvals", + types::DestroyApprovals { id }, + [ + 215u8, 174u8, 117u8, 99u8, 201u8, 118u8, 171u8, 136u8, 37u8, 121u8, + 209u8, 53u8, 154u8, 45u8, 28u8, 201u8, 186u8, 120u8, 4u8, 63u8, 142u8, + 222u8, 92u8, 245u8, 149u8, 219u8, 91u8, 186u8, 224u8, 173u8, 186u8, + 236u8, + ], + ) + } + #[doc = "Complete destroying asset and unreserve currency."] + #[doc = ""] + #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] + #[doc = "hand."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each successful call emits the `Event::Destroyed` event."] + pub fn finish_destroy( + &self, + id: types::finish_destroy::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "finish_destroy", + types::FinishDestroy { id }, + [ + 235u8, 198u8, 160u8, 5u8, 223u8, 83u8, 17u8, 160u8, 183u8, 81u8, 61u8, + 171u8, 23u8, 98u8, 39u8, 234u8, 65u8, 197u8, 193u8, 39u8, 175u8, 142u8, + 138u8, 169u8, 148u8, 136u8, 152u8, 75u8, 21u8, 33u8, 159u8, 221u8, + ], + ) + } + #[doc = "Mint assets of a particular class."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount minted."] + #[doc = "- `beneficiary`: The account to be credited with the minted assets."] + #[doc = "- `amount`: The amount of the asset to be minted."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] + pub fn mint( + &self, + id: types::mint::Id, + beneficiary: types::mint::Beneficiary, + amount: types::mint::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "mint", + types::Mint { id, beneficiary, amount }, + [ + 46u8, 234u8, 142u8, 134u8, 167u8, 112u8, 159u8, 124u8, 4u8, 75u8, + 219u8, 78u8, 18u8, 244u8, 150u8, 105u8, 185u8, 83u8, 222u8, 119u8, + 16u8, 82u8, 138u8, 202u8, 252u8, 48u8, 72u8, 251u8, 10u8, 66u8, 133u8, + 52u8, + ], + ) + } + #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] + #[doc = ""] + #[doc = "Bails with `NoAccount` if the `who` is already dead."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount burned."] + #[doc = "- `who`: The account to be debited from."] + #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] + #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] + pub fn burn( + &self, + id: types::burn::Id, + who: types::burn::Who, + amount: types::burn::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "burn", + types::Burn { id, who, amount }, + [ + 129u8, 19u8, 207u8, 124u8, 135u8, 51u8, 197u8, 213u8, 122u8, 16u8, + 116u8, 137u8, 156u8, 96u8, 190u8, 147u8, 124u8, 37u8, 211u8, 68u8, + 219u8, 251u8, 119u8, 131u8, 5u8, 232u8, 214u8, 76u8, 112u8, 74u8, 64u8, + 185u8, + ], + ) + } + #[doc = "Move some assets from the sender account to another."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + pub fn transfer( + &self, + id: types::transfer::Id, + target: types::transfer::Target, + amount: types::transfer::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "transfer", + types::Transfer { id, target, amount }, + [ + 87u8, 155u8, 32u8, 28u8, 113u8, 163u8, 192u8, 167u8, 135u8, 34u8, 50u8, + 57u8, 23u8, 219u8, 136u8, 196u8, 190u8, 139u8, 19u8, 132u8, 155u8, + 235u8, 242u8, 181u8, 201u8, 208u8, 145u8, 199u8, 29u8, 210u8, 102u8, + 150u8, + ], + ) + } + #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + pub fn transfer_keep_alive( + &self, + id: types::transfer_keep_alive::Id, + target: types::transfer_keep_alive::Target, + amount: types::transfer_keep_alive::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "transfer_keep_alive", + types::TransferKeepAlive { id, target, amount }, + [ + 123u8, 131u8, 176u8, 147u8, 52u8, 2u8, 105u8, 141u8, 206u8, 216u8, + 43u8, 169u8, 150u8, 131u8, 146u8, 210u8, 37u8, 133u8, 221u8, 155u8, + 74u8, 127u8, 166u8, 131u8, 122u8, 28u8, 255u8, 224u8, 4u8, 125u8, 43u8, + 116u8, + ], + ) + } + #[doc = "Move some assets from one account to another."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `source`: The account to be debited."] + #[doc = "- `dest`: The account to be credited."] + #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] + #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] + #[doc = "below the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] + #[doc = "`dest`."] + pub fn force_transfer( + &self, + id: types::force_transfer::Id, + source: types::force_transfer::Source, + dest: types::force_transfer::Dest, + amount: types::force_transfer::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "force_transfer", + types::ForceTransfer { id, source, dest, amount }, + [ + 135u8, 220u8, 220u8, 70u8, 132u8, 5u8, 91u8, 192u8, 37u8, 49u8, 170u8, + 1u8, 32u8, 63u8, 91u8, 80u8, 67u8, 230u8, 40u8, 112u8, 217u8, 68u8, + 116u8, 74u8, 158u8, 236u8, 88u8, 99u8, 216u8, 237u8, 30u8, 134u8, + ], + ) + } + #[doc = "Disallow further unprivileged transfers of an asset `id` from an account `who`. `who`"] + #[doc = "must already exist as an entry in `Account`s of the asset. If you want to freeze an"] + #[doc = "account that does not have an entry, use `touch_other` first."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn freeze( + &self, + id: types::freeze::Id, + who: types::freeze::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "freeze", + types::Freeze { id, who }, + [ + 117u8, 116u8, 226u8, 111u8, 184u8, 196u8, 32u8, 82u8, 10u8, 236u8, + 98u8, 146u8, 228u8, 41u8, 200u8, 80u8, 36u8, 215u8, 52u8, 154u8, 99u8, + 186u8, 73u8, 188u8, 2u8, 88u8, 106u8, 198u8, 101u8, 9u8, 103u8, 153u8, + ], + ) + } + #[doc = "Allow unprivileged transfers to and from an account again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be unfrozen."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn thaw( + &self, + id: types::thaw::Id, + who: types::thaw::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "thaw", + types::Thaw { id, who }, + [ + 1u8, 176u8, 121u8, 9u8, 44u8, 113u8, 75u8, 15u8, 167u8, 36u8, 121u8, + 144u8, 151u8, 238u8, 64u8, 48u8, 195u8, 119u8, 230u8, 187u8, 5u8, 43u8, + 14u8, 37u8, 183u8, 20u8, 225u8, 225u8, 173u8, 238u8, 236u8, 80u8, + ], + ) + } + #[doc = "Disallow further unprivileged transfers for the asset class."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn freeze_asset( + &self, + id: types::freeze_asset::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "freeze_asset", + types::FreezeAsset { id }, + [ + 189u8, 253u8, 85u8, 111u8, 106u8, 34u8, 124u8, 108u8, 39u8, 240u8, + 26u8, 83u8, 0u8, 110u8, 218u8, 93u8, 216u8, 82u8, 14u8, 5u8, 241u8, + 172u8, 15u8, 250u8, 220u8, 101u8, 196u8, 18u8, 214u8, 208u8, 149u8, + 148u8, + ], + ) + } + #[doc = "Allow unprivileged transfers for the asset again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn thaw_asset( + &self, + id: types::thaw_asset::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "thaw_asset", + types::ThawAsset { id }, + [ + 15u8, 56u8, 25u8, 188u8, 111u8, 220u8, 108u8, 41u8, 232u8, 254u8, 58u8, + 202u8, 249u8, 240u8, 2u8, 45u8, 128u8, 89u8, 116u8, 120u8, 24u8, 99u8, + 88u8, 99u8, 97u8, 254u8, 166u8, 174u8, 103u8, 23u8, 42u8, 74u8, + ], + ) + } + #[doc = "Change the Owner of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer_ownership( + &self, + id: types::transfer_ownership::Id, + owner: types::transfer_ownership::Owner, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "transfer_ownership", + types::TransferOwnership { id, owner }, + [ + 135u8, 103u8, 234u8, 191u8, 90u8, 8u8, 74u8, 85u8, 16u8, 219u8, 36u8, + 169u8, 20u8, 182u8, 36u8, 41u8, 90u8, 185u8, 108u8, 39u8, 172u8, 145u8, + 38u8, 33u8, 99u8, 228u8, 249u8, 172u8, 243u8, 116u8, 150u8, 183u8, + ], + ) + } + #[doc = "Change the Issuer, Admin and Freezer of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_team( + &self, + id: types::set_team::Id, + issuer: types::set_team::Issuer, + admin: types::set_team::Admin, + freezer: types::set_team::Freezer, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "set_team", + types::SetTeam { id, issuer, admin, freezer }, + [ + 10u8, 155u8, 117u8, 95u8, 203u8, 165u8, 234u8, 175u8, 85u8, 78u8, + 231u8, 0u8, 195u8, 76u8, 141u8, 167u8, 186u8, 243u8, 186u8, 207u8, + 190u8, 74u8, 134u8, 95u8, 212u8, 0u8, 111u8, 59u8, 113u8, 220u8, 131u8, + 251u8, + ], + ) + } + #[doc = "Set the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Funds of sender are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn set_metadata( + &self, + id: types::set_metadata::Id, + name: types::set_metadata::Name, + symbol: types::set_metadata::Symbol, + decimals: types::set_metadata::Decimals, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "set_metadata", + types::SetMetadata { id, name, symbol, decimals }, + [ + 53u8, 40u8, 19u8, 104u8, 202u8, 184u8, 183u8, 250u8, 2u8, 60u8, 232u8, + 140u8, 159u8, 97u8, 246u8, 139u8, 230u8, 111u8, 186u8, 159u8, 170u8, + 192u8, 205u8, 186u8, 96u8, 25u8, 89u8, 75u8, 230u8, 247u8, 181u8, + 211u8, + ], + ) + } + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Any deposit is freed for the asset owner."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn clear_metadata( + &self, + id: types::clear_metadata::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "clear_metadata", + types::ClearMetadata { id }, + [ + 137u8, 235u8, 66u8, 91u8, 5u8, 130u8, 150u8, 242u8, 209u8, 166u8, 32u8, + 157u8, 49u8, 158u8, 49u8, 199u8, 209u8, 107u8, 21u8, 125u8, 222u8, + 19u8, 41u8, 120u8, 207u8, 168u8, 5u8, 177u8, 171u8, 9u8, 176u8, 238u8, + ], + ) + } + #[doc = "Force the metadata for an asset to some value."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is left alone."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] + pub fn force_set_metadata( + &self, + id: types::force_set_metadata::Id, + name: types::force_set_metadata::Name, + symbol: types::force_set_metadata::Symbol, + decimals: types::force_set_metadata::Decimals, + is_frozen: types::force_set_metadata::IsFrozen, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "force_set_metadata", + types::ForceSetMetadata { id, name, symbol, decimals, is_frozen }, + [ + 177u8, 45u8, 247u8, 110u8, 214u8, 132u8, 130u8, 86u8, 46u8, 201u8, + 169u8, 19u8, 46u8, 89u8, 227u8, 114u8, 195u8, 46u8, 135u8, 216u8, + 202u8, 78u8, 182u8, 114u8, 126u8, 71u8, 34u8, 13u8, 48u8, 19u8, 99u8, + 192u8, + ], + ) + } + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is returned."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_clear_metadata( + &self, + id: types::force_clear_metadata::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "force_clear_metadata", + types::ForceClearMetadata { id }, + [ + 214u8, 13u8, 163u8, 168u8, 249u8, 152u8, 53u8, 201u8, 218u8, 161u8, + 23u8, 187u8, 48u8, 132u8, 66u8, 172u8, 118u8, 76u8, 229u8, 139u8, + 234u8, 64u8, 28u8, 86u8, 91u8, 155u8, 38u8, 136u8, 141u8, 136u8, 43u8, + 150u8, + ], + ) + } + #[doc = "Alter the attributes of a given asset."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] + #[doc = "value to account for the state bloat associated with its balance storage. If set to"] + #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] + #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] + #[doc = "growth)."] + #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_asset_status( + &self, + id: types::force_asset_status::Id, + owner: types::force_asset_status::Owner, + issuer: types::force_asset_status::Issuer, + admin: types::force_asset_status::Admin, + freezer: types::force_asset_status::Freezer, + min_balance: types::force_asset_status::MinBalance, + is_sufficient: types::force_asset_status::IsSufficient, + is_frozen: types::force_asset_status::IsFrozen, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "force_asset_status", + types::ForceAssetStatus { + id, + owner, + issuer, + admin, + freezer, + min_balance, + is_sufficient, + is_frozen, + }, + [ + 105u8, 154u8, 150u8, 105u8, 18u8, 84u8, 154u8, 171u8, 188u8, 113u8, + 52u8, 125u8, 8u8, 238u8, 196u8, 145u8, 163u8, 231u8, 12u8, 49u8, 143u8, + 99u8, 99u8, 25u8, 36u8, 123u8, 201u8, 23u8, 3u8, 53u8, 203u8, 171u8, + ], + ) + } + #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] + #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] + #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] + #[doc = "meet the right value."] + #[doc = ""] + #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] + #[doc = "making this call."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account to delegate permission to transfer asset."] + #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] + #[doc = "already an approval in place, then this acts additively."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn approve_transfer( + &self, + id: types::approve_transfer::Id, + delegate: types::approve_transfer::Delegate, + amount: types::approve_transfer::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "approve_transfer", + types::ApproveTransfer { id, delegate, amount }, + [ + 154u8, 68u8, 127u8, 59u8, 59u8, 72u8, 179u8, 103u8, 72u8, 240u8, 44u8, + 43u8, 153u8, 140u8, 109u8, 1u8, 255u8, 155u8, 52u8, 19u8, 45u8, 212u8, + 65u8, 66u8, 3u8, 49u8, 144u8, 23u8, 19u8, 175u8, 115u8, 230u8, + ], + ) + } + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place between signer and"] + #[doc = "`delegate`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn cancel_approval( + &self, + id: types::cancel_approval::Id, + delegate: types::cancel_approval::Delegate, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "cancel_approval", + types::CancelApproval { id, delegate }, + [ + 152u8, 186u8, 35u8, 86u8, 186u8, 3u8, 238u8, 219u8, 202u8, 29u8, 222u8, + 220u8, 117u8, 131u8, 49u8, 224u8, 155u8, 248u8, 60u8, 17u8, 142u8, + 72u8, 50u8, 92u8, 69u8, 152u8, 24u8, 210u8, 157u8, 145u8, 238u8, 135u8, + ], + ) + } + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] + #[doc = "account of the asset `id`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn force_cancel_approval( + &self, + id: types::force_cancel_approval::Id, + owner: types::force_cancel_approval::Owner, + delegate: types::force_cancel_approval::Delegate, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "force_cancel_approval", + types::ForceCancelApproval { id, owner, delegate }, + [ + 214u8, 56u8, 202u8, 108u8, 210u8, 190u8, 111u8, 254u8, 108u8, 85u8, + 77u8, 111u8, 229u8, 129u8, 85u8, 197u8, 186u8, 58u8, 217u8, 174u8, + 76u8, 244u8, 188u8, 124u8, 42u8, 149u8, 128u8, 190u8, 194u8, 209u8, + 51u8, 204u8, + ], + ) + } + #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] + #[doc = "account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] + #[doc = "signer."] + #[doc = ""] + #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] + #[doc = "reserved by `approve_transfer` is unreserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] + #[doc = "from which the asset balance will be withdrawn."] + #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] + #[doc = "- `amount`: The amount of assets to transfer."] + #[doc = ""] + #[doc = "Emits `TransferredApproved` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn transfer_approved( + &self, + id: types::transfer_approved::Id, + owner: types::transfer_approved::Owner, + destination: types::transfer_approved::Destination, + amount: types::transfer_approved::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "transfer_approved", + types::TransferApproved { id, owner, destination, amount }, + [ + 134u8, 20u8, 68u8, 106u8, 55u8, 127u8, 236u8, 253u8, 9u8, 247u8, 251u8, + 230u8, 164u8, 225u8, 15u8, 180u8, 96u8, 82u8, 182u8, 232u8, 239u8, 2u8, + 33u8, 244u8, 112u8, 26u8, 30u8, 242u8, 85u8, 249u8, 114u8, 75u8, + ], + ) + } + #[doc = "Create an asset account for non-provider assets."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] + #[doc = " to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + pub fn touch( + &self, + id: types::touch::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "touch", + types::Touch { id }, + [ + 93u8, 110u8, 255u8, 67u8, 63u8, 27u8, 179u8, 188u8, 189u8, 16u8, 207u8, + 50u8, 23u8, 89u8, 125u8, 220u8, 81u8, 173u8, 33u8, 242u8, 231u8, 211u8, + 212u8, 33u8, 135u8, 239u8, 198u8, 58u8, 24u8, 205u8, 236u8, 178u8, + ], + ) + } + #[doc = "Return the deposit (if any) of an asset account or a consumer reference (if any) of an"] + #[doc = "account."] + #[doc = ""] + #[doc = "The origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for which the caller would like the deposit"] + #[doc = " refunded."] + #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + pub fn refund( + &self, + id: types::refund::Id, + allow_burn: types::refund::AllowBurn, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "refund", + types::Refund { id, allow_burn }, + [ + 212u8, 171u8, 194u8, 110u8, 144u8, 125u8, 9u8, 224u8, 173u8, 44u8, + 146u8, 30u8, 7u8, 51u8, 82u8, 239u8, 18u8, 170u8, 66u8, 201u8, 148u8, + 189u8, 210u8, 218u8, 98u8, 166u8, 128u8, 77u8, 136u8, 151u8, 114u8, + 237u8, + ], + ) + } + #[doc = "Sets the minimum balance of an asset."] + #[doc = ""] + #[doc = "Only works if there aren't any accounts that are holding the asset or if"] + #[doc = "the new value of `min_balance` is less than the old one."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender has to be the Owner of the"] + #[doc = "asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `min_balance`: The new value of `min_balance`."] + #[doc = ""] + #[doc = "Emits `AssetMinBalanceChanged` event when successful."] + pub fn set_min_balance( + &self, + id: types::set_min_balance::Id, + min_balance: types::set_min_balance::MinBalance, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "set_min_balance", + types::SetMinBalance { id, min_balance }, + [ + 237u8, 126u8, 65u8, 131u8, 29u8, 64u8, 78u8, 86u8, 151u8, 18u8, 248u8, + 45u8, 25u8, 48u8, 219u8, 17u8, 211u8, 81u8, 53u8, 5u8, 17u8, 214u8, + 86u8, 143u8, 79u8, 200u8, 88u8, 147u8, 150u8, 103u8, 228u8, 253u8, + ], + ) + } + #[doc = "Create an asset account for `who`."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account"] + #[doc = " must have sufficient funds for a deposit to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = "- `who`: The account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + pub fn touch_other( + &self, + id: types::touch_other::Id, + who: types::touch_other::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "touch_other", + types::TouchOther { id, who }, + [ + 4u8, 90u8, 49u8, 84u8, 204u8, 249u8, 79u8, 140u8, 98u8, 103u8, 221u8, + 158u8, 98u8, 9u8, 117u8, 221u8, 19u8, 166u8, 39u8, 229u8, 70u8, 130u8, + 219u8, 150u8, 190u8, 239u8, 140u8, 36u8, 207u8, 86u8, 172u8, 220u8, + ], + ) + } + #[doc = "Return the deposit (if any) of a target asset account. Useful if you are the depositor."] + #[doc = ""] + #[doc = "The origin must be Signed and either the account owner, depositor, or asset `Admin`. In"] + #[doc = "order to burn a non-zero balance of the asset, the caller must be the account and should"] + #[doc = "use `refund`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] + #[doc = "- `who`: The account to refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + pub fn refund_other( + &self, + id: types::refund_other::Id, + who: types::refund_other::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "refund_other", + types::RefundOther { id, who }, + [ + 241u8, 92u8, 111u8, 163u8, 37u8, 185u8, 60u8, 48u8, 174u8, 96u8, 122u8, + 142u8, 159u8, 84u8, 96u8, 169u8, 149u8, 52u8, 206u8, 25u8, 85u8, 173u8, + 131u8, 148u8, 40u8, 215u8, 157u8, 161u8, 128u8, 181u8, 50u8, 175u8, + ], + ) + } + #[doc = "Disallow further unprivileged transfers of an asset `id` to and from an account `who`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the account's asset."] + #[doc = "- `who`: The account to be unblocked."] + #[doc = ""] + #[doc = "Emits `Blocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn block( + &self, + id: types::block::Id, + who: types::block::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Assets", + "block", + types::Block { id, who }, + [ + 92u8, 59u8, 111u8, 18u8, 78u8, 136u8, 38u8, 69u8, 217u8, 56u8, 115u8, + 167u8, 145u8, 241u8, 131u8, 202u8, 132u8, 55u8, 196u8, 54u8, 109u8, + 57u8, 175u8, 184u8, 70u8, 159u8, 19u8, 105u8, 57u8, 92u8, 237u8, 34u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_assets::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some asset class was created."] + pub struct Created { + pub asset_id: created::AssetId, + pub creator: created::Creator, + pub owner: created::Owner, + } + pub mod created { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Creator = ::subxt_core::utils::AccountId32; + pub type Owner = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Created { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Created"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some assets were issued."] + pub struct Issued { + pub asset_id: issued::AssetId, + pub owner: issued::Owner, + pub amount: issued::Amount, + } + pub mod issued { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Issued { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Issued"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some assets were transferred."] + pub struct Transferred { + pub asset_id: transferred::AssetId, + pub from: transferred::From, + pub to: transferred::To, + pub amount: transferred::Amount, + } + pub mod transferred { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type From = ::subxt_core::utils::AccountId32; + pub type To = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Transferred { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Transferred"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some assets were destroyed."] + pub struct Burned { + pub asset_id: burned::AssetId, + pub owner: burned::Owner, + pub balance: burned::Balance, + } + pub mod burned { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type Balance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Burned { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Burned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The management team changed."] + pub struct TeamChanged { + pub asset_id: team_changed::AssetId, + pub issuer: team_changed::Issuer, + pub admin: team_changed::Admin, + pub freezer: team_changed::Freezer, + } + pub mod team_changed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Issuer = ::subxt_core::utils::AccountId32; + pub type Admin = ::subxt_core::utils::AccountId32; + pub type Freezer = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for TeamChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "TeamChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The owner changed."] + pub struct OwnerChanged { + pub asset_id: owner_changed::AssetId, + pub owner: owner_changed::Owner, + } + pub mod owner_changed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OwnerChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "OwnerChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some account `who` was frozen."] + pub struct Frozen { + pub asset_id: frozen::AssetId, + pub who: frozen::Who, + } + pub mod frozen { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Frozen { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Frozen"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some account `who` was thawed."] + pub struct Thawed { + pub asset_id: thawed::AssetId, + pub who: thawed::Who, + } + pub mod thawed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Thawed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Thawed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some asset `asset_id` was frozen."] + pub struct AssetFrozen { + pub asset_id: asset_frozen::AssetId, + } + pub mod asset_frozen { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for AssetFrozen { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetFrozen"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some asset `asset_id` was thawed."] + pub struct AssetThawed { + pub asset_id: asset_thawed::AssetId, + } + pub mod asset_thawed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for AssetThawed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetThawed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Accounts were destroyed for given asset."] + pub struct AccountsDestroyed { + pub asset_id: accounts_destroyed::AssetId, + pub accounts_destroyed: accounts_destroyed::AccountsDestroyed, + pub accounts_remaining: accounts_destroyed::AccountsRemaining, + } + pub mod accounts_destroyed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type AccountsDestroyed = ::core::primitive::u32; + pub type AccountsRemaining = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for AccountsDestroyed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AccountsDestroyed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Approvals were destroyed for given asset."] + pub struct ApprovalsDestroyed { + pub asset_id: approvals_destroyed::AssetId, + pub approvals_destroyed: approvals_destroyed::ApprovalsDestroyed, + pub approvals_remaining: approvals_destroyed::ApprovalsRemaining, + } + pub mod approvals_destroyed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type ApprovalsDestroyed = ::core::primitive::u32; + pub type ApprovalsRemaining = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for ApprovalsDestroyed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ApprovalsDestroyed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An asset class is in the process of being destroyed."] + pub struct DestructionStarted { + pub asset_id: destruction_started::AssetId, + } + pub mod destruction_started { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for DestructionStarted { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "DestructionStarted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An asset class was destroyed."] + pub struct Destroyed { + pub asset_id: destroyed::AssetId, + } + pub mod destroyed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Destroyed { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Destroyed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some asset class was force-created."] + pub struct ForceCreated { + pub asset_id: force_created::AssetId, + pub owner: force_created::Owner, + } + pub mod force_created { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for ForceCreated { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ForceCreated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "New metadata has been set for an asset."] + pub struct MetadataSet { + pub asset_id: metadata_set::AssetId, + pub name: metadata_set::Name, + pub symbol: metadata_set::Symbol, + pub decimals: metadata_set::Decimals, + pub is_frozen: metadata_set::IsFrozen, + } + pub mod metadata_set { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Name = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Symbol = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Decimals = ::core::primitive::u8; + pub type IsFrozen = ::core::primitive::bool; + } + impl ::subxt_core::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "MetadataSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Metadata has been cleared for an asset."] + pub struct MetadataCleared { + pub asset_id: metadata_cleared::AssetId, + } + pub mod metadata_cleared { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "MetadataCleared"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "(Additional) funds have been approved for transfer to a destination account."] + pub struct ApprovedTransfer { + pub asset_id: approved_transfer::AssetId, + pub source: approved_transfer::Source, + pub delegate: approved_transfer::Delegate, + pub amount: approved_transfer::Amount, + } + pub mod approved_transfer { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Source = ::subxt_core::utils::AccountId32; + pub type Delegate = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for ApprovedTransfer { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ApprovedTransfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An approval for account `delegate` was cancelled by `owner`."] + pub struct ApprovalCancelled { + pub asset_id: approval_cancelled::AssetId, + pub owner: approval_cancelled::Owner, + pub delegate: approval_cancelled::Delegate, + } + pub mod approval_cancelled { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type Delegate = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for ApprovalCancelled { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "ApprovalCancelled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] + #[doc = "the approved `delegate`."] + pub struct TransferredApproved { + pub asset_id: transferred_approved::AssetId, + pub owner: transferred_approved::Owner, + pub delegate: transferred_approved::Delegate, + pub destination: transferred_approved::Destination, + pub amount: transferred_approved::Amount, + } + pub mod transferred_approved { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type Delegate = ::subxt_core::utils::AccountId32; + pub type Destination = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for TransferredApproved { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "TransferredApproved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An asset has had its attributes changed by the `Force` origin."] + pub struct AssetStatusChanged { + pub asset_id: asset_status_changed::AssetId, + } + pub mod asset_status_changed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for AssetStatusChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetStatusChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The min_balance of an asset has been updated by the asset owner."] + pub struct AssetMinBalanceChanged { + pub asset_id: asset_min_balance_changed::AssetId, + pub new_min_balance: asset_min_balance_changed::NewMinBalance, + } + pub mod asset_min_balance_changed { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type NewMinBalance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for AssetMinBalanceChanged { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "AssetMinBalanceChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some account `who` was created with a deposit from `depositor`."] + pub struct Touched { + pub asset_id: touched::AssetId, + pub who: touched::Who, + pub depositor: touched::Depositor, + } + pub mod touched { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Depositor = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Touched { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Touched"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some account `who` was blocked."] + pub struct Blocked { + pub asset_id: blocked::AssetId, + pub who: blocked::Who, + } + pub mod blocked { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Blocked { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Blocked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some assets were deposited (e.g. for transaction fees)."] + pub struct Deposited { + pub asset_id: deposited::AssetId, + pub who: deposited::Who, + pub amount: deposited::Amount, + } + pub mod deposited { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Deposited { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Deposited"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some assets were withdrawn from the account (e.g. for transaction fees)."] + pub struct Withdrawn { + pub asset_id: withdrawn::AssetId, + pub who: withdrawn::Who, + pub amount: withdrawn::Amount, + } + pub mod withdrawn { + use super::runtime_types; + pub type AssetId = ::core::primitive::u128; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "Assets"; + const EVENT: &'static str = "Withdrawn"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod asset { + use super::runtime_types; + pub type Asset = runtime_types::pallet_assets::types::AssetDetails< + ::core::primitive::u128, + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u128; + } + pub mod account { + use super::runtime_types; + pub type Account = runtime_types::pallet_assets::types::AssetAccount< + ::core::primitive::u128, + ::core::primitive::u128, + (), + ::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::core::primitive::u128; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod approvals { + use super::runtime_types; + pub type Approvals = runtime_types::pallet_assets::types::Approval< + ::core::primitive::u128, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u128; + pub type Param1 = ::subxt_core::utils::AccountId32; + pub type Param2 = ::subxt_core::utils::AccountId32; + } + pub mod metadata { + use super::runtime_types; + pub type Metadata = runtime_types::pallet_assets::types::AssetMetadata< + ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >; + pub type Param0 = ::core::primitive::u128; + } + pub mod next_asset_id { + use super::runtime_types; + pub type NextAssetId = ::core::primitive::u128; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Details of an asset."] + pub fn asset_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::asset::Asset, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Asset", + (), + [ + 184u8, 117u8, 212u8, 54u8, 227u8, 128u8, 105u8, 48u8, 129u8, 209u8, + 93u8, 65u8, 239u8, 81u8, 138u8, 169u8, 70u8, 73u8, 193u8, 150u8, 58u8, + 232u8, 103u8, 171u8, 200u8, 131u8, 19u8, 81u8, 197u8, 69u8, 242u8, + 19u8, + ], + ) + } + #[doc = " Details of an asset."] + pub fn asset( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::asset::Asset, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Asset", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 184u8, 117u8, 212u8, 54u8, 227u8, 128u8, 105u8, 48u8, 129u8, 209u8, + 93u8, 65u8, 239u8, 81u8, 138u8, 169u8, 70u8, 73u8, 193u8, 150u8, 58u8, + 232u8, 103u8, 171u8, 200u8, 131u8, 19u8, 81u8, 197u8, 69u8, 242u8, + 19u8, + ], + ) + } + #[doc = " The holdings of a specific account for a specific asset."] + pub fn account_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account::Account, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Account", + (), + [ + 193u8, 248u8, 7u8, 31u8, 182u8, 62u8, 151u8, 45u8, 186u8, 167u8, 187u8, + 86u8, 254u8, 71u8, 30u8, 36u8, 169u8, 145u8, 195u8, 93u8, 76u8, 108u8, + 179u8, 129u8, 178u8, 9u8, 253u8, 27u8, 165u8, 16u8, 248u8, 254u8, + ], + ) + } + #[doc = " The holdings of a specific account for a specific asset."] + pub fn account_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::account::Account, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Account", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 193u8, 248u8, 7u8, 31u8, 182u8, 62u8, 151u8, 45u8, 186u8, 167u8, 187u8, + 86u8, 254u8, 71u8, 30u8, 36u8, 169u8, 145u8, 195u8, 93u8, 76u8, 108u8, + 179u8, 129u8, 178u8, 9u8, 253u8, 27u8, 165u8, 16u8, 248u8, 254u8, + ], + ) + } + #[doc = " The holdings of a specific account for a specific asset."] + pub fn account( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::account::Account, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Account", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 193u8, 248u8, 7u8, 31u8, 182u8, 62u8, 151u8, 45u8, 186u8, 167u8, 187u8, + 86u8, 254u8, 71u8, 30u8, 36u8, 169u8, 145u8, 195u8, 93u8, 76u8, 108u8, + 179u8, 129u8, 178u8, 9u8, 253u8, 27u8, 165u8, 16u8, 248u8, 254u8, + ], + ) + } + #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] + #[doc = " is the amount of `T::Currency` reserved for storing this."] + #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] + pub fn approvals_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::approvals::Approvals, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Approvals", + (), + [ + 88u8, 12u8, 250u8, 89u8, 74u8, 8u8, 18u8, 23u8, 160u8, 172u8, 27u8, + 182u8, 30u8, 140u8, 109u8, 106u8, 158u8, 104u8, 53u8, 86u8, 112u8, + 252u8, 195u8, 113u8, 69u8, 121u8, 239u8, 54u8, 242u8, 51u8, 181u8, + 176u8, + ], + ) + } + #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] + #[doc = " is the amount of `T::Currency` reserved for storing this."] + #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] + pub fn approvals_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::approvals::Approvals, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Approvals", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 88u8, 12u8, 250u8, 89u8, 74u8, 8u8, 18u8, 23u8, 160u8, 172u8, 27u8, + 182u8, 30u8, 140u8, 109u8, 106u8, 158u8, 104u8, 53u8, 86u8, 112u8, + 252u8, 195u8, 113u8, 69u8, 121u8, 239u8, 54u8, 242u8, 51u8, 181u8, + 176u8, + ], + ) + } + #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] + #[doc = " is the amount of `T::Currency` reserved for storing this."] + #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] + pub fn approvals_iter2( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::approvals::Approvals, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Approvals", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 88u8, 12u8, 250u8, 89u8, 74u8, 8u8, 18u8, 23u8, 160u8, 172u8, 27u8, + 182u8, 30u8, 140u8, 109u8, 106u8, 158u8, 104u8, 53u8, 86u8, 112u8, + 252u8, 195u8, 113u8, 69u8, 121u8, 239u8, 54u8, 242u8, 51u8, 181u8, + 176u8, + ], + ) + } + #[doc = " Approved balance transfers. First balance is the amount approved for transfer. Second"] + #[doc = " is the amount of `T::Currency` reserved for storing this."] + #[doc = " First key is the asset ID, second key is the owner and third key is the delegate."] + pub fn approvals( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + _2: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::approvals::Approvals, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Approvals", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_2.borrow()), + ), + [ + 88u8, 12u8, 250u8, 89u8, 74u8, 8u8, 18u8, 23u8, 160u8, 172u8, 27u8, + 182u8, 30u8, 140u8, 109u8, 106u8, 158u8, 104u8, 53u8, 86u8, 112u8, + 252u8, 195u8, 113u8, 69u8, 121u8, 239u8, 54u8, 242u8, 51u8, 181u8, + 176u8, + ], + ) + } + #[doc = " Metadata of an asset."] + pub fn metadata_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::metadata::Metadata, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Metadata", + (), + [ + 9u8, 154u8, 67u8, 209u8, 73u8, 219u8, 203u8, 105u8, 197u8, 101u8, + 174u8, 94u8, 37u8, 239u8, 121u8, 52u8, 186u8, 127u8, 29u8, 182u8, 32u8, + 21u8, 49u8, 140u8, 135u8, 144u8, 231u8, 73u8, 33u8, 158u8, 27u8, 241u8, + ], + ) + } + #[doc = " Metadata of an asset."] + pub fn metadata( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::metadata::Metadata, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "Metadata", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 9u8, 154u8, 67u8, 209u8, 73u8, 219u8, 203u8, 105u8, 197u8, 101u8, + 174u8, 94u8, 37u8, 239u8, 121u8, 52u8, 186u8, 127u8, 29u8, 182u8, 32u8, + 21u8, 49u8, 140u8, 135u8, 144u8, 231u8, 73u8, 33u8, 158u8, 27u8, 241u8, + ], + ) + } + #[doc = " The asset ID enforced for the next asset creation, if any present. Otherwise, this storage"] + #[doc = " item has no effect."] + #[doc = ""] + #[doc = " This can be useful for setting up constraints for IDs of the new assets. For example, by"] + #[doc = " providing an initial [`NextAssetId`] and using the [`crate::AutoIncAssetId`] callback, an"] + #[doc = " auto-increment model can be applied to all new asset IDs."] + #[doc = ""] + #[doc = " The initial next asset ID can be set using the [`GenesisConfig`] or the"] + #[doc = " [SetNextAssetId](`migration::next_asset_id::SetNextAssetId`) migration."] + pub fn next_asset_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_asset_id::NextAssetId, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Assets", + "NextAssetId", + (), + [ + 153u8, 224u8, 246u8, 219u8, 165u8, 1u8, 83u8, 64u8, 55u8, 54u8, 89u8, + 6u8, 24u8, 50u8, 62u8, 114u8, 164u8, 157u8, 105u8, 150u8, 218u8, 100u8, + 15u8, 161u8, 33u8, 43u8, 27u8, 217u8, 212u8, 111u8, 11u8, 104u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call."] + #[doc = ""] + #[doc = " Must be configured to result in a weight that makes each call fit in a block."] + pub fn remove_items_limit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "RemoveItemsLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The basic amount of funds that must be reserved for an asset."] + pub fn asset_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "AssetDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of funds that must be reserved for a non-provider asset account to be"] + #[doc = " maintained."] + pub fn asset_account_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "AssetAccountDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The basic amount of funds that must be reserved when adding metadata to your asset."] + pub fn metadata_deposit_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "MetadataDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The additional funds that must be reserved for the number of bytes you store in your"] + #[doc = " metadata."] + pub fn metadata_deposit_per_byte( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "MetadataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of funds that must be reserved when creating a new approval."] + pub fn approval_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "ApprovalDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum length of a name or symbol stored on-chain."] + pub fn string_limit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Assets", + "StringLimit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod balances { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_balances::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_balances::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Transfer some liquid free balance to another account."] + #[doc = ""] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] + #[doc = "If the sender's account is below the existential deposit as a result"] + #[doc = "of the transfer, the account will be reaped."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] + pub struct TransferAllowDeath { + pub dest: transfer_allow_death::Dest, + #[codec(compact)] + pub value: transfer_allow_death::Value, + } + pub mod transfer_allow_death { + use super::runtime_types; + pub type Dest = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for TransferAllowDeath { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "transfer_allow_death"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] + pub struct ForceTransfer { + pub source: force_transfer::Source, + pub dest: force_transfer::Dest, + #[codec(compact)] + pub value: force_transfer::Value, + } + pub mod force_transfer { + use super::runtime_types; + pub type Source = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Dest = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceTransfer { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] + #[doc = ""] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] + #[doc = ""] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] + pub struct TransferKeepAlive { + pub dest: transfer_keep_alive::Dest, + #[codec(compact)] + pub value: transfer_keep_alive::Value, + } + pub mod transfer_keep_alive { + use super::runtime_types; + pub type Dest = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for TransferKeepAlive { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "transfer_keep_alive"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Transfer the entire transferable balance from the caller account."] + #[doc = ""] + #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] + #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] + #[doc = "transferred by this function. To ensure that this function results in a killed account,"] + #[doc = "you might need to prepare the account by removing any reference counters, storage"] + #[doc = "deposits, etc..."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be Signed."] + #[doc = ""] + #[doc = "- `dest`: The recipient of the transfer."] + #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] + #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] + #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] + #[doc = " keep the sender account alive (true)."] + pub struct TransferAll { + pub dest: transfer_all::Dest, + pub keep_alive: transfer_all::KeepAlive, + } + pub mod transfer_all { + use super::runtime_types; + pub type Dest = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type KeepAlive = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for TransferAll { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "transfer_all"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unreserve some balance from a user by force."] + #[doc = ""] + #[doc = "Can only be called by ROOT."] + pub struct ForceUnreserve { + pub who: force_unreserve::Who, + pub amount: force_unreserve::Amount, + } + pub mod force_unreserve { + use super::runtime_types; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceUnreserve { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_unreserve"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibility of churn)."] + pub struct UpgradeAccounts { + pub who: upgrade_accounts::Who, + } + pub mod upgrade_accounts { + use super::runtime_types; + pub type Who = ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for UpgradeAccounts { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "upgrade_accounts"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + pub struct ForceSetBalance { + pub who: force_set_balance::Who, + #[codec(compact)] + pub new_free: force_set_balance::NewFree, + } + pub mod force_set_balance { + use super::runtime_types; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type NewFree = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceSetBalance { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_set_balance"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Adjust the total issuance in a saturating way."] + #[doc = ""] + #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = ""] + #[doc = "# Example"] + pub struct ForceAdjustTotalIssuance { + pub direction: force_adjust_total_issuance::Direction, + #[codec(compact)] + pub delta: force_adjust_total_issuance::Delta, + } + pub mod force_adjust_total_issuance { + use super::runtime_types; + pub type Direction = runtime_types::pallet_balances::types::AdjustmentDirection; + pub type Delta = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceAdjustTotalIssuance { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "force_adjust_total_issuance"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = ""] + #[doc = "If the origin's account ends up below the existential deposit as a result"] + #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = ""] + #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] + #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] + pub struct Burn { + #[codec(compact)] + pub value: burn::Value, + pub keep_alive: burn::KeepAlive, + } + pub mod burn { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + pub type KeepAlive = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for Burn { + const PALLET: &'static str = "Balances"; + const CALL: &'static str = "burn"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Transfer some liquid free balance to another account."] + #[doc = ""] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] + #[doc = "If the sender's account is below the existential deposit as a result"] + #[doc = "of the transfer, the account will be reaped."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] + pub fn transfer_allow_death( + &self, + dest: types::transfer_allow_death::Dest, + value: types::transfer_allow_death::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "transfer_allow_death", + types::TransferAllowDeath { dest, value }, + [ + 24u8, 176u8, 111u8, 60u8, 103u8, 161u8, 139u8, 10u8, 197u8, 207u8, + 140u8, 212u8, 166u8, 50u8, 47u8, 150u8, 83u8, 180u8, 86u8, 4u8, 159u8, + 84u8, 195u8, 71u8, 204u8, 109u8, 233u8, 23u8, 10u8, 156u8, 209u8, + 153u8, + ], + ) + } + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] + pub fn force_transfer( + &self, + source: types::force_transfer::Source, + dest: types::force_transfer::Dest, + value: types::force_transfer::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_transfer", + types::ForceTransfer { source, dest, value }, + [ + 23u8, 7u8, 44u8, 138u8, 180u8, 140u8, 216u8, 52u8, 198u8, 3u8, 225u8, + 116u8, 47u8, 26u8, 61u8, 163u8, 55u8, 64u8, 113u8, 250u8, 192u8, 16u8, + 228u8, 228u8, 85u8, 255u8, 100u8, 128u8, 245u8, 132u8, 84u8, 186u8, + ], + ) + } + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] + #[doc = ""] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] + #[doc = ""] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] + pub fn transfer_keep_alive( + &self, + dest: types::transfer_keep_alive::Dest, + value: types::transfer_keep_alive::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "transfer_keep_alive", + types::TransferKeepAlive { dest, value }, + [ + 196u8, 51u8, 121u8, 239u8, 68u8, 97u8, 174u8, 26u8, 21u8, 9u8, 111u8, + 224u8, 189u8, 35u8, 106u8, 30u8, 83u8, 184u8, 234u8, 174u8, 27u8, + 197u8, 40u8, 126u8, 197u8, 92u8, 201u8, 253u8, 144u8, 175u8, 8u8, + 215u8, + ], + ) + } + #[doc = "Transfer the entire transferable balance from the caller account."] + #[doc = ""] + #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] + #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] + #[doc = "transferred by this function. To ensure that this function results in a killed account,"] + #[doc = "you might need to prepare the account by removing any reference counters, storage"] + #[doc = "deposits, etc..."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be Signed."] + #[doc = ""] + #[doc = "- `dest`: The recipient of the transfer."] + #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] + #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] + #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] + #[doc = " keep the sender account alive (true)."] + pub fn transfer_all( + &self, + dest: types::transfer_all::Dest, + keep_alive: types::transfer_all::KeepAlive, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "transfer_all", + types::TransferAll { dest, keep_alive }, + [ + 13u8, 46u8, 127u8, 231u8, 179u8, 61u8, 45u8, 188u8, 195u8, 251u8, + 146u8, 25u8, 138u8, 19u8, 52u8, 112u8, 148u8, 241u8, 134u8, 145u8, + 97u8, 9u8, 199u8, 172u8, 229u8, 239u8, 67u8, 185u8, 128u8, 36u8, 134u8, + 122u8, + ], + ) + } + #[doc = "Unreserve some balance from a user by force."] + #[doc = ""] + #[doc = "Can only be called by ROOT."] + pub fn force_unreserve( + &self, + who: types::force_unreserve::Who, + amount: types::force_unreserve::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_unreserve", + types::ForceUnreserve { who, amount }, + [ + 176u8, 105u8, 20u8, 111u8, 49u8, 253u8, 22u8, 225u8, 0u8, 81u8, 221u8, + 39u8, 62u8, 22u8, 95u8, 12u8, 21u8, 251u8, 179u8, 31u8, 104u8, 23u8, + 34u8, 216u8, 119u8, 205u8, 133u8, 196u8, 182u8, 113u8, 36u8, 93u8, + ], + ) + } + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibility of churn)."] + pub fn upgrade_accounts( + &self, + who: types::upgrade_accounts::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "upgrade_accounts", + types::UpgradeAccounts { who }, + [ + 66u8, 200u8, 179u8, 104u8, 65u8, 2u8, 101u8, 56u8, 130u8, 161u8, 224u8, + 233u8, 255u8, 124u8, 70u8, 122u8, 8u8, 49u8, 103u8, 178u8, 68u8, 47u8, + 214u8, 166u8, 217u8, 116u8, 178u8, 50u8, 212u8, 164u8, 98u8, 226u8, + ], + ) + } + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + pub fn force_set_balance( + &self, + who: types::force_set_balance::Who, + new_free: types::force_set_balance::NewFree, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_set_balance", + types::ForceSetBalance { who, new_free }, + [ + 101u8, 181u8, 86u8, 32u8, 61u8, 75u8, 34u8, 164u8, 142u8, 250u8, 7u8, + 218u8, 125u8, 57u8, 98u8, 222u8, 147u8, 26u8, 115u8, 185u8, 190u8, + 172u8, 12u8, 212u8, 132u8, 80u8, 253u8, 69u8, 26u8, 116u8, 197u8, + 203u8, + ], + ) + } + #[doc = "Adjust the total issuance in a saturating way."] + #[doc = ""] + #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = ""] + #[doc = "# Example"] + pub fn force_adjust_total_issuance( + &self, + direction: types::force_adjust_total_issuance::Direction, + delta: types::force_adjust_total_issuance::Delta, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "force_adjust_total_issuance", + types::ForceAdjustTotalIssuance { direction, delta }, + [ + 208u8, 134u8, 56u8, 133u8, 232u8, 164u8, 10u8, 213u8, 53u8, 193u8, + 190u8, 63u8, 236u8, 186u8, 96u8, 122u8, 104u8, 87u8, 173u8, 38u8, 58u8, + 176u8, 21u8, 78u8, 42u8, 106u8, 46u8, 248u8, 251u8, 190u8, 150u8, + 202u8, + ], + ) + } + #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = ""] + #[doc = "If the origin's account ends up below the existential deposit as a result"] + #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = ""] + #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] + #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] + pub fn burn( + &self, + value: types::burn::Value, + keep_alive: types::burn::KeepAlive, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Balances", + "burn", + types::Burn { value, keep_alive }, + [ + 176u8, 64u8, 7u8, 109u8, 16u8, 44u8, 145u8, 125u8, 147u8, 152u8, 130u8, + 114u8, 221u8, 201u8, 150u8, 162u8, 118u8, 71u8, 52u8, 92u8, 240u8, + 116u8, 203u8, 98u8, 5u8, 22u8, 43u8, 102u8, 94u8, 208u8, 101u8, 57u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_balances::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account was created with some free balance."] + pub struct Endowed { + pub account: endowed::Account, + pub free_balance: endowed::FreeBalance, + } + pub mod endowed { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type FreeBalance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Endowed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Endowed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] + #[doc = "resulting in an outright loss."] + pub struct DustLost { + pub account: dust_lost::Account, + pub amount: dust_lost::Amount, + } + pub mod dust_lost { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for DustLost { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "DustLost"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Transfer succeeded."] + pub struct Transfer { + pub from: transfer::From, + pub to: transfer::To, + pub amount: transfer::Amount, + } + pub mod transfer { + use super::runtime_types; + pub type From = ::subxt_core::utils::AccountId32; + pub type To = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Transfer { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A balance was set by root."] + pub struct BalanceSet { + pub who: balance_set::Who, + pub free: balance_set::Free, + } + pub mod balance_set { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Free = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for BalanceSet { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "BalanceSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was reserved (moved from free to reserved)."] + pub struct Reserved { + pub who: reserved::Who, + pub amount: reserved::Amount, + } + pub mod reserved { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Reserved { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Reserved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was unreserved (moved from reserved to free)."] + pub struct Unreserved { + pub who: unreserved::Who, + pub amount: unreserved::Amount, + } + pub mod unreserved { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Unreserved { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Unreserved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was moved from the reserve of the first account to the second account."] + #[doc = "Final argument indicates the destination balance type."] + pub struct ReserveRepatriated { + pub from: reserve_repatriated::From, + pub to: reserve_repatriated::To, + pub amount: reserve_repatriated::Amount, + pub destination_status: reserve_repatriated::DestinationStatus, + } + pub mod reserve_repatriated { + use super::runtime_types; + pub type From = ::subxt_core::utils::AccountId32; + pub type To = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type DestinationStatus = + runtime_types::frame_support::traits::tokens::misc::BalanceStatus; + } + impl ::subxt_core::events::StaticEvent for ReserveRepatriated { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "ReserveRepatriated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was deposited (e.g. for transaction fees)."] + pub struct Deposit { + pub who: deposit::Who, + pub amount: deposit::Amount, + } + pub mod deposit { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Deposit { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Deposit"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] + pub struct Withdraw { + pub who: withdraw::Who, + pub amount: withdraw::Amount, + } + pub mod withdraw { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Withdraw { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Withdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] + pub struct Slashed { + pub who: slashed::Who, + pub amount: slashed::Amount, + } + pub mod slashed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Slashed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Slashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was minted into an account."] + pub struct Minted { + pub who: minted::Who, + pub amount: minted::Amount, + } + pub mod minted { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Minted { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Minted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was burned from an account."] + pub struct Burned { + pub who: burned::Who, + pub amount: burned::Amount, + } + pub mod burned { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Burned { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Burned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was suspended from an account (it can be restored later)."] + pub struct Suspended { + pub who: suspended::Who, + pub amount: suspended::Amount, + } + pub mod suspended { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Suspended { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Suspended"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some amount was restored into an account."] + pub struct Restored { + pub who: restored::Who, + pub amount: restored::Amount, + } + pub mod restored { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Restored { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Restored"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account was upgraded."] + pub struct Upgraded { + pub who: upgraded::Who, + } + pub mod upgraded { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Upgraded { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Upgraded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] + pub struct Issued { + pub amount: issued::Amount, + } + pub mod issued { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Issued { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Issued"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] + pub struct Rescinded { + pub amount: rescinded::Amount, + } + pub mod rescinded { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Rescinded { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Rescinded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was locked."] + pub struct Locked { + pub who: locked::Who, + pub amount: locked::Amount, + } + pub mod locked { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Locked { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Locked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was unlocked."] + pub struct Unlocked { + pub who: unlocked::Who, + pub amount: unlocked::Amount, + } + pub mod unlocked { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Unlocked { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Unlocked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was frozen."] + pub struct Frozen { + pub who: frozen::Who, + pub amount: frozen::Amount, + } + pub mod frozen { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Frozen { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Frozen"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some balance was thawed."] + pub struct Thawed { + pub who: thawed::Who, + pub amount: thawed::Amount, + } + pub mod thawed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Thawed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Thawed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `TotalIssuance` was forcefully changed."] + pub struct TotalIssuanceForced { + pub old: total_issuance_forced::Old, + pub new: total_issuance_forced::New, + } + pub mod total_issuance_forced { + use super::runtime_types; + pub type Old = ::core::primitive::u128; + pub type New = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for TotalIssuanceForced { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "TotalIssuanceForced"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod total_issuance { + use super::runtime_types; + pub type TotalIssuance = ::core::primitive::u128; + } + pub mod inactive_issuance { + use super::runtime_types; + pub type InactiveIssuance = ::core::primitive::u128; + } + pub mod account { + use super::runtime_types; + pub type Account = + runtime_types::pallet_balances::types::AccountData<::core::primitive::u128>; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod locks { + use super::runtime_types; + pub type Locks = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_balances::types::BalanceLock< + ::core::primitive::u128, + >, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod reserves { + use super::runtime_types; + pub type Reserves = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_balances::types::ReserveData< + [::core::primitive::u8; 8usize], + ::core::primitive::u128, + >, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod holds { + use super::runtime_types; + pub type Holds = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::frame_support::traits::tokens::misc::IdAmount< + runtime_types::tangle_testnet_runtime::RuntimeHoldReason, + ::core::primitive::u128, + >, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod freezes { + use super::runtime_types; + pub type Freezes = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::frame_support::traits::tokens::misc::IdAmount< + runtime_types::tangle_testnet_runtime::RuntimeFreezeReason, + ::core::primitive::u128, + >, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The total units issued in the system."] + pub fn total_issuance( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::total_issuance::TotalIssuance, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "TotalIssuance", + (), + [ + 116u8, 70u8, 119u8, 194u8, 69u8, 37u8, 116u8, 206u8, 171u8, 70u8, + 171u8, 210u8, 226u8, 111u8, 184u8, 204u8, 206u8, 11u8, 68u8, 72u8, + 255u8, 19u8, 194u8, 11u8, 27u8, 194u8, 81u8, 204u8, 59u8, 224u8, 202u8, + 185u8, + ], + ) + } + #[doc = " The total units of outstanding deactivated balance in the system."] + pub fn inactive_issuance( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::inactive_issuance::InactiveIssuance, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "InactiveIssuance", + (), + [ + 212u8, 185u8, 19u8, 50u8, 250u8, 72u8, 173u8, 50u8, 4u8, 104u8, 161u8, + 249u8, 77u8, 247u8, 204u8, 248u8, 11u8, 18u8, 57u8, 4u8, 82u8, 110u8, + 30u8, 216u8, 16u8, 37u8, 87u8, 67u8, 189u8, 235u8, 214u8, 155u8, + ], + ) + } + #[doc = " The Balances pallet example of storing the balance of an account."] + #[doc = ""] + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " You can also store the balance of an account in the `System` pallet."] + #[doc = ""] + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = System"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] + #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] + #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] + #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] + pub fn account_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account::Account, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Account", + (), + [ + 213u8, 38u8, 200u8, 69u8, 218u8, 0u8, 112u8, 181u8, 160u8, 23u8, 96u8, + 90u8, 3u8, 88u8, 126u8, 22u8, 103u8, 74u8, 64u8, 69u8, 29u8, 247u8, + 18u8, 17u8, 234u8, 143u8, 189u8, 22u8, 247u8, 194u8, 154u8, 249u8, + ], + ) + } + #[doc = " The Balances pallet example of storing the balance of an account."] + #[doc = ""] + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " You can also store the balance of an account in the `System` pallet."] + #[doc = ""] + #[doc = " # Example"] + #[doc = ""] + #[doc = " ```nocompile"] + #[doc = " impl pallet_balances::Config for Runtime {"] + #[doc = " type AccountStore = System"] + #[doc = " }"] + #[doc = " ```"] + #[doc = ""] + #[doc = " But this comes with tradeoffs, storing account balances in the system pallet stores"] + #[doc = " `frame_system` data alongside the account data contrary to storing account balances in the"] + #[doc = " `Balances` pallet, which uses a `StorageMap` to store balances data only."] + #[doc = " NOTE: This is only used in the case that this pallet is used to store balances."] + pub fn account( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::account::Account, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Account", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 213u8, 38u8, 200u8, 69u8, 218u8, 0u8, 112u8, 181u8, 160u8, 23u8, 96u8, + 90u8, 3u8, 88u8, 126u8, 22u8, 103u8, 74u8, 64u8, 69u8, 29u8, 247u8, + 18u8, 17u8, 234u8, 143u8, 189u8, 22u8, 247u8, 194u8, 154u8, 249u8, + ], + ) + } + #[doc = " Any liquidity locks on some account balances."] + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + #[doc = ""] + #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn locks_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::locks::Locks, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Locks", + (), + [ + 10u8, 223u8, 55u8, 0u8, 249u8, 69u8, 168u8, 41u8, 75u8, 35u8, 120u8, + 167u8, 18u8, 132u8, 9u8, 20u8, 91u8, 51u8, 27u8, 69u8, 136u8, 187u8, + 13u8, 220u8, 163u8, 122u8, 26u8, 141u8, 174u8, 249u8, 85u8, 37u8, + ], + ) + } + #[doc = " Any liquidity locks on some account balances."] + #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."] + #[doc = ""] + #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn locks( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::locks::Locks, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Locks", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 10u8, 223u8, 55u8, 0u8, 249u8, 69u8, 168u8, 41u8, 75u8, 35u8, 120u8, + 167u8, 18u8, 132u8, 9u8, 20u8, 91u8, 51u8, 27u8, 69u8, 136u8, 187u8, + 13u8, 220u8, 163u8, 122u8, 26u8, 141u8, 174u8, 249u8, 85u8, 37u8, + ], + ) + } + #[doc = " Named reserves on some account balances."] + #[doc = ""] + #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn reserves_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reserves::Reserves, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Reserves", + (), + [ + 112u8, 10u8, 241u8, 77u8, 64u8, 187u8, 106u8, 159u8, 13u8, 153u8, + 140u8, 178u8, 182u8, 50u8, 1u8, 55u8, 149u8, 92u8, 196u8, 229u8, 170u8, + 106u8, 193u8, 88u8, 255u8, 244u8, 2u8, 193u8, 62u8, 235u8, 204u8, 91u8, + ], + ) + } + #[doc = " Named reserves on some account balances."] + #[doc = ""] + #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn reserves( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::reserves::Reserves, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Reserves", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 112u8, 10u8, 241u8, 77u8, 64u8, 187u8, 106u8, 159u8, 13u8, 153u8, + 140u8, 178u8, 182u8, 50u8, 1u8, 55u8, 149u8, 92u8, 196u8, 229u8, 170u8, + 106u8, 193u8, 88u8, 255u8, 244u8, 2u8, 193u8, 62u8, 235u8, 204u8, 91u8, + ], + ) + } + #[doc = " Holds on account balances."] + pub fn holds_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::holds::Holds, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Holds", + (), + [ + 129u8, 137u8, 55u8, 91u8, 69u8, 138u8, 47u8, 168u8, 33u8, 159u8, 81u8, + 44u8, 125u8, 21u8, 124u8, 211u8, 190u8, 246u8, 14u8, 154u8, 233u8, + 116u8, 250u8, 251u8, 179u8, 82u8, 73u8, 234u8, 168u8, 184u8, 61u8, + 198u8, + ], + ) + } + #[doc = " Holds on account balances."] + pub fn holds( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::holds::Holds, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Holds", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 129u8, 137u8, 55u8, 91u8, 69u8, 138u8, 47u8, 168u8, 33u8, 159u8, 81u8, + 44u8, 125u8, 21u8, 124u8, 211u8, 190u8, 246u8, 14u8, 154u8, 233u8, + 116u8, 250u8, 251u8, 179u8, 82u8, 73u8, 234u8, 168u8, 184u8, 61u8, + 198u8, + ], + ) + } + #[doc = " Freeze locks on account balances."] + pub fn freezes_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::freezes::Freezes, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Freezes", + (), + [ + 17u8, 244u8, 16u8, 167u8, 197u8, 87u8, 174u8, 75u8, 172u8, 154u8, + 157u8, 40u8, 70u8, 169u8, 39u8, 30u8, 253u8, 1u8, 74u8, 227u8, 122u8, + 163u8, 192u8, 2u8, 101u8, 4u8, 164u8, 187u8, 127u8, 117u8, 41u8, 192u8, + ], + ) + } + #[doc = " Freeze locks on account balances."] + pub fn freezes( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::freezes::Freezes, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Balances", + "Freezes", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 17u8, 244u8, 16u8, 167u8, 197u8, 87u8, 174u8, 75u8, 172u8, 154u8, + 157u8, 40u8, 70u8, 169u8, 39u8, 30u8, 253u8, 1u8, 74u8, 227u8, 122u8, + 163u8, 192u8, 2u8, 101u8, 4u8, 164u8, 187u8, 127u8, 117u8, 41u8, 192u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!"] + #[doc = ""] + #[doc = " If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for"] + #[doc = " this pallet. However, you do so at your own risk: this will open up a major DoS vector."] + #[doc = " In case you have multiple sources of provider references, you may also get unexpected"] + #[doc = " behaviour if you set this to zero."] + #[doc = ""] + #[doc = " Bottom line: Do yourself a favour and make it at least one!"] + pub fn existential_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "ExistentialDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum number of locks that should exist on an account."] + #[doc = " Not strictly enforced, but used for weight estimation."] + #[doc = ""] + #[doc = " Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn max_locks( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "MaxLocks", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of named reserves that can exist on an account."] + #[doc = ""] + #[doc = " Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`"] + pub fn max_reserves( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "MaxReserves", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of individual freeze locks that can exist on an account at any time."] + pub fn max_freezes( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Balances", + "MaxFreezes", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod transaction_payment { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_transaction_payment::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who`."] + pub struct TransactionFeePaid { + pub who: transaction_fee_paid::Who, + pub actual_fee: transaction_fee_paid::ActualFee, + pub tip: transaction_fee_paid::Tip, + } + pub mod transaction_fee_paid { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type ActualFee = ::core::primitive::u128; + pub type Tip = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for TransactionFeePaid { + const PALLET: &'static str = "TransactionPayment"; + const EVENT: &'static str = "TransactionFeePaid"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod next_fee_multiplier { + use super::runtime_types; + pub type NextFeeMultiplier = + runtime_types::sp_arithmetic::fixed_point::FixedU128; + } + pub mod storage_version { + use super::runtime_types; + pub type StorageVersion = runtime_types::pallet_transaction_payment::Releases; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn next_fee_multiplier( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_fee_multiplier::NextFeeMultiplier, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "TransactionPayment", + "NextFeeMultiplier", + (), + [ + 247u8, 39u8, 81u8, 170u8, 225u8, 226u8, 82u8, 147u8, 34u8, 113u8, + 147u8, 213u8, 59u8, 80u8, 139u8, 35u8, 36u8, 196u8, 152u8, 19u8, 9u8, + 159u8, 176u8, 79u8, 249u8, 201u8, 170u8, 1u8, 129u8, 79u8, 146u8, + 197u8, + ], + ) + } + pub fn storage_version( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::storage_version::StorageVersion, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "TransactionPayment", + "StorageVersion", + (), + [ + 105u8, 243u8, 158u8, 241u8, 159u8, 231u8, 253u8, 6u8, 4u8, 32u8, 85u8, + 178u8, 126u8, 31u8, 203u8, 134u8, 154u8, 38u8, 122u8, 155u8, 150u8, + 251u8, 174u8, 15u8, 74u8, 134u8, 216u8, 244u8, 168u8, 175u8, 158u8, + 144u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A fee multiplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"] + #[doc = " `priority`"] + #[doc = ""] + #[doc = " This value is multiplied by the `final_fee` to obtain a \"virtual tip\" that is later"] + #[doc = " added to a tip component in regular `priority` calculations."] + #[doc = " It means that a `Normal` transaction can front-run a similarly-sized `Operational`"] + #[doc = " extrinsic (with no tip), by including a tip value greater than the virtual tip."] + #[doc = ""] + #[doc = " ```rust,ignore"] + #[doc = " // For `Normal`"] + #[doc = " let priority = priority_calc(tip);"] + #[doc = ""] + #[doc = " // For `Operational`"] + #[doc = " let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;"] + #[doc = " let priority = priority_calc(tip + virtual_tip);"] + #[doc = " ```"] + #[doc = ""] + #[doc = " Note that since we use `final_fee` the multiplier applies also to the regular `tip`"] + #[doc = " sent with the transaction. So, not only does the transaction get a priority bump based"] + #[doc = " on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`"] + #[doc = " transactions."] + pub fn operational_fee_multiplier( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u8> { + ::subxt_core::constants::address::StaticAddress::new_static( + "TransactionPayment", + "OperationalFeeMultiplier", + [ + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, + ], + ) + } + } + } + } + pub mod authorship { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod author { + use super::runtime_types; + pub type Author = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Author of current block."] + pub fn author( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::author::Author, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Authorship", + "Author", + (), + [ + 247u8, 192u8, 118u8, 227u8, 47u8, 20u8, 203u8, 199u8, 216u8, 87u8, + 220u8, 50u8, 166u8, 61u8, 168u8, 213u8, 253u8, 62u8, 202u8, 199u8, + 61u8, 192u8, 237u8, 53u8, 22u8, 148u8, 164u8, 245u8, 99u8, 24u8, 146u8, + 18u8, + ], + ) + } + } + } + } + pub mod babe { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_babe::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_babe::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + pub struct ReportEquivocation { + pub equivocation_proof: + ::subxt_core::alloc::boxed::Box, + pub key_owner_proof: report_equivocation::KeyOwnerProof, + } + pub mod report_equivocation { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u64, + >, + runtime_types::sp_consensus_babe::app::Public, + >; + pub type KeyOwnerProof = runtime_types::sp_session::MembershipProof; + } + impl ::subxt_core::blocks::StaticExtrinsic for ReportEquivocation { + const PALLET: &'static str = "Babe"; + const CALL: &'static str = "report_equivocation"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::subxt_core::alloc::boxed::Box< + report_equivocation_unsigned::EquivocationProof, + >, + pub key_owner_proof: report_equivocation_unsigned::KeyOwnerProof, + } + pub mod report_equivocation_unsigned { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u64, + >, + runtime_types::sp_consensus_babe::app::Public, + >; + pub type KeyOwnerProof = runtime_types::sp_session::MembershipProof; + } + impl ::subxt_core::blocks::StaticExtrinsic for ReportEquivocationUnsigned { + const PALLET: &'static str = "Babe"; + const CALL: &'static str = "report_equivocation_unsigned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] + #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] + #[doc = "Multiple calls to this method will replace any existing planned config change that had"] + #[doc = "not been enacted yet."] + pub struct PlanConfigChange { + pub config: plan_config_change::Config, + } + pub mod plan_config_change { + use super::runtime_types; + pub type Config = + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor; + } + impl ::subxt_core::blocks::StaticExtrinsic for PlanConfigChange { + const PALLET: &'static str = "Babe"; + const CALL: &'static str = "plan_config_change"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + pub fn report_equivocation( + &self, + equivocation_proof: types::report_equivocation::EquivocationProof, + key_owner_proof: types::report_equivocation::KeyOwnerProof, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Babe", + "report_equivocation", + types::ReportEquivocation { + equivocation_proof: ::subxt_core::alloc::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + [ + 158u8, 242u8, 40u8, 26u8, 184u8, 104u8, 122u8, 211u8, 103u8, 160u8, + 189u8, 66u8, 42u8, 204u8, 189u8, 96u8, 235u8, 10u8, 168u8, 221u8, 8u8, + 109u8, 160u8, 146u8, 206u8, 70u8, 41u8, 81u8, 94u8, 210u8, 206u8, 87u8, + ], + ) + } + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub fn report_equivocation_unsigned( + &self, + equivocation_proof: types::report_equivocation_unsigned::EquivocationProof, + key_owner_proof: types::report_equivocation_unsigned::KeyOwnerProof, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Babe", + "report_equivocation_unsigned", + types::ReportEquivocationUnsigned { + equivocation_proof: ::subxt_core::alloc::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + [ + 218u8, 175u8, 84u8, 2u8, 250u8, 2u8, 125u8, 220u8, 47u8, 23u8, 115u8, + 215u8, 57u8, 153u8, 209u8, 121u8, 191u8, 176u8, 90u8, 112u8, 15u8, + 168u8, 207u8, 208u8, 219u8, 185u8, 46u8, 225u8, 84u8, 1u8, 204u8, 53u8, + ], + ) + } + #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] + #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] + #[doc = "Multiple calls to this method will replace any existing planned config change that had"] + #[doc = "not been enacted yet."] + pub fn plan_config_change( + &self, + config: types::plan_config_change::Config, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Babe", + "plan_config_change", + types::PlanConfigChange { config }, + [ + 227u8, 155u8, 182u8, 231u8, 240u8, 107u8, 30u8, 22u8, 15u8, 52u8, + 172u8, 203u8, 115u8, 47u8, 6u8, 66u8, 170u8, 231u8, 186u8, 77u8, 19u8, + 235u8, 91u8, 136u8, 95u8, 149u8, 188u8, 163u8, 161u8, 109u8, 164u8, + 179u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod epoch_index { + use super::runtime_types; + pub type EpochIndex = ::core::primitive::u64; + } + pub mod authorities { + use super::runtime_types; + pub type Authorities = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>; + } + pub mod genesis_slot { + use super::runtime_types; + pub type GenesisSlot = runtime_types::sp_consensus_slots::Slot; + } + pub mod current_slot { + use super::runtime_types; + pub type CurrentSlot = runtime_types::sp_consensus_slots::Slot; + } + pub mod randomness { + use super::runtime_types; + pub type Randomness = [::core::primitive::u8; 32usize]; + } + pub mod pending_epoch_config_change { + use super::runtime_types; + pub type PendingEpochConfigChange = + runtime_types::sp_consensus_babe::digests::NextConfigDescriptor; + } + pub mod next_randomness { + use super::runtime_types; + pub type NextRandomness = [::core::primitive::u8; 32usize]; + } + pub mod next_authorities { + use super::runtime_types; + pub type NextAuthorities = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>; + } + pub mod segment_index { + use super::runtime_types; + pub type SegmentIndex = ::core::primitive::u32; + } + pub mod under_construction { + use super::runtime_types; + pub type UnderConstruction = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + [::core::primitive::u8; 32usize], + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod initialized { + use super::runtime_types; + pub type Initialized = ::core::option::Option< + runtime_types::sp_consensus_babe::digests::PreDigest, + >; + } + pub mod author_vrf_randomness { + use super::runtime_types; + pub type AuthorVrfRandomness = + ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + pub mod epoch_start { + use super::runtime_types; + pub type EpochStart = (::core::primitive::u64, ::core::primitive::u64); + } + pub mod lateness { + use super::runtime_types; + pub type Lateness = ::core::primitive::u64; + } + pub mod epoch_config { + use super::runtime_types; + pub type EpochConfig = runtime_types::sp_consensus_babe::BabeEpochConfiguration; + } + pub mod next_epoch_config { + use super::runtime_types; + pub type NextEpochConfig = + runtime_types::sp_consensus_babe::BabeEpochConfiguration; + } + pub mod skipped_epochs { + use super::runtime_types; + pub type SkippedEpochs = + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u64, + ::core::primitive::u32, + )>; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Current epoch index."] + pub fn epoch_index( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::epoch_index::EpochIndex, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "EpochIndex", + (), + [ + 32u8, 82u8, 130u8, 31u8, 190u8, 162u8, 237u8, 189u8, 104u8, 244u8, + 30u8, 199u8, 179u8, 0u8, 161u8, 107u8, 72u8, 240u8, 201u8, 222u8, + 177u8, 222u8, 35u8, 156u8, 81u8, 132u8, 162u8, 118u8, 238u8, 84u8, + 112u8, 89u8, + ], + ) + } + #[doc = " Current epoch authorities."] + pub fn authorities( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::authorities::Authorities, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "Authorities", + (), + [ + 192u8, 157u8, 98u8, 244u8, 104u8, 38u8, 195u8, 114u8, 183u8, 62u8, + 247u8, 18u8, 31u8, 152u8, 246u8, 206u8, 97u8, 13u8, 118u8, 211u8, + 104u8, 54u8, 150u8, 152u8, 126u8, 170u8, 228u8, 158u8, 108u8, 129u8, + 134u8, 44u8, + ], + ) + } + #[doc = " The slot at which the first epoch actually started. This is 0"] + #[doc = " until the first block of the chain."] + pub fn genesis_slot( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::genesis_slot::GenesisSlot, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "GenesisSlot", + (), + [ + 218u8, 174u8, 152u8, 76u8, 188u8, 214u8, 7u8, 88u8, 253u8, 187u8, + 139u8, 234u8, 51u8, 28u8, 220u8, 57u8, 73u8, 1u8, 18u8, 205u8, 80u8, + 160u8, 120u8, 216u8, 139u8, 191u8, 100u8, 108u8, 162u8, 106u8, 175u8, + 107u8, + ], + ) + } + #[doc = " Current slot number."] + pub fn current_slot( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_slot::CurrentSlot, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "CurrentSlot", + (), + [ + 112u8, 199u8, 115u8, 248u8, 217u8, 242u8, 45u8, 231u8, 178u8, 53u8, + 236u8, 167u8, 219u8, 238u8, 81u8, 243u8, 39u8, 140u8, 68u8, 19u8, + 201u8, 169u8, 211u8, 133u8, 135u8, 213u8, 150u8, 105u8, 60u8, 252u8, + 43u8, 57u8, + ], + ) + } + #[doc = " The epoch randomness for the *current* epoch."] + #[doc = ""] + #[doc = " # Security"] + #[doc = ""] + #[doc = " This MUST NOT be used for gambling, as it can be influenced by a"] + #[doc = " malicious validator in the short term. It MAY be used in many"] + #[doc = " cryptographic protocols, however, so long as one remembers that this"] + #[doc = " (like everything else on-chain) it is public. For example, it can be"] + #[doc = " used where a number is needed that cannot have been chosen by an"] + #[doc = " adversary, for purposes such as public-coin zero-knowledge proofs."] + pub fn randomness( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::randomness::Randomness, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "Randomness", + (), + [ + 36u8, 15u8, 52u8, 73u8, 195u8, 177u8, 186u8, 125u8, 134u8, 11u8, 103u8, + 248u8, 170u8, 237u8, 105u8, 239u8, 168u8, 204u8, 147u8, 52u8, 15u8, + 226u8, 126u8, 176u8, 133u8, 186u8, 169u8, 241u8, 156u8, 118u8, 67u8, + 58u8, + ], + ) + } + #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."] + pub fn pending_epoch_config_change( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::pending_epoch_config_change::PendingEpochConfigChange, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "PendingEpochConfigChange", + (), + [ + 79u8, 216u8, 84u8, 210u8, 83u8, 149u8, 122u8, 160u8, 159u8, 164u8, + 16u8, 134u8, 154u8, 104u8, 77u8, 254u8, 139u8, 18u8, 163u8, 59u8, 92u8, + 9u8, 135u8, 141u8, 147u8, 86u8, 44u8, 95u8, 183u8, 101u8, 11u8, 58u8, + ], + ) + } + #[doc = " Next epoch randomness."] + pub fn next_randomness( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_randomness::NextRandomness, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "NextRandomness", + (), + [ + 96u8, 191u8, 139u8, 171u8, 144u8, 92u8, 33u8, 58u8, 23u8, 219u8, 164u8, + 121u8, 59u8, 209u8, 112u8, 244u8, 50u8, 8u8, 14u8, 244u8, 103u8, 125u8, + 120u8, 210u8, 16u8, 250u8, 54u8, 192u8, 72u8, 8u8, 219u8, 152u8, + ], + ) + } + #[doc = " Next epoch authorities."] + pub fn next_authorities( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_authorities::NextAuthorities, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "NextAuthorities", + (), + [ + 29u8, 161u8, 79u8, 221u8, 198u8, 101u8, 11u8, 17u8, 20u8, 17u8, 225u8, + 144u8, 35u8, 150u8, 241u8, 190u8, 106u8, 32u8, 230u8, 14u8, 212u8, + 126u8, 1u8, 96u8, 73u8, 173u8, 245u8, 39u8, 153u8, 33u8, 205u8, 174u8, + ], + ) + } + #[doc = " Randomness under construction."] + #[doc = ""] + #[doc = " We make a trade-off between storage accesses and list length."] + #[doc = " We store the under-construction randomness in segments of up to"] + #[doc = " `UNDER_CONSTRUCTION_SEGMENT_LENGTH`."] + #[doc = ""] + #[doc = " Once a segment reaches this length, we begin the next one."] + #[doc = " We reset all segments and return to `0` at the beginning of every"] + #[doc = " epoch."] + pub fn segment_index( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::segment_index::SegmentIndex, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "SegmentIndex", + (), + [ + 145u8, 91u8, 142u8, 240u8, 184u8, 94u8, 68u8, 52u8, 130u8, 3u8, 75u8, + 175u8, 155u8, 130u8, 66u8, 9u8, 150u8, 242u8, 123u8, 111u8, 124u8, + 241u8, 100u8, 128u8, 220u8, 133u8, 96u8, 227u8, 164u8, 241u8, 170u8, + 34u8, + ], + ) + } + #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] + pub fn under_construction_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::under_construction::UnderConstruction, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "UnderConstruction", + (), + [ + 120u8, 120u8, 59u8, 247u8, 50u8, 6u8, 220u8, 14u8, 2u8, 76u8, 203u8, + 244u8, 232u8, 144u8, 253u8, 191u8, 101u8, 35u8, 99u8, 85u8, 111u8, + 168u8, 31u8, 110u8, 187u8, 124u8, 72u8, 32u8, 43u8, 66u8, 8u8, 215u8, + ], + ) + } + #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."] + pub fn under_construction( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::under_construction::Param0, + >, + types::under_construction::UnderConstruction, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "UnderConstruction", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 120u8, 120u8, 59u8, 247u8, 50u8, 6u8, 220u8, 14u8, 2u8, 76u8, 203u8, + 244u8, 232u8, 144u8, 253u8, 191u8, 101u8, 35u8, 99u8, 85u8, 111u8, + 168u8, 31u8, 110u8, 187u8, 124u8, 72u8, 32u8, 43u8, 66u8, 8u8, 215u8, + ], + ) + } + #[doc = " Temporary value (cleared at block finalization) which is `Some`"] + #[doc = " if per-block initialization has already been called for current block."] + pub fn initialized( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::initialized::Initialized, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "Initialized", + (), + [ + 169u8, 217u8, 237u8, 78u8, 186u8, 202u8, 206u8, 213u8, 54u8, 85u8, + 206u8, 166u8, 22u8, 138u8, 236u8, 60u8, 211u8, 169u8, 12u8, 183u8, + 23u8, 69u8, 194u8, 236u8, 112u8, 21u8, 62u8, 219u8, 92u8, 131u8, 134u8, + 145u8, + ], + ) + } + #[doc = " This field should always be populated during block processing unless"] + #[doc = " secondary plain slots are enabled (which don't contain a VRF output)."] + #[doc = ""] + #[doc = " It is set in `on_finalize`, before it will contain the value from the last block."] + pub fn author_vrf_randomness( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::author_vrf_randomness::AuthorVrfRandomness, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "AuthorVrfRandomness", + (), + [ + 160u8, 157u8, 62u8, 48u8, 196u8, 136u8, 63u8, 132u8, 155u8, 183u8, + 91u8, 201u8, 146u8, 29u8, 192u8, 142u8, 168u8, 152u8, 197u8, 233u8, + 5u8, 25u8, 0u8, 154u8, 234u8, 180u8, 146u8, 132u8, 106u8, 164u8, 149u8, + 63u8, + ], + ) + } + #[doc = " The block numbers when the last and current epoch have started, respectively `N-1` and"] + #[doc = " `N`."] + #[doc = " NOTE: We track this is in order to annotate the block number when a given pool of"] + #[doc = " entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in"] + #[doc = " slots, which may be skipped, the block numbers may not line up with the slot numbers."] + pub fn epoch_start( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::epoch_start::EpochStart, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "EpochStart", + (), + [ + 108u8, 147u8, 59u8, 243u8, 90u8, 233u8, 209u8, 100u8, 135u8, 174u8, + 43u8, 233u8, 23u8, 28u8, 254u8, 229u8, 32u8, 45u8, 60u8, 159u8, 241u8, + 93u8, 11u8, 238u8, 6u8, 170u8, 120u8, 211u8, 95u8, 145u8, 140u8, 105u8, + ], + ) + } + #[doc = " How late the current block is compared to its parent."] + #[doc = ""] + #[doc = " This entry is populated as part of block execution and is cleaned up"] + #[doc = " on block finalization. Querying this storage entry outside of block"] + #[doc = " execution context should always yield zero."] + pub fn lateness( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::lateness::Lateness, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "Lateness", + (), + [ + 25u8, 226u8, 51u8, 102u8, 7u8, 24u8, 111u8, 127u8, 155u8, 156u8, 143u8, + 100u8, 211u8, 142u8, 46u8, 185u8, 155u8, 121u8, 86u8, 197u8, 204u8, + 64u8, 2u8, 47u8, 178u8, 76u8, 21u8, 237u8, 85u8, 230u8, 139u8, 64u8, + ], + ) + } + #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"] + #[doc = " genesis."] + pub fn epoch_config( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::epoch_config::EpochConfig, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "EpochConfig", + (), + [ + 151u8, 58u8, 93u8, 2u8, 19u8, 98u8, 41u8, 144u8, 241u8, 70u8, 195u8, + 37u8, 126u8, 241u8, 111u8, 65u8, 16u8, 228u8, 111u8, 220u8, 241u8, + 215u8, 179u8, 235u8, 122u8, 88u8, 92u8, 95u8, 131u8, 252u8, 236u8, + 46u8, + ], + ) + } + #[doc = " The configuration for the next epoch, `None` if the config will not change"] + #[doc = " (you can fallback to `EpochConfig` instead in that case)."] + pub fn next_epoch_config( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_epoch_config::NextEpochConfig, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "NextEpochConfig", + (), + [ + 65u8, 54u8, 74u8, 141u8, 193u8, 124u8, 130u8, 238u8, 106u8, 27u8, + 221u8, 189u8, 103u8, 53u8, 39u8, 243u8, 212u8, 216u8, 75u8, 185u8, + 104u8, 220u8, 70u8, 108u8, 87u8, 172u8, 201u8, 185u8, 39u8, 55u8, + 145u8, 6u8, + ], + ) + } + #[doc = " A list of the last 100 skipped epochs and the corresponding session index"] + #[doc = " when the epoch was skipped."] + #[doc = ""] + #[doc = " This is only used for validating equivocation proofs. An equivocation proof"] + #[doc = " must contains a key-ownership proof for a given session, therefore we need a"] + #[doc = " way to tie together sessions and epoch indices, i.e. we need to validate that"] + #[doc = " a validator was the owner of a given key on a given session, and what the"] + #[doc = " active epoch index was during that session."] + pub fn skipped_epochs( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::skipped_epochs::SkippedEpochs, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Babe", + "SkippedEpochs", + (), + [ + 120u8, 167u8, 144u8, 97u8, 41u8, 216u8, 103u8, 90u8, 3u8, 86u8, 196u8, + 35u8, 160u8, 150u8, 144u8, 233u8, 128u8, 35u8, 119u8, 66u8, 6u8, 63u8, + 114u8, 140u8, 182u8, 228u8, 192u8, 30u8, 50u8, 145u8, 217u8, 108u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The amount of time, in slots, that each epoch should last."] + #[doc = " NOTE: Currently it is not possible to change the epoch duration after"] + #[doc = " the chain has started. Attempting to do so will brick block production."] + pub fn epoch_duration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Babe", + "EpochDuration", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The expected average block time at which BABE should be creating"] + #[doc = " blocks. Since BABE is probabilistic it is not trivial to figure out"] + #[doc = " what the expected average block time should be based on the slot"] + #[doc = " duration and the security parameter `c` (where `1 - c` represents"] + #[doc = " the probability of a slot being empty)."] + pub fn expected_block_time( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Babe", + "ExpectedBlockTime", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " Max number of authorities allowed"] + pub fn max_authorities( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Babe", + "MaxAuthorities", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of nominators for each validator."] + pub fn max_nominators( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Babe", + "MaxNominators", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod grandpa { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_grandpa::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_grandpa::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + pub struct ReportEquivocation { + pub equivocation_proof: + ::subxt_core::alloc::boxed::Box, + pub key_owner_proof: report_equivocation::KeyOwnerProof, + } + pub mod report_equivocation { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt_core::utils::H256, + ::core::primitive::u64, + >; + pub type KeyOwnerProof = runtime_types::sp_core::Void; + } + impl ::subxt_core::blocks::StaticExtrinsic for ReportEquivocation { + const PALLET: &'static str = "Grandpa"; + const CALL: &'static str = "report_equivocation"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub struct ReportEquivocationUnsigned { + pub equivocation_proof: ::subxt_core::alloc::boxed::Box< + report_equivocation_unsigned::EquivocationProof, + >, + pub key_owner_proof: report_equivocation_unsigned::KeyOwnerProof, + } + pub mod report_equivocation_unsigned { + use super::runtime_types; + pub type EquivocationProof = + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt_core::utils::H256, + ::core::primitive::u64, + >; + pub type KeyOwnerProof = runtime_types::sp_core::Void; + } + impl ::subxt_core::blocks::StaticExtrinsic for ReportEquivocationUnsigned { + const PALLET: &'static str = "Grandpa"; + const CALL: &'static str = "report_equivocation_unsigned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] + #[doc = ""] + #[doc = "Only callable by root."] + pub struct NoteStalled { + pub delay: note_stalled::Delay, + pub best_finalized_block_number: note_stalled::BestFinalizedBlockNumber, + } + pub mod note_stalled { + use super::runtime_types; + pub type Delay = ::core::primitive::u64; + pub type BestFinalizedBlockNumber = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for NoteStalled { + const PALLET: &'static str = "Grandpa"; + const CALL: &'static str = "note_stalled"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + pub fn report_equivocation( + &self, + equivocation_proof: types::report_equivocation::EquivocationProof, + key_owner_proof: types::report_equivocation::KeyOwnerProof, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Grandpa", + "report_equivocation", + types::ReportEquivocation { + equivocation_proof: ::subxt_core::alloc::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + [ + 134u8, 142u8, 87u8, 229u8, 16u8, 200u8, 253u8, 196u8, 11u8, 170u8, 0u8, + 151u8, 39u8, 200u8, 169u8, 14u8, 77u8, 63u8, 38u8, 180u8, 140u8, 113u8, + 248u8, 220u8, 62u8, 243u8, 63u8, 98u8, 24u8, 123u8, 191u8, 41u8, + ], + ) + } + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + pub fn report_equivocation_unsigned( + &self, + equivocation_proof: types::report_equivocation_unsigned::EquivocationProof, + key_owner_proof: types::report_equivocation_unsigned::KeyOwnerProof, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Grandpa", + "report_equivocation_unsigned", + types::ReportEquivocationUnsigned { + equivocation_proof: ::subxt_core::alloc::boxed::Box::new( + equivocation_proof, + ), + key_owner_proof, + }, + [ + 249u8, 221u8, 85u8, 143u8, 2u8, 211u8, 205u8, 249u8, 24u8, 206u8, + 251u8, 140u8, 49u8, 54u8, 30u8, 125u8, 108u8, 46u8, 173u8, 184u8, 65u8, + 139u8, 139u8, 12u8, 20u8, 27u8, 149u8, 225u8, 113u8, 56u8, 249u8, 44u8, + ], + ) + } + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] + #[doc = ""] + #[doc = "Only callable by root."] + pub fn note_stalled( + &self, + delay: types::note_stalled::Delay, + best_finalized_block_number: types::note_stalled::BestFinalizedBlockNumber, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Grandpa", + "note_stalled", + types::NoteStalled { delay, best_finalized_block_number }, + [ + 172u8, 89u8, 201u8, 164u8, 105u8, 69u8, 86u8, 125u8, 143u8, 174u8, + 42u8, 253u8, 45u8, 160u8, 140u8, 155u8, 198u8, 91u8, 125u8, 108u8, + 158u8, 47u8, 233u8, 185u8, 109u8, 227u8, 106u8, 207u8, 95u8, 189u8, + 190u8, 53u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_grandpa::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "New authority set has been applied."] + pub struct NewAuthorities { + pub authority_set: new_authorities::AuthoritySet, + } + pub mod new_authorities { + use super::runtime_types; + pub type AuthoritySet = ::subxt_core::alloc::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>; + } + impl ::subxt_core::events::StaticEvent for NewAuthorities { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "NewAuthorities"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Current authority set has been paused."] + pub struct Paused; + impl ::subxt_core::events::StaticEvent for Paused { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "Paused"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Current authority set has been resumed."] + pub struct Resumed; + impl ::subxt_core::events::StaticEvent for Resumed { + const PALLET: &'static str = "Grandpa"; + const EVENT: &'static str = "Resumed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod state { + use super::runtime_types; + pub type State = + runtime_types::pallet_grandpa::StoredState<::core::primitive::u64>; + } + pub mod pending_change { + use super::runtime_types; + pub type PendingChange = + runtime_types::pallet_grandpa::StoredPendingChange<::core::primitive::u64>; + } + pub mod next_forced { + use super::runtime_types; + pub type NextForced = ::core::primitive::u64; + } + pub mod stalled { + use super::runtime_types; + pub type Stalled = (::core::primitive::u64, ::core::primitive::u64); + } + pub mod current_set_id { + use super::runtime_types; + pub type CurrentSetId = ::core::primitive::u64; + } + pub mod set_id_session { + use super::runtime_types; + pub type SetIdSession = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u64; + } + pub mod authorities { + use super::runtime_types; + pub type Authorities = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " State of the current authority set."] + pub fn state( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::state::State, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "State", + (), + [ + 52u8, 94u8, 52u8, 200u8, 52u8, 34u8, 254u8, 53u8, 83u8, 6u8, 129u8, + 34u8, 8u8, 49u8, 75u8, 153u8, 118u8, 3u8, 28u8, 182u8, 64u8, 234u8, + 152u8, 44u8, 147u8, 222u8, 17u8, 17u8, 61u8, 0u8, 186u8, 122u8, + ], + ) + } + #[doc = " Pending change: (signaled at, scheduled change)."] + pub fn pending_change( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::pending_change::PendingChange, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "PendingChange", + (), + [ + 195u8, 146u8, 73u8, 229u8, 76u8, 128u8, 45u8, 145u8, 57u8, 243u8, 61u8, + 227u8, 173u8, 96u8, 145u8, 126u8, 239u8, 128u8, 232u8, 110u8, 227u8, + 92u8, 89u8, 20u8, 252u8, 235u8, 112u8, 37u8, 102u8, 145u8, 24u8, 126u8, + ], + ) + } + #[doc = " next block number where we can force a change."] + pub fn next_forced( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_forced::NextForced, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "NextForced", + (), + [ + 66u8, 193u8, 103u8, 170u8, 125u8, 104u8, 224u8, 91u8, 124u8, 113u8, + 65u8, 233u8, 30u8, 79u8, 109u8, 123u8, 40u8, 7u8, 115u8, 162u8, 181u8, + 225u8, 47u8, 48u8, 240u8, 29u8, 131u8, 206u8, 142u8, 22u8, 136u8, + 231u8, + ], + ) + } + #[doc = " `true` if we are currently stalled."] + pub fn stalled( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::stalled::Stalled, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "Stalled", + (), + [ + 194u8, 42u8, 49u8, 169u8, 34u8, 43u8, 158u8, 240u8, 232u8, 208u8, 15u8, + 10u8, 135u8, 180u8, 99u8, 216u8, 83u8, 250u8, 0u8, 148u8, 173u8, 169u8, + 105u8, 136u8, 3u8, 136u8, 125u8, 87u8, 49u8, 173u8, 223u8, 56u8, + ], + ) + } + #[doc = " The number of changes (both in terms of keys and underlying economic responsibilities)"] + #[doc = " in the \"set\" of Grandpa validators from genesis."] + pub fn current_set_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_set_id::CurrentSetId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "CurrentSetId", + (), + [ + 234u8, 215u8, 218u8, 42u8, 30u8, 76u8, 129u8, 40u8, 125u8, 137u8, + 207u8, 47u8, 46u8, 213u8, 159u8, 50u8, 175u8, 81u8, 155u8, 123u8, + 246u8, 175u8, 156u8, 68u8, 22u8, 113u8, 135u8, 137u8, 163u8, 18u8, + 115u8, 73u8, + ], + ) + } + #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] + #[doc = " members were responsible."] + #[doc = ""] + #[doc = " This is only used for validating equivocation proofs. An equivocation proof must"] + #[doc = " contains a key-ownership proof for a given session, therefore we need a way to tie"] + #[doc = " together sessions and GRANDPA set ids, i.e. we need to validate that a validator"] + #[doc = " was the owner of a given key on a given session, and what the active set ID was"] + #[doc = " during that session."] + #[doc = ""] + #[doc = " TWOX-NOTE: `SetId` is not under user control."] + pub fn set_id_session_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::set_id_session::SetIdSession, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "SetIdSession", + (), + [ + 47u8, 0u8, 239u8, 121u8, 187u8, 213u8, 254u8, 50u8, 238u8, 10u8, 162u8, + 65u8, 189u8, 166u8, 37u8, 74u8, 82u8, 81u8, 160u8, 20u8, 180u8, 253u8, + 238u8, 18u8, 209u8, 203u8, 38u8, 148u8, 16u8, 105u8, 72u8, 169u8, + ], + ) + } + #[doc = " A mapping from grandpa set ID to the index of the *most recent* session for which its"] + #[doc = " members were responsible."] + #[doc = ""] + #[doc = " This is only used for validating equivocation proofs. An equivocation proof must"] + #[doc = " contains a key-ownership proof for a given session, therefore we need a way to tie"] + #[doc = " together sessions and GRANDPA set ids, i.e. we need to validate that a validator"] + #[doc = " was the owner of a given key on a given session, and what the active set ID was"] + #[doc = " during that session."] + #[doc = ""] + #[doc = " TWOX-NOTE: `SetId` is not under user control."] + pub fn set_id_session( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::set_id_session::SetIdSession, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "SetIdSession", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 47u8, 0u8, 239u8, 121u8, 187u8, 213u8, 254u8, 50u8, 238u8, 10u8, 162u8, + 65u8, 189u8, 166u8, 37u8, 74u8, 82u8, 81u8, 160u8, 20u8, 180u8, 253u8, + 238u8, 18u8, 209u8, 203u8, 38u8, 148u8, 16u8, 105u8, 72u8, 169u8, + ], + ) + } + #[doc = " The current list of authorities."] + pub fn authorities( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::authorities::Authorities, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Grandpa", + "Authorities", + (), + [ + 192u8, 157u8, 98u8, 244u8, 104u8, 38u8, 195u8, 114u8, 183u8, 62u8, + 247u8, 18u8, 31u8, 152u8, 246u8, 206u8, 97u8, 13u8, 118u8, 211u8, + 104u8, 54u8, 150u8, 152u8, 126u8, 170u8, 228u8, 158u8, 108u8, 129u8, + 134u8, 44u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Max Authorities in use"] + pub fn max_authorities( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Grandpa", + "MaxAuthorities", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of nominators for each validator."] + pub fn max_nominators( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Grandpa", + "MaxNominators", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of entries to keep in the set id to session index mapping."] + #[doc = ""] + #[doc = " Since the `SetIdSession` map is only used for validating equivocations this"] + #[doc = " value should relate to the bonding duration of whatever staking system is"] + #[doc = " being used (if any). If equivocation handling is not enabled then this value"] + #[doc = " can be zero."] + pub fn max_set_id_session_entries( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Grandpa", + "MaxSetIdSessionEntries", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod indices { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_indices::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_indices::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Assign an previously unassigned index."] + #[doc = ""] + #[doc = "Payment: `Deposit` is reserved from the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be claimed. This must not be in use."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct Claim { + pub index: claim::Index, + } + pub mod claim { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Claim { + const PALLET: &'static str = "Indices"; + const CALL: &'static str = "claim"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] + #[doc = "is effectively transferred to the new account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct Transfer { + pub new: transfer::New, + pub index: transfer::Index, + } + pub mod transfer { + use super::runtime_types; + pub type New = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Transfer { + const PALLET: &'static str = "Indices"; + const CALL: &'static str = "transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Free up an index owned by the sender."] + #[doc = ""] + #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] + #[doc = ""] + #[doc = "- `index`: the index to be freed. This must be owned by the sender."] + #[doc = ""] + #[doc = "Emits `IndexFreed` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct Free { + pub index: free::Index, + } + pub mod free { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Free { + const PALLET: &'static str = "Indices"; + const CALL: &'static str = "free"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] + #[doc = "held, then any deposit is reimbursed to its current owner."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `index`: the index to be (re-)assigned."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct ForceTransfer { + pub new: force_transfer::New, + pub index: force_transfer::Index, + pub freeze: force_transfer::Freeze, + } + pub mod force_transfer { + use super::runtime_types; + pub type New = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Index = ::core::primitive::u32; + pub type Freeze = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceTransfer { + const PALLET: &'static str = "Indices"; + const CALL: &'static str = "force_transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] + #[doc = "deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] + #[doc = "non-frozen account `index`."] + #[doc = ""] + #[doc = "- `index`: the index to be frozen in place."] + #[doc = ""] + #[doc = "Emits `IndexFrozen` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct Freeze { + pub index: freeze::Index, + } + pub mod freeze { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Freeze { + const PALLET: &'static str = "Indices"; + const CALL: &'static str = "freeze"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Assign an previously unassigned index."] + #[doc = ""] + #[doc = "Payment: `Deposit` is reserved from the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be claimed. This must not be in use."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn claim( + &self, + index: types::claim::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Indices", + "claim", + types::Claim { index }, + [ + 146u8, 58u8, 246u8, 135u8, 59u8, 90u8, 3u8, 5u8, 140u8, 169u8, 232u8, + 195u8, 11u8, 107u8, 36u8, 141u8, 118u8, 174u8, 160u8, 160u8, 19u8, + 205u8, 177u8, 193u8, 18u8, 102u8, 115u8, 31u8, 72u8, 29u8, 91u8, 235u8, + ], + ) + } + #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] + #[doc = "is effectively transferred to the new account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn transfer( + &self, + new: types::transfer::New, + index: types::transfer::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Indices", + "transfer", + types::Transfer { new, index }, + [ + 253u8, 209u8, 123u8, 236u8, 91u8, 71u8, 183u8, 49u8, 84u8, 13u8, 130u8, + 208u8, 181u8, 218u8, 219u8, 178u8, 71u8, 76u8, 228u8, 249u8, 197u8, + 243u8, 136u8, 122u8, 150u8, 179u8, 249u8, 187u8, 150u8, 158u8, 201u8, + 134u8, + ], + ) + } + #[doc = "Free up an index owned by the sender."] + #[doc = ""] + #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] + #[doc = ""] + #[doc = "- `index`: the index to be freed. This must be owned by the sender."] + #[doc = ""] + #[doc = "Emits `IndexFreed` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn free( + &self, + index: types::free::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Indices", + "free", + types::Free { index }, + [ + 241u8, 211u8, 234u8, 102u8, 189u8, 22u8, 209u8, 27u8, 8u8, 229u8, 80u8, + 227u8, 138u8, 252u8, 222u8, 111u8, 77u8, 201u8, 235u8, 51u8, 163u8, + 247u8, 13u8, 126u8, 216u8, 136u8, 57u8, 222u8, 56u8, 66u8, 215u8, + 244u8, + ], + ) + } + #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] + #[doc = "held, then any deposit is reimbursed to its current owner."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `index`: the index to be (re-)assigned."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn force_transfer( + &self, + new: types::force_transfer::New, + index: types::force_transfer::Index, + freeze: types::force_transfer::Freeze, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Indices", + "force_transfer", + types::ForceTransfer { new, index, freeze }, + [ + 61u8, 7u8, 111u8, 227u8, 228u8, 62u8, 178u8, 225u8, 195u8, 185u8, + 243u8, 161u8, 156u8, 53u8, 165u8, 178u8, 238u8, 146u8, 66u8, 165u8, + 7u8, 137u8, 36u8, 7u8, 118u8, 84u8, 203u8, 3u8, 143u8, 95u8, 99u8, + 192u8, + ], + ) + } + #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] + #[doc = "deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] + #[doc = "non-frozen account `index`."] + #[doc = ""] + #[doc = "- `index`: the index to be frozen in place."] + #[doc = ""] + #[doc = "Emits `IndexFrozen` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn freeze( + &self, + index: types::freeze::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Indices", + "freeze", + types::Freeze { index }, + [ + 238u8, 215u8, 108u8, 156u8, 84u8, 240u8, 130u8, 229u8, 27u8, 132u8, + 93u8, 78u8, 2u8, 251u8, 43u8, 203u8, 2u8, 142u8, 147u8, 48u8, 92u8, + 101u8, 207u8, 24u8, 51u8, 16u8, 36u8, 229u8, 188u8, 129u8, 160u8, + 117u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_indices::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A account index was assigned."] + pub struct IndexAssigned { + pub who: index_assigned::Who, + pub index: index_assigned::Index, + } + pub mod index_assigned { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for IndexAssigned { + const PALLET: &'static str = "Indices"; + const EVENT: &'static str = "IndexAssigned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A account index has been freed up (unassigned)."] + pub struct IndexFreed { + pub index: index_freed::Index, + } + pub mod index_freed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for IndexFreed { + const PALLET: &'static str = "Indices"; + const EVENT: &'static str = "IndexFreed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A account index has been frozen to its current account ID."] + pub struct IndexFrozen { + pub index: index_frozen::Index, + pub who: index_frozen::Who, + } + pub mod index_frozen { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for IndexFrozen { + const PALLET: &'static str = "Indices"; + const EVENT: &'static str = "IndexFrozen"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod accounts { + use super::runtime_types; + pub type Accounts = ( + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::bool, + ); + pub type Param0 = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The lookup from index to account."] + pub fn accounts_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::accounts::Accounts, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Indices", + "Accounts", + (), + [ + 48u8, 189u8, 43u8, 119u8, 32u8, 168u8, 28u8, 12u8, 245u8, 81u8, 119u8, + 182u8, 23u8, 201u8, 33u8, 147u8, 128u8, 171u8, 155u8, 134u8, 71u8, + 87u8, 100u8, 248u8, 107u8, 129u8, 36u8, 197u8, 220u8, 90u8, 11u8, + 238u8, + ], + ) + } + #[doc = " The lookup from index to account."] + pub fn accounts( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::accounts::Accounts, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Indices", + "Accounts", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 48u8, 189u8, 43u8, 119u8, 32u8, 168u8, 28u8, 12u8, 245u8, 81u8, 119u8, + 182u8, 23u8, 201u8, 33u8, 147u8, 128u8, 171u8, 155u8, 134u8, 71u8, + 87u8, 100u8, 248u8, 107u8, 129u8, 36u8, 197u8, 220u8, 90u8, 11u8, + 238u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The deposit needed for reserving an index."] + pub fn deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Indices", + "Deposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + } + } + } + pub mod democracy { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_democracy::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_democracy::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Propose a sensitive action to be taken."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] + #[doc = "have funds to cover the deposit."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the proposal preimage."] + #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] + #[doc = ""] + #[doc = "Emits `Proposed`."] + pub struct Propose { + pub proposal: propose::Proposal, + #[codec(compact)] + pub value: propose::Value, + } + pub mod propose { + use super::runtime_types; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Propose { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "propose"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Signals agreement with a particular proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] + #[doc = "must have funds to cover the deposit, equal to the original deposit."] + #[doc = ""] + #[doc = "- `proposal`: The index of the proposal to second."] + pub struct Second { + #[codec(compact)] + pub proposal: second::Proposal, + } + pub mod second { + use super::runtime_types; + pub type Proposal = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Second { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "second"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to vote for."] + #[doc = "- `vote`: The vote configuration."] + pub struct Vote { + #[codec(compact)] + pub ref_index: vote::RefIndex, + pub vote: vote::Vote, + } + pub mod vote { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + pub type Vote = + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Vote { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "vote"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancellationOrigin`."] + #[doc = ""] + #[doc = "-`ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + pub struct EmergencyCancel { + pub ref_index: emergency_cancel::RefIndex, + } + pub mod emergency_cancel { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for EmergencyCancel { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "emergency_cancel"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + pub struct ExternalPropose { + pub proposal: external_propose::Proposal, + } + pub mod external_propose { + use super::runtime_types; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ExternalPropose { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "external_propose"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] + #[doc = "an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ExternalProposeMajority { + pub proposal: external_propose_majority::Proposal, + } + pub mod external_propose_majority { + use super::runtime_types; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ExternalProposeMajority { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "external_propose_majority"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] + #[doc = "schedule an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct ExternalProposeDefault { + pub proposal: external_propose_default::Proposal, + } + pub mod external_propose_default { + use super::runtime_types; + pub type Proposal = runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ExternalProposeDefault { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "external_propose_default"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] + #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] + #[doc = "but it is not a majority-carries referendum then it fails."] + #[doc = ""] + #[doc = "The dispatch of this call must be `FastTrackOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the current external proposal."] + #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] + #[doc = "\tMust be always greater than zero."] + #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] + #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] + #[doc = " enacted. This doesn't have a minimum amount."] + #[doc = ""] + #[doc = "Emits `Started`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub struct FastTrack { + pub proposal_hash: fast_track::ProposalHash, + pub voting_period: fast_track::VotingPeriod, + pub delay: fast_track::Delay, + } + pub mod fast_track { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type VotingPeriod = ::core::primitive::u64; + pub type Delay = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for FastTrack { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "fast_track"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Veto and blacklist the external proposal hash."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `VetoOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] + #[doc = ""] + #[doc = "Emits `Vetoed`."] + #[doc = ""] + #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] + pub struct VetoExternal { + pub proposal_hash: veto_external::ProposalHash, + } + pub mod veto_external { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for VetoExternal { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "veto_external"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "# Weight: `O(1)`."] + pub struct CancelReferendum { + #[codec(compact)] + pub ref_index: cancel_referendum::RefIndex, + } + pub mod cancel_referendum { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelReferendum { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "cancel_referendum"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Delegate the voting power (with some given conviction) of the sending account."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] + #[doc = ""] + #[doc = "Emits `Delegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + pub struct Delegate { + pub to: delegate::To, + pub conviction: delegate::Conviction, + pub balance: delegate::Balance, + } + pub mod delegate { + use super::runtime_types; + pub type To = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Conviction = runtime_types::pallet_democracy::conviction::Conviction; + pub type Balance = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Delegate { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "delegate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Undelegate the voting power of the sending account."] + #[doc = ""] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + pub struct Undelegate; + impl ::subxt_core::blocks::StaticExtrinsic for Undelegate { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "undelegate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clears all public proposals."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + pub struct ClearPublicProposals; + impl ::subxt_core::blocks::StaticExtrinsic for ClearPublicProposals { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "clear_public_proposals"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unlock tokens that have an expired lock."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub struct Unlock { + pub target: unlock::Target, + } + pub mod unlock { + use super::runtime_types; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Unlock { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "unlock"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the referendum was cancelled, or"] + #[doc = "- the referendum is ongoing, or"] + #[doc = "- the referendum has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] + #[doc = ""] + #[doc = "If, however, the referendum has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for referendum `index`."] + #[doc = ""] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub struct RemoveVote { + pub index: remove_vote::Index, + } + pub mod remove_vote { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveVote { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "remove_vote"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the referendum was cancelled, because the voter lost the referendum or"] + #[doc = "because the conviction period is over."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for"] + #[doc = " referendum `index`."] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub struct RemoveOtherVote { + pub target: remove_other_vote::Target, + pub index: remove_other_vote::Index, + } + pub mod remove_other_vote { + use super::runtime_types; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveOtherVote { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "remove_other_vote"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] + #[doc = "proposed again."] + #[doc = ""] + #[doc = "If called on a queued public or external proposal, then this will result in it being"] + #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] + #[doc = "then it will be cancelled."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] + #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] + #[doc = "cancelled."] + #[doc = ""] + #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] + #[doc = " reasonable value)."] + pub struct Blacklist { + pub proposal_hash: blacklist::ProposalHash, + pub maybe_ref_index: blacklist::MaybeRefIndex, + } + pub mod blacklist { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type MaybeRefIndex = ::core::option::Option<::core::primitive::u32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Blacklist { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "blacklist"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] + #[doc = ""] + #[doc = "- `prop_index`: The index of the proposal to cancel."] + #[doc = ""] + #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] + pub struct CancelProposal { + #[codec(compact)] + pub prop_index: cancel_proposal::PropIndex, + } + pub mod cancel_proposal { + use super::runtime_types; + pub type PropIndex = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelProposal { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "cancel_proposal"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set or clear a metadata of a proposal or a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must correspond to the `MetadataOwner`."] + #[doc = " - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`"] + #[doc = " threshold."] + #[doc = " - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`"] + #[doc = " threshold."] + #[doc = " - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`"] + #[doc = " threshold."] + #[doc = " - `Signed` by a creator for a public proposal."] + #[doc = " - `Signed` to clear a metadata for a finished referendum."] + #[doc = " - `Root` to set a metadata for an ongoing referendum."] + #[doc = "- `owner`: an identifier of a metadata owner."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub struct SetMetadata { + pub owner: set_metadata::Owner, + pub maybe_hash: set_metadata::MaybeHash, + } + pub mod set_metadata { + use super::runtime_types; + pub type Owner = runtime_types::pallet_democracy::types::MetadataOwner; + pub type MaybeHash = ::core::option::Option<::subxt_core::utils::H256>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMetadata { + const PALLET: &'static str = "Democracy"; + const CALL: &'static str = "set_metadata"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a sensitive action to be taken."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] + #[doc = "have funds to cover the deposit."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the proposal preimage."] + #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] + #[doc = ""] + #[doc = "Emits `Proposed`."] + pub fn propose( + &self, + proposal: types::propose::Proposal, + value: types::propose::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "propose", + types::Propose { proposal, value }, + [ + 164u8, 45u8, 183u8, 137u8, 222u8, 27u8, 138u8, 45u8, 20u8, 18u8, 234u8, + 211u8, 52u8, 184u8, 234u8, 222u8, 193u8, 9u8, 160u8, 58u8, 198u8, + 106u8, 236u8, 210u8, 172u8, 34u8, 194u8, 107u8, 135u8, 83u8, 22u8, + 238u8, + ], + ) + } + #[doc = "Signals agreement with a particular proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] + #[doc = "must have funds to cover the deposit, equal to the original deposit."] + #[doc = ""] + #[doc = "- `proposal`: The index of the proposal to second."] + pub fn second( + &self, + proposal: types::second::Proposal, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "second", + types::Second { proposal }, + [ + 195u8, 55u8, 178u8, 55u8, 129u8, 64u8, 10u8, 131u8, 217u8, 79u8, 1u8, + 187u8, 73u8, 126u8, 191u8, 221u8, 110u8, 10u8, 13u8, 65u8, 190u8, + 107u8, 21u8, 236u8, 175u8, 130u8, 227u8, 179u8, 173u8, 39u8, 32u8, + 147u8, + ], + ) + } + #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to vote for."] + #[doc = "- `vote`: The vote configuration."] + pub fn vote( + &self, + ref_index: types::vote::RefIndex, + vote: types::vote::Vote, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "vote", + types::Vote { ref_index, vote }, + [ + 106u8, 195u8, 229u8, 44u8, 217u8, 214u8, 8u8, 234u8, 175u8, 62u8, 97u8, + 83u8, 193u8, 180u8, 103u8, 26u8, 174u8, 8u8, 2u8, 158u8, 25u8, 122u8, + 203u8, 122u8, 32u8, 14u8, 107u8, 169u8, 43u8, 240u8, 143u8, 103u8, + ], + ) + } + #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancellationOrigin`."] + #[doc = ""] + #[doc = "-`ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + pub fn emergency_cancel( + &self, + ref_index: types::emergency_cancel::RefIndex, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "emergency_cancel", + types::EmergencyCancel { ref_index }, + [ + 82u8, 232u8, 19u8, 158u8, 88u8, 69u8, 96u8, 225u8, 106u8, 253u8, 6u8, + 136u8, 87u8, 0u8, 68u8, 128u8, 122u8, 16u8, 107u8, 76u8, 209u8, 14u8, + 230u8, 49u8, 228u8, 100u8, 187u8, 10u8, 76u8, 71u8, 197u8, 72u8, + ], + ) + } + #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + pub fn external_propose( + &self, + proposal: types::external_propose::Proposal, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "external_propose", + types::ExternalPropose { proposal }, + [ + 99u8, 120u8, 61u8, 124u8, 244u8, 68u8, 12u8, 240u8, 11u8, 168u8, 4u8, + 50u8, 19u8, 152u8, 255u8, 97u8, 20u8, 195u8, 141u8, 199u8, 31u8, 250u8, + 222u8, 136u8, 47u8, 162u8, 0u8, 32u8, 215u8, 110u8, 94u8, 109u8, + ], + ) + } + #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] + #[doc = "an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn external_propose_majority( + &self, + proposal: types::external_propose_majority::Proposal, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "external_propose_majority", + types::ExternalProposeMajority { proposal }, + [ + 35u8, 61u8, 130u8, 81u8, 81u8, 180u8, 127u8, 202u8, 67u8, 84u8, 105u8, + 113u8, 112u8, 210u8, 1u8, 191u8, 10u8, 39u8, 157u8, 164u8, 9u8, 231u8, + 75u8, 25u8, 17u8, 175u8, 128u8, 180u8, 238u8, 58u8, 236u8, 214u8, + ], + ) + } + #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] + #[doc = "schedule an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn external_propose_default( + &self, + proposal: types::external_propose_default::Proposal, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "external_propose_default", + types::ExternalProposeDefault { proposal }, + [ + 136u8, 199u8, 244u8, 69u8, 5u8, 174u8, 166u8, 251u8, 102u8, 196u8, + 25u8, 6u8, 33u8, 216u8, 141u8, 78u8, 118u8, 125u8, 128u8, 218u8, 120u8, + 170u8, 166u8, 15u8, 124u8, 216u8, 128u8, 178u8, 5u8, 74u8, 170u8, 25u8, + ], + ) + } + #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] + #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] + #[doc = "but it is not a majority-carries referendum then it fails."] + #[doc = ""] + #[doc = "The dispatch of this call must be `FastTrackOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the current external proposal."] + #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] + #[doc = "\tMust be always greater than zero."] + #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] + #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] + #[doc = " enacted. This doesn't have a minimum amount."] + #[doc = ""] + #[doc = "Emits `Started`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + pub fn fast_track( + &self, + proposal_hash: types::fast_track::ProposalHash, + voting_period: types::fast_track::VotingPeriod, + delay: types::fast_track::Delay, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "fast_track", + types::FastTrack { proposal_hash, voting_period, delay }, + [ + 171u8, 67u8, 60u8, 58u8, 29u8, 115u8, 227u8, 25u8, 145u8, 104u8, 30u8, + 198u8, 52u8, 81u8, 213u8, 42u8, 103u8, 213u8, 168u8, 32u8, 62u8, 121u8, + 215u8, 102u8, 168u8, 95u8, 217u8, 137u8, 143u8, 214u8, 123u8, 171u8, + ], + ) + } + #[doc = "Veto and blacklist the external proposal hash."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `VetoOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] + #[doc = ""] + #[doc = "Emits `Vetoed`."] + #[doc = ""] + #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] + pub fn veto_external( + &self, + proposal_hash: types::veto_external::ProposalHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "veto_external", + types::VetoExternal { proposal_hash }, + [ + 121u8, 217u8, 249u8, 134u8, 45u8, 19u8, 126u8, 166u8, 218u8, 223u8, + 165u8, 124u8, 162u8, 59u8, 56u8, 200u8, 227u8, 125u8, 23u8, 133u8, + 196u8, 93u8, 210u8, 15u8, 39u8, 26u8, 58u8, 236u8, 9u8, 101u8, 202u8, + 168u8, + ], + ) + } + #[doc = "Remove a referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "# Weight: `O(1)`."] + pub fn cancel_referendum( + &self, + ref_index: types::cancel_referendum::RefIndex, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "cancel_referendum", + types::CancelReferendum { ref_index }, + [ + 149u8, 120u8, 70u8, 20u8, 126u8, 21u8, 30u8, 33u8, 82u8, 124u8, 229u8, + 179u8, 169u8, 243u8, 173u8, 146u8, 140u8, 22u8, 124u8, 154u8, 228u8, + 117u8, 109u8, 88u8, 11u8, 100u8, 235u8, 243u8, 118u8, 99u8, 250u8, + 140u8, + ], + ) + } + #[doc = "Delegate the voting power (with some given conviction) of the sending account."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] + #[doc = ""] + #[doc = "Emits `Delegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + pub fn delegate( + &self, + to: types::delegate::To, + conviction: types::delegate::Conviction, + balance: types::delegate::Balance, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "delegate", + types::Delegate { to, conviction, balance }, + [ + 98u8, 204u8, 103u8, 220u8, 240u8, 72u8, 17u8, 89u8, 31u8, 234u8, 53u8, + 234u8, 85u8, 150u8, 42u8, 130u8, 14u8, 164u8, 148u8, 103u8, 199u8, + 230u8, 119u8, 192u8, 95u8, 200u8, 10u8, 214u8, 48u8, 252u8, 64u8, 45u8, + ], + ) + } + #[doc = "Undelegate the voting power of the sending account."] + #[doc = ""] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + pub fn undelegate( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "undelegate", + types::Undelegate {}, + [ + 225u8, 156u8, 102u8, 1u8, 172u8, 145u8, 88u8, 12u8, 89u8, 32u8, 51u8, + 83u8, 25u8, 149u8, 132u8, 203u8, 246u8, 98u8, 155u8, 36u8, 165u8, + 206u8, 233u8, 169u8, 91u8, 85u8, 105u8, 67u8, 46u8, 134u8, 244u8, + 250u8, + ], + ) + } + #[doc = "Clears all public proposals."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + pub fn clear_public_proposals( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "clear_public_proposals", + types::ClearPublicProposals {}, + [ + 116u8, 160u8, 246u8, 216u8, 23u8, 188u8, 144u8, 63u8, 97u8, 198u8, + 11u8, 243u8, 165u8, 84u8, 159u8, 153u8, 235u8, 169u8, 166u8, 15u8, + 23u8, 116u8, 30u8, 56u8, 133u8, 31u8, 158u8, 114u8, 158u8, 86u8, 106u8, + 93u8, + ], + ) + } + #[doc = "Unlock tokens that have an expired lock."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + pub fn unlock( + &self, + target: types::unlock::Target, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "unlock", + types::Unlock { target }, + [ + 116u8, 108u8, 113u8, 20u8, 39u8, 227u8, 153u8, 96u8, 178u8, 223u8, + 155u8, 95u8, 111u8, 168u8, 169u8, 32u8, 230u8, 125u8, 119u8, 162u8, + 8u8, 40u8, 57u8, 237u8, 22u8, 160u8, 100u8, 203u8, 247u8, 20u8, 251u8, + 99u8, + ], + ) + } + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the referendum was cancelled, or"] + #[doc = "- the referendum is ongoing, or"] + #[doc = "- the referendum has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] + #[doc = ""] + #[doc = "If, however, the referendum has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for referendum `index`."] + #[doc = ""] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_vote( + &self, + index: types::remove_vote::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "remove_vote", + types::RemoveVote { index }, + [ + 98u8, 146u8, 215u8, 63u8, 222u8, 70u8, 61u8, 186u8, 90u8, 34u8, 63u8, + 25u8, 195u8, 119u8, 228u8, 189u8, 38u8, 163u8, 58u8, 210u8, 216u8, + 156u8, 20u8, 204u8, 136u8, 192u8, 33u8, 210u8, 124u8, 65u8, 153u8, + 105u8, + ], + ) + } + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the referendum was cancelled, because the voter lost the referendum or"] + #[doc = "because the conviction period is over."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for"] + #[doc = " referendum `index`."] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + pub fn remove_other_vote( + &self, + target: types::remove_other_vote::Target, + index: types::remove_other_vote::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "remove_other_vote", + types::RemoveOtherVote { target, index }, + [ + 71u8, 148u8, 41u8, 68u8, 78u8, 40u8, 128u8, 217u8, 49u8, 83u8, 128u8, + 13u8, 225u8, 24u8, 41u8, 69u8, 119u8, 229u8, 241u8, 178u8, 20u8, 91u8, + 1u8, 180u8, 113u8, 127u8, 8u8, 2u8, 233u8, 174u8, 192u8, 140u8, + ], + ) + } + #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] + #[doc = "proposed again."] + #[doc = ""] + #[doc = "If called on a queued public or external proposal, then this will result in it being"] + #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] + #[doc = "then it will be cancelled."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] + #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] + #[doc = "cancelled."] + #[doc = ""] + #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] + #[doc = " reasonable value)."] + pub fn blacklist( + &self, + proposal_hash: types::blacklist::ProposalHash, + maybe_ref_index: types::blacklist::MaybeRefIndex, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "blacklist", + types::Blacklist { proposal_hash, maybe_ref_index }, + [ + 227u8, 200u8, 88u8, 154u8, 134u8, 121u8, 131u8, 177u8, 94u8, 119u8, + 12u8, 129u8, 150u8, 59u8, 108u8, 103u8, 109u8, 55u8, 220u8, 211u8, + 250u8, 103u8, 160u8, 170u8, 63u8, 142u8, 112u8, 244u8, 29u8, 238u8, + 101u8, 24u8, + ], + ) + } + #[doc = "Remove a proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] + #[doc = ""] + #[doc = "- `prop_index`: The index of the proposal to cancel."] + #[doc = ""] + #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] + pub fn cancel_proposal( + &self, + prop_index: types::cancel_proposal::PropIndex, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "cancel_proposal", + types::CancelProposal { prop_index }, + [ + 213u8, 5u8, 215u8, 209u8, 71u8, 229u8, 66u8, 38u8, 171u8, 38u8, 14u8, + 103u8, 248u8, 176u8, 217u8, 143u8, 234u8, 89u8, 110u8, 250u8, 3u8, + 190u8, 151u8, 74u8, 55u8, 58u8, 249u8, 138u8, 25u8, 191u8, 55u8, 142u8, + ], + ) + } + #[doc = "Set or clear a metadata of a proposal or a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must correspond to the `MetadataOwner`."] + #[doc = " - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`"] + #[doc = " threshold."] + #[doc = " - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`"] + #[doc = " threshold."] + #[doc = " - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`"] + #[doc = " threshold."] + #[doc = " - `Signed` by a creator for a public proposal."] + #[doc = " - `Signed` to clear a metadata for a finished referendum."] + #[doc = " - `Root` to set a metadata for an ongoing referendum."] + #[doc = "- `owner`: an identifier of a metadata owner."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + pub fn set_metadata( + &self, + owner: types::set_metadata::Owner, + maybe_hash: types::set_metadata::MaybeHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Democracy", + "set_metadata", + types::SetMetadata { owner, maybe_hash }, + [ + 191u8, 200u8, 139u8, 27u8, 167u8, 250u8, 72u8, 78u8, 18u8, 98u8, 108u8, + 1u8, 122u8, 120u8, 47u8, 77u8, 174u8, 60u8, 247u8, 69u8, 228u8, 196u8, + 149u8, 107u8, 239u8, 45u8, 47u8, 118u8, 87u8, 233u8, 79u8, 29u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_democracy::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A motion has been proposed by a public account."] + pub struct Proposed { + pub proposal_index: proposed::ProposalIndex, + pub deposit: proposed::Deposit, + } + pub mod proposed { + use super::runtime_types; + pub type ProposalIndex = ::core::primitive::u32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Proposed { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Proposed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A public proposal has been tabled for referendum vote."] + pub struct Tabled { + pub proposal_index: tabled::ProposalIndex, + pub deposit: tabled::Deposit, + } + pub mod tabled { + use super::runtime_types; + pub type ProposalIndex = ::core::primitive::u32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Tabled { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Tabled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An external proposal has been tabled."] + pub struct ExternalTabled; + impl ::subxt_core::events::StaticEvent for ExternalTabled { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "ExternalTabled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has begun."] + pub struct Started { + pub ref_index: started::RefIndex, + pub threshold: started::Threshold, + } + pub mod started { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + pub type Threshold = runtime_types::pallet_democracy::vote_threshold::VoteThreshold; + } + impl ::subxt_core::events::StaticEvent for Started { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Started"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proposal has been approved by referendum."] + pub struct Passed { + pub ref_index: passed::RefIndex, + } + pub mod passed { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Passed { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Passed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proposal has been rejected by referendum."] + pub struct NotPassed { + pub ref_index: not_passed::RefIndex, + } + pub mod not_passed { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for NotPassed { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "NotPassed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A referendum has been cancelled."] + pub struct Cancelled { + pub ref_index: cancelled::RefIndex, + } + pub mod cancelled { + use super::runtime_types; + pub type RefIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Cancelled { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Cancelled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has delegated their vote to another account."] + pub struct Delegated { + pub who: delegated::Who, + pub target: delegated::Target, + } + pub mod delegated { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Target = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Delegated { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Delegated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has cancelled a previous delegation operation."] + pub struct Undelegated { + pub account: undelegated::Account, + } + pub mod undelegated { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Undelegated { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Undelegated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An external proposal has been vetoed."] + pub struct Vetoed { + pub who: vetoed::Who, + pub proposal_hash: vetoed::ProposalHash, + pub until: vetoed::Until, + } + pub mod vetoed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Until = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for Vetoed { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Vetoed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proposal_hash has been blacklisted permanently."] + pub struct Blacklisted { + pub proposal_hash: blacklisted::ProposalHash, + } + pub mod blacklisted { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Blacklisted { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Blacklisted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has voted in a referendum"] + pub struct Voted { + pub voter: voted::Voter, + pub ref_index: voted::RefIndex, + pub vote: voted::Vote, + } + pub mod voted { + use super::runtime_types; + pub type Voter = ::subxt_core::utils::AccountId32; + pub type RefIndex = ::core::primitive::u32; + pub type Vote = + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for Voted { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Voted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has seconded a proposal"] + pub struct Seconded { + pub seconder: seconded::Seconder, + pub prop_index: seconded::PropIndex, + } + pub mod seconded { + use super::runtime_types; + pub type Seconder = ::subxt_core::utils::AccountId32; + pub type PropIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Seconded { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "Seconded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proposal got canceled."] + pub struct ProposalCanceled { + pub prop_index: proposal_canceled::PropIndex, + } + pub mod proposal_canceled { + use super::runtime_types; + pub type PropIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for ProposalCanceled { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "ProposalCanceled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Metadata for a proposal or a referendum has been set."] + pub struct MetadataSet { + pub owner: metadata_set::Owner, + pub hash: metadata_set::Hash, + } + pub mod metadata_set { + use super::runtime_types; + pub type Owner = runtime_types::pallet_democracy::types::MetadataOwner; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for MetadataSet { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "MetadataSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Metadata for a proposal or a referendum has been cleared."] + pub struct MetadataCleared { + pub owner: metadata_cleared::Owner, + pub hash: metadata_cleared::Hash, + } + pub mod metadata_cleared { + use super::runtime_types; + pub type Owner = runtime_types::pallet_democracy::types::MetadataOwner; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for MetadataCleared { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "MetadataCleared"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Metadata has been transferred to new owner."] + pub struct MetadataTransferred { + pub prev_owner: metadata_transferred::PrevOwner, + pub owner: metadata_transferred::Owner, + pub hash: metadata_transferred::Hash, + } + pub mod metadata_transferred { + use super::runtime_types; + pub type PrevOwner = runtime_types::pallet_democracy::types::MetadataOwner; + pub type Owner = runtime_types::pallet_democracy::types::MetadataOwner; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for MetadataTransferred { + const PALLET: &'static str = "Democracy"; + const EVENT: &'static str = "MetadataTransferred"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod public_prop_count { + use super::runtime_types; + pub type PublicPropCount = ::core::primitive::u32; + } + pub mod public_props { + use super::runtime_types; + pub type PublicProps = + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + ::subxt_core::utils::AccountId32, + )>; + } + pub mod deposit_of { + use super::runtime_types; + pub type DepositOf = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >, + ::core::primitive::u128, + ); + pub type Param0 = ::core::primitive::u32; + } + pub mod referendum_count { + use super::runtime_types; + pub type ReferendumCount = ::core::primitive::u32; + } + pub mod lowest_unbaked { + use super::runtime_types; + pub type LowestUnbaked = ::core::primitive::u32; + } + pub mod referendum_info_of { + use super::runtime_types; + pub type ReferendumInfoOf = + runtime_types::pallet_democracy::types::ReferendumInfo< + ::core::primitive::u64, + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod voting_of { + use super::runtime_types; + pub type VotingOf = runtime_types::pallet_democracy::vote::Voting< + ::core::primitive::u128, + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod last_tabled_was_external { + use super::runtime_types; + pub type LastTabledWasExternal = ::core::primitive::bool; + } + pub mod next_external { + use super::runtime_types; + pub type NextExternal = ( + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + ); + } + pub mod blacklist { + use super::runtime_types; + pub type Blacklist = ( + ::core::primitive::u64, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >, + ); + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod cancellations { + use super::runtime_types; + pub type Cancellations = ::core::primitive::bool; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod metadata_of { + use super::runtime_types; + pub type MetadataOf = ::subxt_core::utils::H256; + pub type Param0 = runtime_types::pallet_democracy::types::MetadataOwner; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The number of (public) proposals that have been made so far."] + pub fn public_prop_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::public_prop_count::PublicPropCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "PublicPropCount", + (), + [ + 51u8, 175u8, 184u8, 94u8, 91u8, 212u8, 100u8, 108u8, 127u8, 162u8, + 233u8, 137u8, 12u8, 209u8, 29u8, 130u8, 125u8, 179u8, 208u8, 160u8, + 173u8, 149u8, 12u8, 111u8, 1u8, 82u8, 196u8, 137u8, 51u8, 204u8, 153u8, + 198u8, + ], + ) + } + #[doc = " The public proposals. Unsorted. The second item is the proposal."] + pub fn public_props( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::public_props::PublicProps, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "PublicProps", + (), + [ + 174u8, 85u8, 209u8, 117u8, 29u8, 193u8, 230u8, 16u8, 94u8, 219u8, 69u8, + 29u8, 116u8, 35u8, 252u8, 43u8, 127u8, 0u8, 43u8, 218u8, 240u8, 176u8, + 73u8, 81u8, 207u8, 131u8, 227u8, 132u8, 242u8, 45u8, 172u8, 50u8, + ], + ) + } + #[doc = " Those who have locked a deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] + pub fn deposit_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::deposit_of::DepositOf, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "DepositOf", + (), + [ + 115u8, 12u8, 250u8, 191u8, 201u8, 165u8, 90u8, 140u8, 101u8, 47u8, + 46u8, 3u8, 78u8, 30u8, 180u8, 22u8, 28u8, 154u8, 36u8, 99u8, 255u8, + 84u8, 33u8, 21u8, 65u8, 110u8, 52u8, 245u8, 19u8, 6u8, 104u8, 167u8, + ], + ) + } + #[doc = " Those who have locked a deposit."] + #[doc = ""] + #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."] + pub fn deposit_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::deposit_of::DepositOf, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "DepositOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 115u8, 12u8, 250u8, 191u8, 201u8, 165u8, 90u8, 140u8, 101u8, 47u8, + 46u8, 3u8, 78u8, 30u8, 180u8, 22u8, 28u8, 154u8, 36u8, 99u8, 255u8, + 84u8, 33u8, 21u8, 65u8, 110u8, 52u8, 245u8, 19u8, 6u8, 104u8, 167u8, + ], + ) + } + #[doc = " The next free referendum index, aka the number of referenda started so far."] + pub fn referendum_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::referendum_count::ReferendumCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "ReferendumCount", + (), + [ + 64u8, 145u8, 232u8, 153u8, 121u8, 87u8, 128u8, 253u8, 170u8, 192u8, + 139u8, 18u8, 0u8, 33u8, 243u8, 11u8, 238u8, 222u8, 244u8, 5u8, 247u8, + 198u8, 149u8, 31u8, 122u8, 208u8, 86u8, 179u8, 166u8, 167u8, 93u8, + 67u8, + ], + ) + } + #[doc = " The lowest referendum index representing an unbaked referendum. Equal to"] + #[doc = " `ReferendumCount` if there isn't a unbaked referendum."] + pub fn lowest_unbaked( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::lowest_unbaked::LowestUnbaked, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "LowestUnbaked", + (), + [ + 237u8, 222u8, 144u8, 214u8, 0u8, 186u8, 81u8, 176u8, 51u8, 14u8, 204u8, + 184u8, 147u8, 97u8, 187u8, 84u8, 40u8, 8u8, 86u8, 241u8, 16u8, 157u8, + 202u8, 44u8, 185u8, 111u8, 70u8, 114u8, 40u8, 135u8, 1u8, 155u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] + pub fn referendum_info_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::referendum_info_of::ReferendumInfoOf, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "ReferendumInfoOf", + (), + [ + 217u8, 175u8, 87u8, 114u8, 161u8, 182u8, 123u8, 182u8, 138u8, 13u8, + 118u8, 20u8, 166u8, 149u8, 55u8, 214u8, 114u8, 159u8, 92u8, 25u8, 27u8, + 144u8, 200u8, 103u8, 157u8, 91u8, 210u8, 79u8, 168u8, 81u8, 225u8, + 108u8, + ], + ) + } + #[doc = " Information concerning any given referendum."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as indexes are not under an attacker’s control."] + pub fn referendum_info_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::referendum_info_of::Param0, + >, + types::referendum_info_of::ReferendumInfoOf, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "ReferendumInfoOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 217u8, 175u8, 87u8, 114u8, 161u8, 182u8, 123u8, 182u8, 138u8, 13u8, + 118u8, 20u8, 166u8, 149u8, 55u8, 214u8, 114u8, 159u8, 92u8, 25u8, 27u8, + 144u8, 200u8, 103u8, 157u8, 91u8, 210u8, 79u8, 168u8, 81u8, 225u8, + 108u8, + ], + ) + } + #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] + #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] + pub fn voting_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::voting_of::VotingOf, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "VotingOf", + (), + [ + 186u8, 236u8, 158u8, 48u8, 144u8, 152u8, 83u8, 86u8, 60u8, 19u8, 171u8, + 90u8, 26u8, 143u8, 170u8, 108u8, 82u8, 2u8, 38u8, 163u8, 80u8, 8u8, + 98u8, 26u8, 244u8, 200u8, 225u8, 61u8, 139u8, 255u8, 210u8, 47u8, + ], + ) + } + #[doc = " All votes for a particular voter. We store the balance for the number of votes that we"] + #[doc = " have recorded. The second item is the total amount of delegations, that will be added."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway."] + pub fn voting_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::voting_of::VotingOf, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "VotingOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 186u8, 236u8, 158u8, 48u8, 144u8, 152u8, 83u8, 86u8, 60u8, 19u8, 171u8, + 90u8, 26u8, 143u8, 170u8, 108u8, 82u8, 2u8, 38u8, 163u8, 80u8, 8u8, + 98u8, 26u8, 244u8, 200u8, 225u8, 61u8, 139u8, 255u8, 210u8, 47u8, + ], + ) + } + #[doc = " True if the last referendum tabled was submitted externally. False if it was a public"] + #[doc = " proposal."] + pub fn last_tabled_was_external( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::last_tabled_was_external::LastTabledWasExternal, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "LastTabledWasExternal", + (), + [ + 162u8, 201u8, 72u8, 9u8, 78u8, 49u8, 72u8, 62u8, 240u8, 69u8, 20u8, + 135u8, 26u8, 59u8, 71u8, 46u8, 19u8, 25u8, 195u8, 11u8, 99u8, 31u8, + 104u8, 4u8, 24u8, 129u8, 47u8, 69u8, 219u8, 178u8, 104u8, 190u8, + ], + ) + } + #[doc = " The referendum to be tabled whenever it would be valid to table an external proposal."] + #[doc = " This happens when a referendum needs to be tabled and one of two conditions are met:"] + #[doc = " - `LastTabledWasExternal` is `false`; or"] + #[doc = " - `PublicProps` is empty."] + pub fn next_external( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_external::NextExternal, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "NextExternal", + (), + [ + 240u8, 58u8, 238u8, 86u8, 35u8, 48u8, 192u8, 51u8, 91u8, 4u8, 47u8, + 202u8, 21u8, 74u8, 158u8, 64u8, 107u8, 247u8, 248u8, 240u8, 122u8, + 109u8, 204u8, 180u8, 103u8, 239u8, 156u8, 68u8, 141u8, 253u8, 131u8, + 239u8, + ], + ) + } + #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] + #[doc = " (until when it may not be resubmitted) and who vetoed it."] + pub fn blacklist_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::blacklist::Blacklist, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "Blacklist", + (), + [ + 154u8, 19u8, 120u8, 140u8, 124u8, 231u8, 105u8, 73u8, 99u8, 132u8, + 186u8, 213u8, 121u8, 255u8, 5u8, 160u8, 95u8, 68u8, 229u8, 185u8, + 145u8, 110u8, 214u8, 226u8, 152u8, 127u8, 254u8, 186u8, 63u8, 205u8, + 235u8, 222u8, + ], + ) + } + #[doc = " A record of who vetoed what. Maps proposal hash to a possible existent block number"] + #[doc = " (until when it may not be resubmitted) and who vetoed it."] + pub fn blacklist( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::blacklist::Blacklist, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "Blacklist", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 154u8, 19u8, 120u8, 140u8, 124u8, 231u8, 105u8, 73u8, 99u8, 132u8, + 186u8, 213u8, 121u8, 255u8, 5u8, 160u8, 95u8, 68u8, 229u8, 185u8, + 145u8, 110u8, 214u8, 226u8, 152u8, 127u8, 254u8, 186u8, 63u8, 205u8, + 235u8, 222u8, + ], + ) + } + #[doc = " Record of all proposals that have been subject to emergency cancellation."] + pub fn cancellations_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::cancellations::Cancellations, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "Cancellations", + (), + [ + 80u8, 190u8, 98u8, 105u8, 129u8, 25u8, 167u8, 180u8, 74u8, 128u8, + 232u8, 29u8, 193u8, 209u8, 185u8, 60u8, 18u8, 180u8, 59u8, 192u8, + 149u8, 13u8, 123u8, 232u8, 34u8, 208u8, 48u8, 104u8, 35u8, 181u8, + 186u8, 244u8, + ], + ) + } + #[doc = " Record of all proposals that have been subject to emergency cancellation."] + pub fn cancellations( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::cancellations::Cancellations, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "Cancellations", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 80u8, 190u8, 98u8, 105u8, 129u8, 25u8, 167u8, 180u8, 74u8, 128u8, + 232u8, 29u8, 193u8, 209u8, 185u8, 60u8, 18u8, 180u8, 59u8, 192u8, + 149u8, 13u8, 123u8, 232u8, 34u8, 208u8, 48u8, 104u8, 35u8, 181u8, + 186u8, 244u8, + ], + ) + } + #[doc = " General information concerning any proposal or referendum."] + #[doc = " The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::metadata_of::MetadataOf, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "MetadataOf", + (), + [ + 52u8, 151u8, 124u8, 110u8, 85u8, 173u8, 181u8, 86u8, 174u8, 183u8, + 102u8, 22u8, 8u8, 36u8, 224u8, 114u8, 98u8, 0u8, 220u8, 215u8, 19u8, + 147u8, 32u8, 238u8, 242u8, 187u8, 235u8, 163u8, 183u8, 235u8, 9u8, + 180u8, + ], + ) + } + #[doc = " General information concerning any proposal or referendum."] + #[doc = " The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON"] + #[doc = " dump or IPFS hash of a JSON file."] + #[doc = ""] + #[doc = " Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)"] + #[doc = " large preimages."] + pub fn metadata_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::metadata_of::MetadataOf, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Democracy", + "MetadataOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 52u8, 151u8, 124u8, 110u8, 85u8, 173u8, 181u8, 86u8, 174u8, 183u8, + 102u8, 22u8, 8u8, 36u8, 224u8, 114u8, 98u8, 0u8, 220u8, 215u8, 19u8, + 147u8, 32u8, 238u8, 242u8, 187u8, 235u8, 163u8, 183u8, 235u8, 9u8, + 180u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The period between a proposal being approved and enacted."] + #[doc = ""] + #[doc = " It should generally be a little more than the unstake period to ensure that"] + #[doc = " voting stakers have an opportunity to remove themselves from the system in the case"] + #[doc = " where they are on the losing side of a vote."] + pub fn enactment_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "EnactmentPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " How often (in blocks) new public referenda are launched."] + pub fn launch_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "LaunchPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " How often (in blocks) to check for new votes."] + pub fn voting_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "VotingPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The minimum period of vote locking."] + #[doc = ""] + #[doc = " It should be no shorter than enactment period to ensure that in the case of an approval,"] + #[doc = " those successful voters are locked into the consequences that their votes entail."] + pub fn vote_locking_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "VoteLockingPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The minimum amount to be used as a deposit for a public referendum proposal."] + pub fn minimum_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "MinimumDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Indicator for whether an emergency origin is even allowed to happen. Some chains may"] + #[doc = " want to set this permanently to `false`, others may want to condition it on things such"] + #[doc = " as an upgrade having happened recently."] + pub fn instant_allowed( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::bool> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "InstantAllowed", + [ + 165u8, 28u8, 112u8, 190u8, 18u8, 129u8, 182u8, 206u8, 237u8, 1u8, 68u8, + 252u8, 125u8, 234u8, 185u8, 50u8, 149u8, 164u8, 47u8, 126u8, 134u8, + 100u8, 14u8, 86u8, 209u8, 39u8, 20u8, 4u8, 233u8, 115u8, 102u8, 131u8, + ], + ) + } + #[doc = " Minimum voting period allowed for a fast-track referendum."] + pub fn fast_track_voting_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "FastTrackVotingPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " Period in blocks where an external proposal may not be re-submitted after being vetoed."] + pub fn cooloff_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "CooloffPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The maximum number of votes for an account."] + #[doc = ""] + #[doc = " Also used to compute weight, an overly big value can"] + #[doc = " lead to extrinsic with very big weight: see `delegate` for instance."] + pub fn max_votes( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "MaxVotes", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of public proposals that can exist at any time."] + pub fn max_proposals( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "MaxProposals", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of deposits a public proposal may have at any time."] + pub fn max_deposits( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "MaxDeposits", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of items which can be blacklisted."] + pub fn max_blacklisted( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Democracy", + "MaxBlacklisted", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod council { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_collective::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_collective::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the collective's membership."] + #[doc = ""] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] + #[doc = ""] + #[doc = "The dispatch of this call must be `SetMembersOrigin`."] + #[doc = ""] + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "## Complexity:"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + pub struct SetMembers { + pub new_members: set_members::NewMembers, + pub prime: set_members::Prime, + pub old_count: set_members::OldCount, + } + pub mod set_members { + use super::runtime_types; + pub type NewMembers = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Prime = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type OldCount = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMembers { + const PALLET: &'static str = "Council"; + const CALL: &'static str = "set_members"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispatch a proposal from a member using the `Member` origin."] + #[doc = ""] + #[doc = "Origin must be a member of the collective."] + #[doc = ""] + #[doc = "## Complexity:"] + #[doc = "- `O(B + M + P)` where:"] + #[doc = "- `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = "- `M` members-count (code-bounded)"] + #[doc = "- `P` complexity of dispatching `proposal`"] + pub struct Execute { + pub proposal: ::subxt_core::alloc::boxed::Box, + #[codec(compact)] + pub length_bound: execute::LengthBound, + } + pub mod execute { + use super::runtime_types; + pub type Proposal = runtime_types::tangle_testnet_runtime::RuntimeCall; + pub type LengthBound = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Execute { + const PALLET: &'static str = "Council"; + const CALL: &'static str = "execute"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add a new proposal to either be voted on or executed directly."] + #[doc = ""] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + pub struct Propose { + #[codec(compact)] + pub threshold: propose::Threshold, + pub proposal: ::subxt_core::alloc::boxed::Box, + #[codec(compact)] + pub length_bound: propose::LengthBound, + } + pub mod propose { + use super::runtime_types; + pub type Threshold = ::core::primitive::u32; + pub type Proposal = runtime_types::tangle_testnet_runtime::RuntimeCall; + pub type LengthBound = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Propose { + const PALLET: &'static str = "Council"; + const CALL: &'static str = "propose"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Requires the sender to be a member."] + #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = "## Complexity"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + pub struct Vote { + pub proposal: vote::Proposal, + #[codec(compact)] + pub index: vote::Index, + pub approve: vote::Approve, + } + pub mod vote { + use super::runtime_types; + pub type Proposal = ::subxt_core::utils::H256; + pub type Index = ::core::primitive::u32; + pub type Approve = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for Vote { + const PALLET: &'static str = "Council"; + const CALL: &'static str = "vote"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(P) where P is the number of max proposals"] + pub struct DisapproveProposal { + pub proposal_hash: disapprove_proposal::ProposalHash, + } + pub mod disapprove_proposal { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for DisapproveProposal { + const PALLET: &'static str = "Council"; + const CALL: &'static str = "disapprove_proposal"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + pub struct Close { + pub proposal_hash: close::ProposalHash, + #[codec(compact)] + pub index: close::Index, + pub proposal_weight_bound: close::ProposalWeightBound, + #[codec(compact)] + pub length_bound: close::LengthBound, + } + pub mod close { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Index = ::core::primitive::u32; + pub type ProposalWeightBound = runtime_types::sp_weights::weight_v2::Weight; + pub type LengthBound = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Close { + const PALLET: &'static str = "Council"; + const CALL: &'static str = "close"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Set the collective's membership."] + #[doc = ""] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] + #[doc = ""] + #[doc = "The dispatch of this call must be `SetMembersOrigin`."] + #[doc = ""] + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "## Complexity:"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + pub fn set_members( + &self, + new_members: types::set_members::NewMembers, + prime: types::set_members::Prime, + old_count: types::set_members::OldCount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Council", + "set_members", + types::SetMembers { new_members, prime, old_count }, + [ + 66u8, 224u8, 186u8, 178u8, 41u8, 208u8, 67u8, 192u8, 57u8, 242u8, + 141u8, 31u8, 216u8, 118u8, 192u8, 43u8, 125u8, 213u8, 226u8, 85u8, + 142u8, 225u8, 131u8, 45u8, 172u8, 142u8, 12u8, 9u8, 73u8, 7u8, 218u8, + 61u8, + ], + ) + } + #[doc = "Dispatch a proposal from a member using the `Member` origin."] + #[doc = ""] + #[doc = "Origin must be a member of the collective."] + #[doc = ""] + #[doc = "## Complexity:"] + #[doc = "- `O(B + M + P)` where:"] + #[doc = "- `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = "- `M` members-count (code-bounded)"] + #[doc = "- `P` complexity of dispatching `proposal`"] + pub fn execute( + &self, + proposal: types::execute::Proposal, + length_bound: types::execute::LengthBound, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Council", + "execute", + types::Execute { + proposal: ::subxt_core::alloc::boxed::Box::new(proposal), + length_bound, + }, + [ + 25u8, 78u8, 141u8, 134u8, 250u8, 121u8, 134u8, 37u8, 4u8, 114u8, 176u8, + 202u8, 172u8, 131u8, 252u8, 23u8, 166u8, 254u8, 12u8, 152u8, 218u8, + 66u8, 251u8, 67u8, 249u8, 207u8, 243u8, 149u8, 135u8, 12u8, 129u8, + 188u8, + ], + ) + } + #[doc = "Add a new proposal to either be voted on or executed directly."] + #[doc = ""] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + pub fn propose( + &self, + threshold: types::propose::Threshold, + proposal: types::propose::Proposal, + length_bound: types::propose::LengthBound, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Council", + "propose", + types::Propose { + threshold, + proposal: ::subxt_core::alloc::boxed::Box::new(proposal), + length_bound, + }, + [ + 57u8, 147u8, 21u8, 4u8, 222u8, 198u8, 151u8, 1u8, 83u8, 157u8, 13u8, + 147u8, 193u8, 135u8, 216u8, 178u8, 22u8, 14u8, 6u8, 123u8, 1u8, 97u8, + 32u8, 83u8, 11u8, 138u8, 153u8, 165u8, 37u8, 38u8, 164u8, 158u8, + ], + ) + } + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Requires the sender to be a member."] + #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = "## Complexity"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + pub fn vote( + &self, + proposal: types::vote::Proposal, + index: types::vote::Index, + approve: types::vote::Approve, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Council", + "vote", + types::Vote { proposal, index, approve }, + [ + 110u8, 141u8, 24u8, 33u8, 91u8, 7u8, 89u8, 198u8, 54u8, 10u8, 76u8, + 129u8, 45u8, 20u8, 216u8, 104u8, 231u8, 246u8, 174u8, 205u8, 190u8, + 176u8, 171u8, 113u8, 33u8, 37u8, 155u8, 203u8, 251u8, 34u8, 25u8, + 120u8, + ], + ) + } + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(P) where P is the number of max proposals"] + pub fn disapprove_proposal( + &self, + proposal_hash: types::disapprove_proposal::ProposalHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Council", + "disapprove_proposal", + types::DisapproveProposal { proposal_hash }, + [ + 26u8, 140u8, 111u8, 193u8, 229u8, 59u8, 53u8, 196u8, 230u8, 60u8, 7u8, + 155u8, 168u8, 7u8, 201u8, 177u8, 70u8, 103u8, 190u8, 57u8, 244u8, + 156u8, 67u8, 101u8, 228u8, 6u8, 213u8, 83u8, 225u8, 95u8, 148u8, 96u8, + ], + ) + } + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + pub fn close( + &self, + proposal_hash: types::close::ProposalHash, + index: types::close::Index, + proposal_weight_bound: types::close::ProposalWeightBound, + length_bound: types::close::LengthBound, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Council", + "close", + types::Close { proposal_hash, index, proposal_weight_bound, length_bound }, + [ + 136u8, 48u8, 243u8, 34u8, 60u8, 109u8, 186u8, 158u8, 72u8, 48u8, 62u8, + 34u8, 167u8, 46u8, 33u8, 142u8, 239u8, 43u8, 238u8, 125u8, 94u8, 80u8, + 157u8, 245u8, 220u8, 126u8, 58u8, 244u8, 186u8, 195u8, 30u8, 127u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_collective::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] + #[doc = "`MemberCount`)."] + pub struct Proposed { + pub account: proposed::Account, + pub proposal_index: proposed::ProposalIndex, + pub proposal_hash: proposed::ProposalHash, + pub threshold: proposed::Threshold, + } + pub mod proposed { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type ProposalIndex = ::core::primitive::u32; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Threshold = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Proposed { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "Proposed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A motion (given hash) has been voted on by given account, leaving"] + #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] + pub struct Voted { + pub account: voted::Account, + pub proposal_hash: voted::ProposalHash, + pub voted: voted::Voted, + pub yes: voted::Yes, + pub no: voted::No, + } + pub mod voted { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Voted = ::core::primitive::bool; + pub type Yes = ::core::primitive::u32; + pub type No = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Voted { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "Voted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A motion was approved by the required threshold."] + pub struct Approved { + pub proposal_hash: approved::ProposalHash, + } + pub mod approved { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Approved { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "Approved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A motion was not approved by the required threshold."] + pub struct Disapproved { + pub proposal_hash: disapproved::ProposalHash, + } + pub mod disapproved { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Disapproved { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "Disapproved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A motion was executed; result will be `Ok` if it returned without error."] + pub struct Executed { + pub proposal_hash: executed::ProposalHash, + pub result: executed::Result, + } + pub mod executed { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for Executed { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "Executed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A single member did some action; result will be `Ok` if it returned without error."] + pub struct MemberExecuted { + pub proposal_hash: member_executed::ProposalHash, + pub result: member_executed::Result, + } + pub mod member_executed { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for MemberExecuted { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "MemberExecuted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] + pub struct Closed { + pub proposal_hash: closed::ProposalHash, + pub yes: closed::Yes, + pub no: closed::No, + } + pub mod closed { + use super::runtime_types; + pub type ProposalHash = ::subxt_core::utils::H256; + pub type Yes = ::core::primitive::u32; + pub type No = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Closed { + const PALLET: &'static str = "Council"; + const EVENT: &'static str = "Closed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod proposals { + use super::runtime_types; + pub type Proposals = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::H256, + >; + } + pub mod proposal_of { + use super::runtime_types; + pub type ProposalOf = runtime_types::tangle_testnet_runtime::RuntimeCall; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod voting { + use super::runtime_types; + pub type Voting = runtime_types::pallet_collective::Votes< + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + >; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod proposal_count { + use super::runtime_types; + pub type ProposalCount = ::core::primitive::u32; + } + pub mod members { + use super::runtime_types; + pub type Members = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + pub mod prime { + use super::runtime_types; + pub type Prime = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The hashes of the active proposals."] + pub fn proposals( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::proposals::Proposals, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "Proposals", + (), + [ + 210u8, 234u8, 7u8, 29u8, 231u8, 80u8, 17u8, 36u8, 189u8, 34u8, 175u8, + 147u8, 56u8, 92u8, 201u8, 104u8, 207u8, 150u8, 58u8, 110u8, 90u8, 28u8, + 198u8, 79u8, 236u8, 245u8, 19u8, 38u8, 68u8, 59u8, 215u8, 74u8, + ], + ) + } + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::proposal_of::ProposalOf, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "ProposalOf", + (), + [ + 1u8, 155u8, 164u8, 23u8, 178u8, 68u8, 202u8, 232u8, 246u8, 43u8, 116u8, + 250u8, 214u8, 41u8, 49u8, 177u8, 103u8, 89u8, 196u8, 206u8, 89u8, + 151u8, 37u8, 141u8, 46u8, 178u8, 151u8, 10u8, 148u8, 223u8, 116u8, + 142u8, + ], + ) + } + #[doc = " Actual proposal for a given hash, if it's current."] + pub fn proposal_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::proposal_of::ProposalOf, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "ProposalOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 1u8, 155u8, 164u8, 23u8, 178u8, 68u8, 202u8, 232u8, 246u8, 43u8, 116u8, + 250u8, 214u8, 41u8, 49u8, 177u8, 103u8, 89u8, 196u8, 206u8, 89u8, + 151u8, 37u8, 141u8, 46u8, 178u8, 151u8, 10u8, 148u8, 223u8, 116u8, + 142u8, + ], + ) + } + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::voting::Voting, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "Voting", + (), + [ + 224u8, 140u8, 244u8, 24u8, 39u8, 198u8, 146u8, 44u8, 158u8, 251u8, 1u8, + 108u8, 40u8, 35u8, 34u8, 27u8, 98u8, 168u8, 153u8, 39u8, 174u8, 84u8, + 203u8, 77u8, 210u8, 34u8, 27u8, 4u8, 34u8, 23u8, 192u8, 216u8, + ], + ) + } + #[doc = " Votes on a given proposal, if it is ongoing."] + pub fn voting( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::voting::Voting, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "Voting", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 224u8, 140u8, 244u8, 24u8, 39u8, 198u8, 146u8, 44u8, 158u8, 251u8, 1u8, + 108u8, 40u8, 35u8, 34u8, 27u8, 98u8, 168u8, 153u8, 39u8, 174u8, 84u8, + 203u8, 77u8, 210u8, 34u8, 27u8, 4u8, 34u8, 23u8, 192u8, 216u8, + ], + ) + } + #[doc = " Proposals so far."] + pub fn proposal_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::proposal_count::ProposalCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "ProposalCount", + (), + [ + 91u8, 238u8, 246u8, 106u8, 95u8, 66u8, 83u8, 134u8, 1u8, 225u8, 164u8, + 216u8, 113u8, 101u8, 203u8, 200u8, 113u8, 97u8, 246u8, 228u8, 140u8, + 29u8, 29u8, 48u8, 176u8, 137u8, 93u8, 230u8, 56u8, 75u8, 51u8, 149u8, + ], + ) + } + #[doc = " The current members of the collective. This is stored sorted (just by value)."] + pub fn members( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::members::Members, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "Members", + (), + [ + 16u8, 29u8, 32u8, 222u8, 175u8, 136u8, 111u8, 101u8, 43u8, 74u8, 209u8, + 81u8, 47u8, 97u8, 129u8, 39u8, 225u8, 243u8, 110u8, 229u8, 237u8, 21u8, + 90u8, 127u8, 80u8, 239u8, 156u8, 32u8, 90u8, 109u8, 179u8, 0u8, + ], + ) + } + #[doc = " The prime member that helps determine the default vote behavior in case of abstentions."] + pub fn prime( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::prime::Prime, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Council", + "Prime", + (), + [ + 72u8, 128u8, 214u8, 72u8, 78u8, 80u8, 100u8, 198u8, 114u8, 215u8, 59u8, + 3u8, 103u8, 14u8, 152u8, 202u8, 12u8, 165u8, 224u8, 10u8, 41u8, 154u8, + 77u8, 95u8, 116u8, 143u8, 250u8, 250u8, 176u8, 92u8, 238u8, 154u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight of a dispatch call that can be proposed and executed."] + pub fn max_proposal_weight( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Council", + "MaxProposalWeight", + [ + 149u8, 252u8, 129u8, 80u8, 169u8, 36u8, 79u8, 127u8, 240u8, 156u8, + 56u8, 202u8, 219u8, 86u8, 5u8, 65u8, 245u8, 148u8, 138u8, 243u8, 210u8, + 128u8, 234u8, 216u8, 240u8, 219u8, 123u8, 235u8, 21u8, 158u8, 237u8, + 112u8, + ], + ) + } + } + } + } + pub mod vesting { + use super::root_mod; + use super::runtime_types; + #[doc = "Error for the vesting pallet."] + pub type Error = runtime_types::pallet_vesting::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_vesting::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unlock any vested funds of the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct Vest; + impl ::subxt_core::blocks::StaticExtrinsic for Vest { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "vest"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unlock any vested funds of a `target` account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct VestOther { + pub target: vest_other::Target, + } + pub mod vest_other { + use super::runtime_types; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for VestOther { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "vest_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct VestedTransfer { + pub target: vested_transfer::Target, + pub schedule: vested_transfer::Schedule, + } + pub mod vested_transfer { + use super::runtime_types; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Schedule = runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u64, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for VestedTransfer { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "vested_transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub struct ForceVestedTransfer { + pub source: force_vested_transfer::Source, + pub target: force_vested_transfer::Target, + pub schedule: force_vested_transfer::Schedule, + } + pub mod force_vested_transfer { + use super::runtime_types; + pub type Source = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Schedule = runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u64, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceVestedTransfer { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "force_vested_transfer"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] + #[doc = ""] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub struct MergeSchedules { + pub schedule1_index: merge_schedules::Schedule1Index, + pub schedule2_index: merge_schedules::Schedule2Index, + } + pub mod merge_schedules { + use super::runtime_types; + pub type Schedule1Index = ::core::primitive::u32; + pub type Schedule2Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for MergeSchedules { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "merge_schedules"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force remove a vesting schedule"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `target`: An account that has a vesting schedule"] + #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] + pub struct ForceRemoveVestingSchedule { + pub target: force_remove_vesting_schedule::Target, + pub schedule_index: force_remove_vesting_schedule::ScheduleIndex, + } + pub mod force_remove_vesting_schedule { + use super::runtime_types; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type ScheduleIndex = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceRemoveVestingSchedule { + const PALLET: &'static str = "Vesting"; + const CALL: &'static str = "force_remove_vesting_schedule"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Unlock any vested funds of the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest(&self) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "vest", + types::Vest {}, + [ + 149u8, 89u8, 178u8, 148u8, 127u8, 127u8, 155u8, 60u8, 114u8, 126u8, + 204u8, 123u8, 166u8, 70u8, 104u8, 208u8, 186u8, 69u8, 139u8, 181u8, + 151u8, 154u8, 235u8, 161u8, 191u8, 35u8, 111u8, 60u8, 21u8, 165u8, + 44u8, 122u8, + ], + ) + } + #[doc = "Unlock any vested funds of a `target` account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vest_other( + &self, + target: types::vest_other::Target, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "vest_other", + types::VestOther { target }, + [ + 19u8, 61u8, 216u8, 215u8, 68u8, 5u8, 173u8, 138u8, 29u8, 5u8, 46u8, + 138u8, 33u8, 189u8, 63u8, 251u8, 1u8, 79u8, 138u8, 166u8, 87u8, 154u8, + 141u8, 187u8, 28u8, 202u8, 144u8, 6u8, 231u8, 230u8, 197u8, 171u8, + ], + ) + } + #[doc = "Create a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn vested_transfer( + &self, + target: types::vested_transfer::Target, + schedule: types::vested_transfer::Schedule, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "vested_transfer", + types::VestedTransfer { target, schedule }, + [ + 154u8, 217u8, 177u8, 183u8, 138u8, 67u8, 49u8, 19u8, 60u8, 186u8, 84u8, + 104u8, 183u8, 180u8, 148u8, 9u8, 177u8, 187u8, 173u8, 48u8, 103u8, + 125u8, 107u8, 221u8, 52u8, 168u8, 34u8, 162u8, 170u8, 89u8, 85u8, + 181u8, + ], + ) + } + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + pub fn force_vested_transfer( + &self, + source: types::force_vested_transfer::Source, + target: types::force_vested_transfer::Target, + schedule: types::force_vested_transfer::Schedule, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "force_vested_transfer", + types::ForceVestedTransfer { source, target, schedule }, + [ + 197u8, 0u8, 47u8, 118u8, 86u8, 214u8, 105u8, 187u8, 120u8, 32u8, 9u8, + 237u8, 131u8, 102u8, 155u8, 198u8, 9u8, 103u8, 207u8, 87u8, 249u8, + 53u8, 69u8, 38u8, 185u8, 27u8, 151u8, 252u8, 95u8, 32u8, 191u8, 176u8, + ], + ) + } + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] + #[doc = ""] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + pub fn merge_schedules( + &self, + schedule1_index: types::merge_schedules::Schedule1Index, + schedule2_index: types::merge_schedules::Schedule2Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "merge_schedules", + types::MergeSchedules { schedule1_index, schedule2_index }, + [ + 45u8, 24u8, 13u8, 108u8, 26u8, 99u8, 61u8, 117u8, 195u8, 218u8, 182u8, + 23u8, 188u8, 157u8, 181u8, 81u8, 38u8, 136u8, 31u8, 226u8, 8u8, 190u8, + 33u8, 81u8, 86u8, 185u8, 156u8, 77u8, 157u8, 197u8, 41u8, 58u8, + ], + ) + } + #[doc = "Force remove a vesting schedule"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `target`: An account that has a vesting schedule"] + #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] + pub fn force_remove_vesting_schedule( + &self, + target: types::force_remove_vesting_schedule::Target, + schedule_index: types::force_remove_vesting_schedule::ScheduleIndex, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Vesting", + "force_remove_vesting_schedule", + types::ForceRemoveVestingSchedule { target, schedule_index }, + [ + 108u8, 122u8, 108u8, 117u8, 151u8, 129u8, 44u8, 239u8, 169u8, 231u8, + 237u8, 5u8, 74u8, 254u8, 229u8, 71u8, 240u8, 134u8, 128u8, 180u8, + 171u8, 240u8, 221u8, 38u8, 133u8, 95u8, 31u8, 168u8, 48u8, 6u8, 213u8, + 244u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_vesting::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + pub struct VestingUpdated { + pub account: vesting_updated::Account, + pub unvested: vesting_updated::Unvested, + } + pub mod vesting_updated { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type Unvested = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for VestingUpdated { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An \\[account\\] has become fully vested."] + pub struct VestingCompleted { + pub account: vesting_completed::Account, + } + pub mod vesting_completed { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for VestingCompleted { + const PALLET: &'static str = "Vesting"; + const EVENT: &'static str = "VestingCompleted"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod vesting { + use super::runtime_types; + pub type Vesting = runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u64, + >, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod storage_version { + use super::runtime_types; + pub type StorageVersion = runtime_types::pallet_vesting::Releases; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::vesting::Vesting, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Vesting", + "Vesting", + (), + [ + 37u8, 146u8, 66u8, 220u8, 99u8, 154u8, 82u8, 170u8, 197u8, 250u8, 73u8, + 125u8, 96u8, 104u8, 37u8, 226u8, 30u8, 111u8, 75u8, 18u8, 130u8, 206u8, + 20u8, 103u8, 82u8, 60u8, 211u8, 156u8, 40u8, 163u8, 103u8, 92u8, + ], + ) + } + #[doc = " Information regarding the vesting of a given account."] + pub fn vesting( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::vesting::Vesting, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Vesting", + "Vesting", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 37u8, 146u8, 66u8, 220u8, 99u8, 154u8, 82u8, 170u8, 197u8, 250u8, 73u8, + 125u8, 96u8, 104u8, 37u8, 226u8, 30u8, 111u8, 75u8, 18u8, 130u8, 206u8, + 20u8, 103u8, 82u8, 60u8, 211u8, 156u8, 40u8, 163u8, 103u8, 92u8, + ], + ) + } + #[doc = " Storage version of the pallet."] + #[doc = ""] + #[doc = " New networks start with latest version, as determined by the genesis build."] + pub fn storage_version( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::storage_version::StorageVersion, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Vesting", + "StorageVersion", + (), + [ + 230u8, 137u8, 180u8, 133u8, 142u8, 124u8, 231u8, 234u8, 223u8, 10u8, + 154u8, 98u8, 158u8, 253u8, 228u8, 80u8, 5u8, 9u8, 91u8, 210u8, 252u8, + 9u8, 13u8, 195u8, 193u8, 164u8, 129u8, 113u8, 128u8, 218u8, 8u8, 40u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount transferred to call `vested_transfer`."] + pub fn min_vested_transfer( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Vesting", + "MinVestedTransfer", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + pub fn max_vesting_schedules( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Vesting", + "MaxVestingSchedules", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod elections { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_elections_phragmen::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_elections_phragmen::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] + #[doc = "set the initial votes, or update already existing votes."] + #[doc = ""] + #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] + #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] + #[doc = ""] + #[doc = "The `votes` should:"] + #[doc = " - not be empty."] + #[doc = " - be less than the number of possible candidates. Note that all current members and"] + #[doc = " runners-up are also automatically candidates for the next round."] + #[doc = ""] + #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] + #[doc = "lock and keep some for further operations."] + pub struct Vote { + pub votes: vote::Votes, + #[codec(compact)] + pub value: vote::Value, + } + pub mod vote { + use super::runtime_types; + pub type Votes = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Vote { + const PALLET: &'static str = "Elections"; + const CALL: &'static str = "vote"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove `origin` as a voter."] + #[doc = ""] + #[doc = "This removes the lock and returns the deposit."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed and be a voter."] + pub struct RemoveVoter; + impl ::subxt_core::blocks::StaticExtrinsic for RemoveVoter { + const PALLET: &'static str = "Elections"; + const CALL: &'static str = "remove_voter"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] + #[doc = ""] + #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] + #[doc = "or leave the system while their deposit is slashed."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] + #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] + #[doc = ""] + #[doc = "The number of current candidates must be provided as witness data."] + #[doc = "## Complexity"] + #[doc = "O(C + log(C)) where C is candidate_count."] + pub struct SubmitCandidacy { + #[codec(compact)] + pub candidate_count: submit_candidacy::CandidateCount, + } + pub mod submit_candidacy { + use super::runtime_types; + pub type CandidateCount = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for SubmitCandidacy { + const PALLET: &'static str = "Elections"; + const CALL: &'static str = "submit_candidacy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] + #[doc = "outcomes exist:"] + #[doc = ""] + #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] + #[doc = " unreserved, returned and origin is removed as a candidate."] + #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] + #[doc = " origin is removed as a runner-up."] + #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] + #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] + #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] + #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] + #[doc = " next round."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] + #[doc = "The type of renouncing must be provided as witness data."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = " - Renouncing::Candidate(count): O(count + log(count))"] + #[doc = " - Renouncing::Member: O(1)"] + #[doc = " - Renouncing::RunnerUp: O(1)"] + pub struct RenounceCandidacy { + pub renouncing: renounce_candidacy::Renouncing, + } + pub mod renounce_candidacy { + use super::runtime_types; + pub type Renouncing = runtime_types::pallet_elections_phragmen::Renouncing; + } + impl ::subxt_core::blocks::StaticExtrinsic for RenounceCandidacy { + const PALLET: &'static str = "Elections"; + const CALL: &'static str = "renounce_candidacy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] + #[doc = "the outgoing member is slashed."] + #[doc = ""] + #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] + #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] + #[doc = "started, else, nothing happens."] + #[doc = ""] + #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] + #[doc = "it is returned."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "Note that this does not affect the designated block number of the next election."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Check details of remove_and_replace_member() and do_phragmen()."] + pub struct RemoveMember { + pub who: remove_member::Who, + pub slash_bond: remove_member::SlashBond, + pub rerun_election: remove_member::RerunElection, + } + pub mod remove_member { + use super::runtime_types; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type SlashBond = ::core::primitive::bool; + pub type RerunElection = ::core::primitive::bool; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveMember { + const PALLET: &'static str = "Elections"; + const CALL: &'static str = "remove_member"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] + #[doc = "deposit of the removed voters are returned."] + #[doc = ""] + #[doc = "This is an root function to be used only for cleaning the state."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Check is_defunct_voter() details."] + pub struct CleanDefunctVoters { + pub num_voters: clean_defunct_voters::NumVoters, + pub num_defunct: clean_defunct_voters::NumDefunct, + } + pub mod clean_defunct_voters { + use super::runtime_types; + pub type NumVoters = ::core::primitive::u32; + pub type NumDefunct = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CleanDefunctVoters { + const PALLET: &'static str = "Elections"; + const CALL: &'static str = "clean_defunct_voters"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] + #[doc = "set the initial votes, or update already existing votes."] + #[doc = ""] + #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] + #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] + #[doc = ""] + #[doc = "The `votes` should:"] + #[doc = " - not be empty."] + #[doc = " - be less than the number of possible candidates. Note that all current members and"] + #[doc = " runners-up are also automatically candidates for the next round."] + #[doc = ""] + #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] + #[doc = "lock and keep some for further operations."] + pub fn vote( + &self, + votes: types::vote::Votes, + value: types::vote::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Elections", + "vote", + types::Vote { votes, value }, + [ + 229u8, 163u8, 1u8, 49u8, 26u8, 130u8, 7u8, 228u8, 34u8, 80u8, 17u8, + 125u8, 32u8, 180u8, 174u8, 69u8, 17u8, 171u8, 163u8, 54u8, 42u8, 139u8, + 201u8, 205u8, 196u8, 18u8, 16u8, 211u8, 252u8, 64u8, 73u8, 5u8, + ], + ) + } + #[doc = "Remove `origin` as a voter."] + #[doc = ""] + #[doc = "This removes the lock and returns the deposit."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed and be a voter."] + pub fn remove_voter( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Elections", + "remove_voter", + types::RemoveVoter {}, + [ + 89u8, 43u8, 70u8, 117u8, 76u8, 84u8, 230u8, 114u8, 229u8, 91u8, 75u8, + 213u8, 47u8, 143u8, 233u8, 47u8, 108u8, 120u8, 171u8, 167u8, 14u8, + 62u8, 52u8, 20u8, 227u8, 106u8, 249u8, 239u8, 33u8, 115u8, 155u8, + 106u8, + ], + ) + } + #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] + #[doc = ""] + #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] + #[doc = "or leave the system while their deposit is slashed."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] + #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] + #[doc = ""] + #[doc = "The number of current candidates must be provided as witness data."] + #[doc = "## Complexity"] + #[doc = "O(C + log(C)) where C is candidate_count."] + pub fn submit_candidacy( + &self, + candidate_count: types::submit_candidacy::CandidateCount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Elections", + "submit_candidacy", + types::SubmitCandidacy { candidate_count }, + [ + 229u8, 169u8, 247u8, 102u8, 33u8, 7u8, 9u8, 125u8, 190u8, 179u8, 241u8, + 220u8, 205u8, 242u8, 168u8, 112u8, 197u8, 169u8, 135u8, 133u8, 102u8, + 173u8, 168u8, 203u8, 17u8, 135u8, 224u8, 145u8, 101u8, 204u8, 253u8, + 4u8, + ], + ) + } + #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] + #[doc = "outcomes exist:"] + #[doc = ""] + #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] + #[doc = " unreserved, returned and origin is removed as a candidate."] + #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] + #[doc = " origin is removed as a runner-up."] + #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] + #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] + #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] + #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] + #[doc = " next round."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] + #[doc = "The type of renouncing must be provided as witness data."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = " - Renouncing::Candidate(count): O(count + log(count))"] + #[doc = " - Renouncing::Member: O(1)"] + #[doc = " - Renouncing::RunnerUp: O(1)"] + pub fn renounce_candidacy( + &self, + renouncing: types::renounce_candidacy::Renouncing, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Elections", + "renounce_candidacy", + types::RenounceCandidacy { renouncing }, + [ + 230u8, 140u8, 205u8, 240u8, 110u8, 247u8, 242u8, 185u8, 228u8, 135u8, + 243u8, 73u8, 71u8, 200u8, 88u8, 134u8, 132u8, 174u8, 190u8, 251u8, + 81u8, 85u8, 174u8, 230u8, 94u8, 97u8, 96u8, 230u8, 15u8, 204u8, 247u8, + 214u8, + ], + ) + } + #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] + #[doc = "the outgoing member is slashed."] + #[doc = ""] + #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] + #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] + #[doc = "started, else, nothing happens."] + #[doc = ""] + #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] + #[doc = "it is returned."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "Note that this does not affect the designated block number of the next election."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Check details of remove_and_replace_member() and do_phragmen()."] + pub fn remove_member( + &self, + who: types::remove_member::Who, + slash_bond: types::remove_member::SlashBond, + rerun_election: types::remove_member::RerunElection, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Elections", + "remove_member", + types::RemoveMember { who, slash_bond, rerun_election }, + [ + 108u8, 79u8, 187u8, 116u8, 243u8, 133u8, 188u8, 142u8, 71u8, 3u8, + 206u8, 109u8, 255u8, 118u8, 165u8, 21u8, 38u8, 192u8, 205u8, 69u8, + 223u8, 240u8, 104u8, 85u8, 234u8, 153u8, 153u8, 120u8, 36u8, 70u8, + 67u8, 124u8, + ], + ) + } + #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] + #[doc = "deposit of the removed voters are returned."] + #[doc = ""] + #[doc = "This is an root function to be used only for cleaning the state."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Check is_defunct_voter() details."] + pub fn clean_defunct_voters( + &self, + num_voters: types::clean_defunct_voters::NumVoters, + num_defunct: types::clean_defunct_voters::NumDefunct, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Elections", + "clean_defunct_voters", + types::CleanDefunctVoters { num_voters, num_defunct }, + [ + 99u8, 129u8, 198u8, 141u8, 41u8, 90u8, 151u8, 167u8, 50u8, 236u8, 88u8, + 57u8, 25u8, 26u8, 130u8, 61u8, 123u8, 177u8, 98u8, 57u8, 39u8, 204u8, + 29u8, 24u8, 191u8, 229u8, 224u8, 110u8, 223u8, 248u8, 191u8, 177u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] + #[doc = "the election, not that enough have has been elected. The inner value must be examined"] + #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] + #[doc = "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to"] + #[doc = "begin with."] + pub struct NewTerm { + pub new_members: new_term::NewMembers, + } + pub mod new_term { + use super::runtime_types; + pub type NewMembers = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + )>; + } + impl ::subxt_core::events::StaticEvent for NewTerm { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "NewTerm"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "No (or not enough) candidates existed for this round. This is different from"] + #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] + pub struct EmptyTerm; + impl ::subxt_core::events::StaticEvent for EmptyTerm { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "EmptyTerm"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Internal error happened while trying to perform election."] + pub struct ElectionError; + impl ::subxt_core::events::StaticEvent for ElectionError { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "ElectionError"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] + #[doc = "`EmptyTerm`."] + pub struct MemberKicked { + pub member: member_kicked::Member, + } + pub mod member_kicked { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for MemberKicked { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "MemberKicked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Someone has renounced their candidacy."] + pub struct Renounced { + pub candidate: renounced::Candidate, + } + pub mod renounced { + use super::runtime_types; + pub type Candidate = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Renounced { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "Renounced"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] + #[doc = "runner-up."] + #[doc = ""] + #[doc = "Note that old members and runners-up are also candidates."] + pub struct CandidateSlashed { + pub candidate: candidate_slashed::Candidate, + pub amount: candidate_slashed::Amount, + } + pub mod candidate_slashed { + use super::runtime_types; + pub type Candidate = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for CandidateSlashed { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "CandidateSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] + pub struct SeatHolderSlashed { + pub seat_holder: seat_holder_slashed::SeatHolder, + pub amount: seat_holder_slashed::Amount, + } + pub mod seat_holder_slashed { + use super::runtime_types; + pub type SeatHolder = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for SeatHolderSlashed { + const PALLET: &'static str = "Elections"; + const EVENT: &'static str = "SeatHolderSlashed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod members { + use super::runtime_types; + pub type Members = ::subxt_core::alloc::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >, + >; + } + pub mod runners_up { + use super::runtime_types; + pub type RunnersUp = ::subxt_core::alloc::vec::Vec< + runtime_types::pallet_elections_phragmen::SeatHolder< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >, + >; + } + pub mod candidates { + use super::runtime_types; + pub type Candidates = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + )>; + } + pub mod election_rounds { + use super::runtime_types; + pub type ElectionRounds = ::core::primitive::u32; + } + pub mod voting { + use super::runtime_types; + pub type Voting = runtime_types::pallet_elections_phragmen::Voter< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The current elected members."] + #[doc = ""] + #[doc = " Invariant: Always sorted based on account id."] + pub fn members( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::members::Members, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Elections", + "Members", + (), + [ + 121u8, 128u8, 120u8, 242u8, 54u8, 127u8, 90u8, 113u8, 74u8, 54u8, + 181u8, 207u8, 213u8, 130u8, 123u8, 238u8, 66u8, 247u8, 177u8, 209u8, + 47u8, 106u8, 3u8, 130u8, 57u8, 217u8, 190u8, 164u8, 92u8, 223u8, 53u8, + 8u8, + ], + ) + } + #[doc = " The current reserved runners-up."] + #[doc = ""] + #[doc = " Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the"] + #[doc = " last (i.e. _best_) runner-up will be replaced."] + pub fn runners_up( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::runners_up::RunnersUp, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Elections", + "RunnersUp", + (), + [ + 252u8, 213u8, 152u8, 58u8, 93u8, 84u8, 170u8, 162u8, 180u8, 51u8, 52u8, + 156u8, 18u8, 58u8, 210u8, 150u8, 76u8, 159u8, 75u8, 43u8, 103u8, 21u8, + 181u8, 184u8, 155u8, 198u8, 236u8, 173u8, 245u8, 49u8, 134u8, 153u8, + ], + ) + } + #[doc = " The present candidate list. A current member or runner-up can never enter this vector"] + #[doc = " and is always implicitly assumed to be a candidate."] + #[doc = ""] + #[doc = " Second element is the deposit."] + #[doc = ""] + #[doc = " Invariant: Always sorted based on account id."] + pub fn candidates( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::candidates::Candidates, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Elections", + "Candidates", + (), + [ + 220u8, 219u8, 115u8, 204u8, 15u8, 0u8, 135u8, 72u8, 241u8, 89u8, 10u8, + 105u8, 106u8, 93u8, 18u8, 63u8, 43u8, 117u8, 120u8, 73u8, 8u8, 143u8, + 244u8, 144u8, 223u8, 155u8, 217u8, 132u8, 246u8, 228u8, 210u8, 53u8, + ], + ) + } + #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."] + pub fn election_rounds( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::election_rounds::ElectionRounds, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Elections", + "ElectionRounds", + (), + [ + 97u8, 151u8, 159u8, 133u8, 59u8, 215u8, 12u8, 178u8, 203u8, 24u8, + 138u8, 36u8, 108u8, 134u8, 217u8, 137u8, 24u8, 6u8, 126u8, 87u8, 49u8, + 90u8, 198u8, 16u8, 36u8, 109u8, 223u8, 190u8, 81u8, 7u8, 239u8, 243u8, + ], + ) + } + #[doc = " Votes and locked stake of a particular voter."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] + pub fn voting_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::voting::Voting, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Elections", + "Voting", + (), + [ + 37u8, 74u8, 221u8, 188u8, 168u8, 43u8, 125u8, 246u8, 191u8, 21u8, 85u8, + 87u8, 124u8, 180u8, 218u8, 43u8, 186u8, 170u8, 140u8, 186u8, 88u8, + 71u8, 111u8, 22u8, 46u8, 207u8, 178u8, 96u8, 55u8, 203u8, 21u8, 92u8, + ], + ) + } + #[doc = " Votes and locked stake of a particular voter."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."] + pub fn voting( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::voting::Voting, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Elections", + "Voting", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 37u8, 74u8, 221u8, 188u8, 168u8, 43u8, 125u8, 246u8, 191u8, 21u8, 85u8, + 87u8, 124u8, 180u8, 218u8, 43u8, 186u8, 170u8, 140u8, 186u8, 88u8, + 71u8, 111u8, 22u8, 46u8, 207u8, 178u8, 96u8, 55u8, 203u8, 21u8, 92u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Identifier for the elections-phragmen pallet's lock"] + pub fn pallet_id( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<[::core::primitive::u8; 8usize]> + { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "PalletId", + [ + 157u8, 118u8, 79u8, 88u8, 241u8, 22u8, 185u8, 37u8, 42u8, 20u8, 133u8, + 240u8, 11u8, 25u8, 66u8, 154u8, 84u8, 163u8, 78u8, 92u8, 171u8, 82u8, + 248u8, 76u8, 189u8, 70u8, 142u8, 249u8, 153u8, 84u8, 180u8, 60u8, + ], + ) + } + #[doc = " How much should be locked up in order to submit one's candidacy."] + pub fn candidacy_bond( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "CandidacyBond", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Base deposit associated with voting."] + #[doc = ""] + #[doc = " This should be sensibly high to economically ensure the pallet cannot be attacked by"] + #[doc = " creating a gigantic number of votes."] + pub fn voting_bond_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "VotingBondBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of bond that need to be locked for each vote (32 bytes)."] + pub fn voting_bond_factor( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "VotingBondFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Number of members to elect."] + pub fn desired_members( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "DesiredMembers", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of runners_up to keep."] + pub fn desired_runners_up( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "DesiredRunnersUp", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " How long each seat is kept. This defines the next block number at which an election"] + #[doc = " round will happen. If set to zero, no elections are ever triggered and the module will"] + #[doc = " be in passive mode."] + pub fn term_duration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "TermDuration", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The maximum number of candidates in a phragmen election."] + #[doc = ""] + #[doc = " Warning: This impacts the size of the election which is run onchain. Chose wisely, and"] + #[doc = " consider how it will impact `T::WeightInfo::election_phragmen`."] + #[doc = ""] + #[doc = " When this limit is reached no more candidates are accepted in the election."] + pub fn max_candidates( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "MaxCandidates", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of voters to allow in a phragmen election."] + #[doc = ""] + #[doc = " Warning: This impacts the size of the election which is run onchain. Chose wisely, and"] + #[doc = " consider how it will impact `T::WeightInfo::election_phragmen`."] + #[doc = ""] + #[doc = " When the limit is reached the new voters are ignored."] + pub fn max_voters( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "MaxVoters", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum numbers of votes per voter."] + #[doc = ""] + #[doc = " Warning: This impacts the size of the election which is run onchain. Chose wisely, and"] + #[doc = " consider how it will impact `T::WeightInfo::election_phragmen`."] + pub fn max_votes_per_voter( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Elections", + "MaxVotesPerVoter", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod election_provider_multi_phase { + use super::root_mod; + use super::runtime_types; + #[doc = "Error of the pallet that can be returned in response to dispatches."] + pub type Error = runtime_types::pallet_election_provider_multi_phase::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_election_provider_multi_phase::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Submit a solution for the unsigned phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __none__."] + #[doc = ""] + #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] + #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] + #[doc = "that only active validators can submit this transaction when authoring a block (similar"] + #[doc = "to an inherent)."] + #[doc = ""] + #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] + #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] + #[doc = "putting their authoring reward at risk."] + #[doc = ""] + #[doc = "No deposit or reward is associated with this submission."] + pub struct SubmitUnsigned { + pub raw_solution: ::subxt_core::alloc::boxed::Box, + pub witness: submit_unsigned::Witness, + } + pub mod submit_unsigned { + use super::runtime_types; + pub type RawSolution = + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::tangle_testnet_runtime::NposSolution16, + >; + pub type Witness = + runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize; + } + impl ::subxt_core::blocks::StaticExtrinsic for SubmitUnsigned { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const CALL: &'static str = "submit_unsigned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a new value for `MinimumUntrustedScore`."] + #[doc = ""] + #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[doc = ""] + #[doc = "This check can be turned off by setting the value to `None`."] + pub struct SetMinimumUntrustedScore { + pub maybe_next_score: set_minimum_untrusted_score::MaybeNextScore, + } + pub mod set_minimum_untrusted_score { + use super::runtime_types; + pub type MaybeNextScore = + ::core::option::Option; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMinimumUntrustedScore { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const CALL: &'static str = "set_minimum_untrusted_score"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] + #[doc = "call to `ElectionProvider::elect`."] + #[doc = ""] + #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = ""] + #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] + #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] + #[doc = "memory/weight constrains)."] + pub struct SetEmergencyElectionResult { + pub supports: set_emergency_election_result::Supports, + } + pub mod set_emergency_election_result { + use super::runtime_types; + pub type Supports = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt_core::utils::AccountId32>, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetEmergencyElectionResult { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const CALL: &'static str = "set_emergency_election_result"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Submit a solution for the signed phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = ""] + #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] + #[doc = "of the signed phase."] + #[doc = ""] + #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] + #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] + pub struct Submit { + pub raw_solution: ::subxt_core::alloc::boxed::Box, + } + pub mod submit { + use super::runtime_types; + pub type RawSolution = + runtime_types::pallet_election_provider_multi_phase::RawSolution< + runtime_types::tangle_testnet_runtime::NposSolution16, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Submit { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const CALL: &'static str = "submit"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Trigger the governance fallback."] + #[doc = ""] + #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] + #[doc = "calling [`Call::set_emergency_election_result`]."] + pub struct GovernanceFallback { + pub maybe_max_voters: governance_fallback::MaybeMaxVoters, + pub maybe_max_targets: governance_fallback::MaybeMaxTargets, + } + pub mod governance_fallback { + use super::runtime_types; + pub type MaybeMaxVoters = ::core::option::Option<::core::primitive::u32>; + pub type MaybeMaxTargets = ::core::option::Option<::core::primitive::u32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for GovernanceFallback { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const CALL: &'static str = "governance_fallback"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Submit a solution for the unsigned phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __none__."] + #[doc = ""] + #[doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] + #[doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] + #[doc = "that only active validators can submit this transaction when authoring a block (similar"] + #[doc = "to an inherent)."] + #[doc = ""] + #[doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] + #[doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] + #[doc = "putting their authoring reward at risk."] + #[doc = ""] + #[doc = "No deposit or reward is associated with this submission."] + pub fn submit_unsigned( + &self, + raw_solution: types::submit_unsigned::RawSolution, + witness: types::submit_unsigned::Witness, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ElectionProviderMultiPhase", + "submit_unsigned", + types::SubmitUnsigned { + raw_solution: ::subxt_core::alloc::boxed::Box::new(raw_solution), + witness, + }, + [ + 237u8, 199u8, 102u8, 43u8, 103u8, 215u8, 145u8, 93u8, 71u8, 191u8, + 61u8, 144u8, 21u8, 58u8, 30u8, 51u8, 190u8, 219u8, 45u8, 66u8, 216u8, + 19u8, 62u8, 123u8, 197u8, 53u8, 249u8, 205u8, 117u8, 35u8, 32u8, 13u8, + ], + ) + } + #[doc = "Set a new value for `MinimumUntrustedScore`."] + #[doc = ""] + #[doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] + #[doc = ""] + #[doc = "This check can be turned off by setting the value to `None`."] + pub fn set_minimum_untrusted_score( + &self, + maybe_next_score: types::set_minimum_untrusted_score::MaybeNextScore, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ElectionProviderMultiPhase", + "set_minimum_untrusted_score", + types::SetMinimumUntrustedScore { maybe_next_score }, + [ + 244u8, 246u8, 85u8, 56u8, 156u8, 145u8, 169u8, 106u8, 16u8, 206u8, + 102u8, 216u8, 150u8, 180u8, 87u8, 153u8, 75u8, 177u8, 185u8, 55u8, + 37u8, 252u8, 214u8, 127u8, 103u8, 169u8, 198u8, 55u8, 10u8, 179u8, + 121u8, 219u8, + ], + ) + } + #[doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] + #[doc = "call to `ElectionProvider::elect`."] + #[doc = ""] + #[doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] + #[doc = ""] + #[doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] + #[doc = "feasibility check itself can in principle cause the election process to fail (due to"] + #[doc = "memory/weight constrains)."] + pub fn set_emergency_election_result( + &self, + supports: types::set_emergency_election_result::Supports, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ElectionProviderMultiPhase", + "set_emergency_election_result", + types::SetEmergencyElectionResult { supports }, + [ + 6u8, 170u8, 228u8, 255u8, 61u8, 131u8, 137u8, 36u8, 135u8, 91u8, 183u8, + 94u8, 172u8, 205u8, 113u8, 69u8, 191u8, 255u8, 223u8, 152u8, 255u8, + 160u8, 205u8, 51u8, 140u8, 183u8, 101u8, 38u8, 185u8, 100u8, 92u8, + 87u8, + ], + ) + } + #[doc = "Submit a solution for the signed phase."] + #[doc = ""] + #[doc = "The dispatch origin fo this call must be __signed__."] + #[doc = ""] + #[doc = "The solution is potentially queued, based on the claimed score and processed at the end"] + #[doc = "of the signed phase."] + #[doc = ""] + #[doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] + #[doc = "might be rewarded, slashed, or get all or a part of the deposit back."] + pub fn submit( + &self, + raw_solution: types::submit::RawSolution, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ElectionProviderMultiPhase", + "submit", + types::Submit { + raw_solution: ::subxt_core::alloc::boxed::Box::new(raw_solution), + }, + [ + 55u8, 254u8, 53u8, 183u8, 136u8, 93u8, 56u8, 39u8, 98u8, 132u8, 8u8, + 38u8, 92u8, 38u8, 199u8, 43u8, 20u8, 86u8, 114u8, 240u8, 31u8, 72u8, + 141u8, 39u8, 73u8, 116u8, 250u8, 249u8, 119u8, 36u8, 244u8, 137u8, + ], + ) + } + #[doc = "Trigger the governance fallback."] + #[doc = ""] + #[doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] + #[doc = "calling [`Call::set_emergency_election_result`]."] + pub fn governance_fallback( + &self, + maybe_max_voters: types::governance_fallback::MaybeMaxVoters, + maybe_max_targets: types::governance_fallback::MaybeMaxTargets, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ElectionProviderMultiPhase", + "governance_fallback", + types::GovernanceFallback { maybe_max_voters, maybe_max_targets }, + [ + 10u8, 56u8, 159u8, 48u8, 56u8, 246u8, 49u8, 9u8, 132u8, 156u8, 86u8, + 162u8, 52u8, 58u8, 175u8, 128u8, 12u8, 185u8, 203u8, 18u8, 99u8, 219u8, + 75u8, 13u8, 52u8, 40u8, 125u8, 212u8, 84u8, 147u8, 222u8, 17u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_election_provider_multi_phase::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A solution was stored with the given compute."] + #[doc = ""] + #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] + #[doc = "the stored solution was submitted in the signed phase by a miner with the `AccountId`."] + #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] + #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] + #[doc = "room for this one."] + pub struct SolutionStored { + pub compute: solution_stored::Compute, + pub origin: solution_stored::Origin, + pub prev_ejected: solution_stored::PrevEjected, + } + pub mod solution_stored { + use super::runtime_types; + pub type Compute = + runtime_types::pallet_election_provider_multi_phase::ElectionCompute; + pub type Origin = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type PrevEjected = ::core::primitive::bool; + } + impl ::subxt_core::events::StaticEvent for SolutionStored { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "SolutionStored"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The election has been finalized, with the given computation and score."] + pub struct ElectionFinalized { + pub compute: election_finalized::Compute, + pub score: election_finalized::Score, + } + pub mod election_finalized { + use super::runtime_types; + pub type Compute = + runtime_types::pallet_election_provider_multi_phase::ElectionCompute; + pub type Score = runtime_types::sp_npos_elections::ElectionScore; + } + impl ::subxt_core::events::StaticEvent for ElectionFinalized { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFinalized"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + pub struct ElectionFailed; + impl ::subxt_core::events::StaticEvent for ElectionFailed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "ElectionFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has been rewarded for their signed submission being finalized."] + pub struct Rewarded { + pub account: rewarded::Account, + pub value: rewarded::Value, + } + pub mod rewarded { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Rewarded { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Rewarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has been slashed for submitting an invalid signed submission."] + pub struct Slashed { + pub account: slashed::Account, + pub value: slashed::Value, + } + pub mod slashed { + use super::runtime_types; + pub type Account = ::subxt_core::utils::AccountId32; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Slashed { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "Slashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "There was a phase transition in a given round."] + pub struct PhaseTransitioned { + pub from: phase_transitioned::From, + pub to: phase_transitioned::To, + pub round: phase_transitioned::Round, + } + pub mod phase_transitioned { + use super::runtime_types; + pub type From = runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u64, + >; + pub type To = runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u64, + >; + pub type Round = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for PhaseTransitioned { + const PALLET: &'static str = "ElectionProviderMultiPhase"; + const EVENT: &'static str = "PhaseTransitioned"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod round { + use super::runtime_types; + pub type Round = ::core::primitive::u32; + } + pub mod current_phase { + use super::runtime_types; + pub type CurrentPhase = + runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u64, + >; + } + pub mod queued_solution { + use super::runtime_types; + pub type QueuedSolution = + runtime_types::pallet_election_provider_multi_phase::ReadySolution; + } + pub mod snapshot { + use super::runtime_types; + pub type Snapshot = + runtime_types::pallet_election_provider_multi_phase::RoundSnapshot< + ::subxt_core::utils::AccountId32, + ( + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >, + ), + >; + } + pub mod desired_targets { + use super::runtime_types; + pub type DesiredTargets = ::core::primitive::u32; + } + pub mod snapshot_metadata { + use super::runtime_types; + pub type SnapshotMetadata = + runtime_types::pallet_election_provider_multi_phase::SolutionOrSnapshotSize; + } + pub mod signed_submission_next_index { + use super::runtime_types; + pub type SignedSubmissionNextIndex = ::core::primitive::u32; + } + pub mod signed_submission_indices { + use super::runtime_types; + pub type SignedSubmissionIndices = + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::sp_npos_elections::ElectionScore, + ::core::primitive::u64, + ::core::primitive::u32, + )>; + } + pub mod signed_submissions_map { + use super::runtime_types; + pub type SignedSubmissionsMap = runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: tangle_testnet_runtime :: NposSolution16 > ; + pub type Param0 = ::core::primitive::u32; + } + pub mod minimum_untrusted_score { + use super::runtime_types; + pub type MinimumUntrustedScore = + runtime_types::sp_npos_elections::ElectionScore; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Internal counter for the number of rounds."] + #[doc = ""] + #[doc = " This is useful for de-duplication of transactions submitted to the pool, and general"] + #[doc = " diagnostics of the pallet."] + #[doc = ""] + #[doc = " This is merely incremented once per every time that an upstream `elect` is called."] + pub fn round( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::round::Round, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "Round", + (), + [ + 37u8, 2u8, 47u8, 240u8, 18u8, 213u8, 214u8, 74u8, 57u8, 4u8, 103u8, + 253u8, 45u8, 17u8, 123u8, 203u8, 173u8, 170u8, 234u8, 109u8, 139u8, + 143u8, 216u8, 3u8, 161u8, 5u8, 0u8, 106u8, 181u8, 214u8, 170u8, 105u8, + ], + ) + } + #[doc = " Current phase."] + pub fn current_phase( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_phase::CurrentPhase, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "CurrentPhase", + (), + [ + 240u8, 174u8, 151u8, 37u8, 255u8, 168u8, 43u8, 235u8, 45u8, 249u8, + 212u8, 160u8, 168u8, 242u8, 230u8, 151u8, 86u8, 67u8, 58u8, 21u8, + 173u8, 32u8, 28u8, 112u8, 100u8, 36u8, 57u8, 207u8, 163u8, 88u8, 133u8, + 75u8, + ], + ) + } + #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] + #[doc = ""] + #[doc = " Always sorted by score."] + pub fn queued_solution( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::queued_solution::QueuedSolution, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "QueuedSolution", + (), + [ + 70u8, 22u8, 249u8, 41u8, 72u8, 8u8, 99u8, 121u8, 102u8, 128u8, 244u8, + 104u8, 208u8, 244u8, 113u8, 122u8, 118u8, 17u8, 65u8, 78u8, 165u8, + 129u8, 117u8, 36u8, 244u8, 243u8, 153u8, 87u8, 46u8, 116u8, 103u8, + 43u8, + ], + ) + } + #[doc = " Snapshot data of the round."] + #[doc = ""] + #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] + #[doc = " Note: This storage type must only be mutated through [`SnapshotWrapper`]."] + pub fn snapshot( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::snapshot::Snapshot, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "Snapshot", + (), + [ + 103u8, 204u8, 76u8, 156u8, 154u8, 95u8, 115u8, 109u8, 135u8, 17u8, 9u8, + 137u8, 3u8, 184u8, 111u8, 198u8, 216u8, 3u8, 78u8, 115u8, 101u8, 235u8, + 52u8, 235u8, 245u8, 58u8, 191u8, 144u8, 61u8, 204u8, 159u8, 55u8, + ], + ) + } + #[doc = " Desired number of targets to elect for this round."] + #[doc = ""] + #[doc = " Only exists when [`Snapshot`] is present."] + #[doc = " Note: This storage type must only be mutated through [`SnapshotWrapper`]."] + pub fn desired_targets( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::desired_targets::DesiredTargets, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "DesiredTargets", + (), + [ + 67u8, 241u8, 33u8, 113u8, 62u8, 173u8, 233u8, 76u8, 99u8, 12u8, 61u8, + 237u8, 21u8, 252u8, 39u8, 37u8, 86u8, 167u8, 173u8, 53u8, 238u8, 172u8, + 97u8, 59u8, 27u8, 164u8, 163u8, 76u8, 140u8, 37u8, 159u8, 250u8, + ], + ) + } + #[doc = " The metadata of the [`RoundSnapshot`]"] + #[doc = ""] + #[doc = " Only exists when [`Snapshot`] is present."] + #[doc = " Note: This storage type must only be mutated through [`SnapshotWrapper`]."] + pub fn snapshot_metadata( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::snapshot_metadata::SnapshotMetadata, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SnapshotMetadata", + (), + [ + 48u8, 121u8, 12u8, 130u8, 174u8, 100u8, 114u8, 183u8, 83u8, 63u8, 44u8, + 147u8, 242u8, 223u8, 22u8, 107u8, 175u8, 182u8, 178u8, 254u8, 12u8, + 189u8, 37u8, 117u8, 95u8, 21u8, 19u8, 167u8, 56u8, 205u8, 49u8, 100u8, + ], + ) + } + #[doc = " The next index to be assigned to an incoming signed submission."] + #[doc = ""] + #[doc = " Every accepted submission is assigned a unique index; that index is bound to that particular"] + #[doc = " submission for the duration of the election. On election finalization, the next index is"] + #[doc = " reset to 0."] + #[doc = ""] + #[doc = " We can't just use `SignedSubmissionIndices.len()`, because that's a bounded set; past its"] + #[doc = " capacity, it will simply saturate. We can't just iterate over `SignedSubmissionsMap`,"] + #[doc = " because iteration is slow. Instead, we store the value here."] + pub fn signed_submission_next_index( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::signed_submission_next_index::SignedSubmissionNextIndex, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionNextIndex", + (), + [ + 188u8, 126u8, 77u8, 166u8, 42u8, 81u8, 12u8, 239u8, 195u8, 16u8, 132u8, + 178u8, 217u8, 158u8, 28u8, 19u8, 201u8, 148u8, 47u8, 105u8, 178u8, + 115u8, 17u8, 78u8, 71u8, 178u8, 205u8, 171u8, 71u8, 52u8, 194u8, 82u8, + ], + ) + } + #[doc = " A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a"] + #[doc = " value in `SignedSubmissions`."] + #[doc = ""] + #[doc = " We never need to process more than a single signed submission at a time. Signed submissions"] + #[doc = " can be quite large, so we're willing to pay the cost of multiple database accesses to access"] + #[doc = " them one at a time instead of reading and decoding all of them at once."] + pub fn signed_submission_indices( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::signed_submission_indices::SignedSubmissionIndices, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionIndices", + (), + [ + 197u8, 117u8, 54u8, 43u8, 218u8, 37u8, 186u8, 54u8, 160u8, 203u8, 7u8, + 203u8, 63u8, 182u8, 13u8, 4u8, 165u8, 173u8, 7u8, 29u8, 90u8, 255u8, + 183u8, 31u8, 35u8, 66u8, 115u8, 7u8, 220u8, 31u8, 1u8, 227u8, + ], + ) + } + #[doc = " Unchecked, signed solutions."] + #[doc = ""] + #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] + #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = ""] + #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] + pub fn signed_submissions_map_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::signed_submissions_map::SignedSubmissionsMap, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + (), + [ + 118u8, 12u8, 234u8, 73u8, 238u8, 134u8, 20u8, 105u8, 248u8, 39u8, 23u8, + 96u8, 157u8, 187u8, 14u8, 143u8, 135u8, 121u8, 77u8, 90u8, 154u8, + 221u8, 139u8, 28u8, 34u8, 8u8, 19u8, 246u8, 65u8, 155u8, 84u8, 53u8, + ], + ) + } + #[doc = " Unchecked, signed solutions."] + #[doc = ""] + #[doc = " Together with `SubmissionIndices`, this stores a bounded set of `SignedSubmissions` while"] + #[doc = " allowing us to keep only a single one in memory at a time."] + #[doc = ""] + #[doc = " Twox note: the key of the map is an auto-incrementing index which users cannot inspect or"] + #[doc = " affect; we shouldn't need a cryptographically secure hasher."] + pub fn signed_submissions_map( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::signed_submissions_map::Param0, + >, + types::signed_submissions_map::SignedSubmissionsMap, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedSubmissionsMap", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 118u8, 12u8, 234u8, 73u8, 238u8, 134u8, 20u8, 105u8, 248u8, 39u8, 23u8, + 96u8, 157u8, 187u8, 14u8, 143u8, 135u8, 121u8, 77u8, 90u8, 154u8, + 221u8, 139u8, 28u8, 34u8, 8u8, 19u8, 246u8, 65u8, 155u8, 84u8, 53u8, + ], + ) + } + #[doc = " The minimum score that each 'untrusted' solution must attain in order to be considered"] + #[doc = " feasible."] + #[doc = ""] + #[doc = " Can be set via `set_minimum_untrusted_score`."] + pub fn minimum_untrusted_score( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::minimum_untrusted_score::MinimumUntrustedScore, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MinimumUntrustedScore", + (), + [ + 22u8, 253u8, 11u8, 17u8, 171u8, 145u8, 175u8, 97u8, 137u8, 148u8, 36u8, + 232u8, 55u8, 174u8, 75u8, 173u8, 133u8, 5u8, 227u8, 161u8, 28u8, 62u8, + 188u8, 249u8, 123u8, 102u8, 186u8, 180u8, 226u8, 216u8, 71u8, 249u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The minimum amount of improvement to the solution score that defines a solution as"] + #[doc = " \"better\" in the Signed phase."] + pub fn better_signed_threshold( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_arithmetic::per_things::Perbill, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "BetterSignedThreshold", + [ + 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, + 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, + 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, + ], + ) + } + #[doc = " The repeat threshold of the offchain worker."] + #[doc = ""] + #[doc = " For example, if it is 5, that means that at least 5 blocks will elapse between attempts"] + #[doc = " to submit the worker's solution."] + pub fn offchain_repeat( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "OffchainRepeat", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The priority of the unsigned transaction submitted in the unsigned-phase"] + pub fn miner_tx_priority( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MinerTxPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " Maximum number of signed submissions that can be queued."] + #[doc = ""] + #[doc = " It is best to avoid adjusting this during an election, as it impacts downstream data"] + #[doc = " structures. In particular, `SignedSubmissionIndices` is bounded on this value. If you"] + #[doc = " update this value during an election, you _must_ ensure that"] + #[doc = " `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,"] + #[doc = " attempts to submit new solutions may cause a runtime panic."] + pub fn signed_max_submissions( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedMaxSubmissions", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum weight of a signed solution."] + #[doc = ""] + #[doc = " If [`Config::MinerConfig`] is being implemented to submit signed solutions (outside of"] + #[doc = " this pallet), then [`MinerConfig::solution_weight`] is used to compare against"] + #[doc = " this value."] + pub fn signed_max_weight( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedMaxWeight", + [ + 149u8, 252u8, 129u8, 80u8, 169u8, 36u8, 79u8, 127u8, 240u8, 156u8, + 56u8, 202u8, 219u8, 86u8, 5u8, 65u8, 245u8, 148u8, 138u8, 243u8, 210u8, + 128u8, 234u8, 216u8, 240u8, 219u8, 123u8, 235u8, 21u8, 158u8, 237u8, + 112u8, + ], + ) + } + #[doc = " The maximum amount of unchecked solutions to refund the call fee for."] + pub fn signed_max_refunds( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedMaxRefunds", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Base reward for a signed solution"] + pub fn signed_reward_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedRewardBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Per-byte deposit for a signed solution."] + pub fn signed_deposit_byte( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedDepositByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Per-weight deposit for a signed solution."] + pub fn signed_deposit_weight( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "SignedDepositWeight", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum number of winners that can be elected by this `ElectionProvider`"] + #[doc = " implementation."] + #[doc = ""] + #[doc = " Note: This must always be greater or equal to `T::DataProvider::desired_targets()`."] + pub fn max_winners( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MaxWinners", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + pub fn miner_max_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MinerMaxLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + pub fn miner_max_weight( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWeight", + [ + 149u8, 252u8, 129u8, 80u8, 169u8, 36u8, 79u8, 127u8, 240u8, 156u8, + 56u8, 202u8, 219u8, 86u8, 5u8, 65u8, 245u8, 148u8, 138u8, 243u8, 210u8, + 128u8, 234u8, 216u8, 240u8, 219u8, 123u8, 235u8, 21u8, 158u8, 237u8, + 112u8, + ], + ) + } + pub fn miner_max_votes_per_voter( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MinerMaxVotesPerVoter", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + pub fn miner_max_winners( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ElectionProviderMultiPhase", + "MinerMaxWinners", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod staking { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_staking::pallet::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_staking::pallet::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] + #[doc = ""] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed"] + #[doc = "as dust."] + pub struct Bond { + #[codec(compact)] + pub value: bond::Value, + pub payee: bond::Payee, + } + pub mod bond { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + pub type Payee = runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Bond { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "bond"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] + #[doc = "for staking."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] + #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] + #[doc = "any limitation on the amount that can be added."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- O(1)."] + pub struct BondExtra { + #[codec(compact)] + pub max_additional: bond_extra::MaxAdditional, + } + pub mod bond_extra { + use super::runtime_types; + pub type MaxAdditional = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for BondExtra { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "bond_extra"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] + #[doc = "period ends. If this leaves an amount actively bonded less than"] + #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] + #[doc = "the funds out of management ready for transfer."] + #[doc = ""] + #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] + #[doc = ""] + #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] + #[doc = "they should call `chill` first in order to free up their bonded funds."] + #[doc = ""] + #[doc = "Emits `Unbonded`."] + #[doc = ""] + #[doc = "See also [`Call::withdraw_unbonded`]."] + pub struct Unbond { + #[codec(compact)] + pub value: unbond::Value, + } + pub mod unbond { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Unbond { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "unbond"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] + #[doc = ""] + #[doc = "This essentially frees up that balance to be used by the stash account to do whatever"] + #[doc = "it wants."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller."] + #[doc = ""] + #[doc = "Emits `Withdrawn`."] + #[doc = ""] + #[doc = "See also [`Call::unbond`]."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans` indicates the number of metadata slashing spans to clear when"] + #[doc = "this call results in a complete removal of all the data related to the stash account."] + #[doc = "In this case, the `num_slashing_spans` must be larger or equal to the number of"] + #[doc = "slashing spans associated with the stash account in the [`SlashingSpans`] storage type,"] + #[doc = "otherwise the call will fail. The call weight is directly proportional to"] + #[doc = "`num_slashing_spans`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(S) where S is the number of slashing spans to remove"] + #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] + pub struct WithdrawUnbonded { + pub num_slashing_spans: withdraw_unbonded::NumSlashingSpans, + } + pub mod withdraw_unbonded { + use super::runtime_types; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for WithdrawUnbonded { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "withdraw_unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Declare the desire to validate for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + pub struct Validate { + pub prefs: validate::Prefs, + } + pub mod validate { + use super::runtime_types; + pub type Prefs = runtime_types::pallet_staking::ValidatorPrefs; + } + impl ::subxt_core::blocks::StaticExtrinsic for Validate { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "validate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Declare the desire to nominate `targets` for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] + #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] + #[doc = "- Both the reads and writes follow a similar pattern."] + pub struct Nominate { + pub targets: nominate::Targets, + } + pub mod nominate { + use super::runtime_types; + pub type Targets = ::subxt_core::alloc::vec::Vec< + ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Nominate { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "nominate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Declare no desire to either validate or nominate."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains one read."] + #[doc = "- Writes are limited to the `origin` account key."] + pub struct Chill; + impl ::subxt_core::blocks::StaticExtrinsic for Chill { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "chill"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "(Re-)set the payment target for a controller."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "---------"] + pub struct SetPayee { + pub payee: set_payee::Payee, + } + pub mod set_payee { + use super::runtime_types; + pub type Payee = runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetPayee { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "set_payee"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "(Re-)sets the controller of a stash to the stash itself. This function previously"] + #[doc = "accepted a `controller` argument to set the controller to an account other than the"] + #[doc = "stash itself. This functionality has now been removed, now only setting the controller"] + #[doc = "to the stash, if it is not already."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(1)"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + pub struct SetController; + impl ::subxt_core::blocks::StaticExtrinsic for SetController { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "set_controller"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Sets the ideal number of validators."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(1)"] + pub struct SetValidatorCount { + #[codec(compact)] + pub new: set_validator_count::New, + } + pub mod set_validator_count { + use super::runtime_types; + pub type New = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetValidatorCount { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "set_validator_count"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Increments the ideal number of validators up to maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "Same as [`Self::set_validator_count`]."] + pub struct IncreaseValidatorCount { + #[codec(compact)] + pub additional: increase_validator_count::Additional, + } + pub mod increase_validator_count { + use super::runtime_types; + pub type Additional = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for IncreaseValidatorCount { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "increase_validator_count"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Scale up the ideal number of validators by a factor up to maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "Same as [`Self::set_validator_count`]."] + pub struct ScaleValidatorCount { + pub factor: scale_validator_count::Factor, + } + pub mod scale_validator_count { + use super::runtime_types; + pub type Factor = runtime_types::sp_arithmetic::per_things::Percent; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScaleValidatorCount { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "scale_validator_count"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force there to be no new eras indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "Thus the election process may be ongoing when this is called. In this case the"] + #[doc = "election will continue until the next era is triggered."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + pub struct ForceNoEras; + impl ::subxt_core::blocks::StaticExtrinsic for ForceNoEras { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "force_no_eras"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] + #[doc = "reset to normal (non-forced) behaviour."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + pub struct ForceNewEra; + impl ::subxt_core::blocks::StaticExtrinsic for ForceNewEra { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "force_new_era"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + pub struct SetInvulnerables { + pub invulnerables: set_invulnerables::Invulnerables, + } + pub mod set_invulnerables { + use super::runtime_types; + pub type Invulnerables = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetInvulnerables { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "set_invulnerables"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force a current staker to become completely unstaked, immediately."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more"] + #[doc = "details."] + pub struct ForceUnstake { + pub stash: force_unstake::Stash, + pub num_slashing_spans: force_unstake::NumSlashingSpans, + } + pub mod force_unstake { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceUnstake { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "force_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force there to be a new era at the end of sessions indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + pub struct ForceNewEraAlways; + impl ::subxt_core::blocks::StaticExtrinsic for ForceNewEraAlways { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "force_new_era_always"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel enactment of a deferred slash."] + #[doc = ""] + #[doc = "Can be called by the `T::AdminOrigin`."] + #[doc = ""] + #[doc = "Parameters: era and indices of the slashes for that era to kill."] + pub struct CancelDeferredSlash { + pub era: cancel_deferred_slash::Era, + pub slash_indices: cancel_deferred_slash::SlashIndices, + } + pub mod cancel_deferred_slash { + use super::runtime_types; + pub type Era = ::core::primitive::u32; + pub type SlashIndices = ::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelDeferredSlash { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "cancel_deferred_slash"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pay out next page of the stakers behind a validator for the given era."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "The reward payout could be paged in case there are too many nominators backing the"] + #[doc = "`validator_stash`. This call will payout unpaid pages in an ascending order. To claim a"] + #[doc = "specific page, use `payout_stakers_by_page`.`"] + #[doc = ""] + #[doc = "If all pages are claimed, it returns an error `InvalidPage`."] + pub struct PayoutStakers { + pub validator_stash: payout_stakers::ValidatorStash, + pub era: payout_stakers::Era, + } + pub mod payout_stakers { + use super::runtime_types; + pub type ValidatorStash = ::subxt_core::utils::AccountId32; + pub type Era = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for PayoutStakers { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "payout_stakers"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Rebond a portion of the stash scheduled to be unlocked."] + #[doc = ""] + #[doc = "The dispatch origin must be signed by the controller."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Time complexity: O(L), where L is unlocking chunks"] + #[doc = "- Bounded by `MaxUnlockingChunks`."] + pub struct Rebond { + #[codec(compact)] + pub value: rebond::Value, + } + pub mod rebond { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Rebond { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "rebond"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] + #[doc = "be considered `dust` in the staking system. The requirements are:"] + #[doc = ""] + #[doc = "1. the `total_balance` of the stash is below existential deposit."] + #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] + #[doc = "3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero."] + #[doc = ""] + #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] + #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] + #[doc = ""] + #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] + #[doc = ""] + #[doc = "Refunds the transaction fees upon successful execution."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more"] + #[doc = "details."] + pub struct ReapStash { + pub stash: reap_stash::Stash, + pub num_slashing_spans: reap_stash::NumSlashingSpans, + } + pub mod reap_stash { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ReapStash { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "reap_stash"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove the given nominations from the calling validator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] + #[doc = " should no longer be nominating this validator."] + #[doc = ""] + #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] + #[doc = "block any further nominations."] + pub struct Kick { + pub who: kick::Who, + } + pub mod kick { + use super::runtime_types; + pub type Who = ::subxt_core::alloc::vec::Vec< + ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Kick { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "kick"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Update the various staking configurations ."] + #[doc = ""] + #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] + #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] + #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] + #[doc = " should be filled in order for the `chill_other` transaction to work."] + #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] + #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] + #[doc = ""] + #[doc = "RuntimeOrigin must be Root to call this function."] + #[doc = ""] + #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] + #[doc = "to kick people under the new limits, `chill_other` should be called."] + pub struct SetStakingConfigs { + pub min_nominator_bond: set_staking_configs::MinNominatorBond, + pub min_validator_bond: set_staking_configs::MinValidatorBond, + pub max_nominator_count: set_staking_configs::MaxNominatorCount, + pub max_validator_count: set_staking_configs::MaxValidatorCount, + pub chill_threshold: set_staking_configs::ChillThreshold, + pub min_commission: set_staking_configs::MinCommission, + pub max_staked_rewards: set_staking_configs::MaxStakedRewards, + } + pub mod set_staking_configs { + use super::runtime_types; + pub type MinNominatorBond = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >; + pub type MinValidatorBond = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >; + pub type MaxNominatorCount = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >; + pub type MaxValidatorCount = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >; + pub type ChillThreshold = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >; + pub type MinCommission = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >; + pub type MaxStakedRewards = + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetStakingConfigs { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "set_staking_configs"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] + #[doc = ""] + #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] + #[doc = "enforced, and this function behaves just like `chill`."] + #[doc = ""] + #[doc = "If the caller is different than the controller being targeted, the following conditions"] + #[doc = "must be met:"] + #[doc = ""] + #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] + #[doc = ""] + #[doc = "Or:"] + #[doc = ""] + #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] + #[doc = " nominators or validators we must reach before users can start chilling one-another."] + #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] + #[doc = " how close we are to the threshold."] + #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] + #[doc = " if this is a person that should be chilled because they have not met the threshold"] + #[doc = " bond required."] + #[doc = ""] + #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] + #[doc = "who do not satisfy these requirements."] + pub struct ChillOther { + pub stash: chill_other::Stash, + } + pub mod chill_other { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ChillOther { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "chill_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] + #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] + #[doc = "can call this."] + pub struct ForceApplyMinCommission { + pub validator_stash: force_apply_min_commission::ValidatorStash, + } + pub mod force_apply_min_commission { + use super::runtime_types; + pub type ValidatorStash = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceApplyMinCommission { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "force_apply_min_commission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + pub struct SetMinCommission { + pub new: set_min_commission::New, + } + pub mod set_min_commission { + use super::runtime_types; + pub type New = runtime_types::sp_arithmetic::per_things::Perbill; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMinCommission { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "set_min_commission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pay out a page of the stakers behind a validator for the given era and page."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = "- `page` is the page index of nominators to pay out with value between 0 and"] + #[doc = " `num_nominators / T::MaxExposurePageSize`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "If a validator has more than [`Config::MaxExposurePageSize`] nominators backing"] + #[doc = "them, then the list of nominators is paged, with each page being capped at"] + #[doc = "[`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators,"] + #[doc = "the call needs to be made for each page separately in order for all the nominators"] + #[doc = "backing a validator to receive the reward. The nominators are not sorted across pages"] + #[doc = "and so it should not be assumed the highest staker would be on the topmost page and vice"] + #[doc = "versa. If rewards are not claimed in [`Config::HistoryDepth`] eras, they are lost."] + pub struct PayoutStakersByPage { + pub validator_stash: payout_stakers_by_page::ValidatorStash, + pub era: payout_stakers_by_page::Era, + pub page: payout_stakers_by_page::Page, + } + pub mod payout_stakers_by_page { + use super::runtime_types; + pub type ValidatorStash = ::subxt_core::utils::AccountId32; + pub type Era = ::core::primitive::u32; + pub type Page = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for PayoutStakersByPage { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "payout_stakers_by_page"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Migrates an account's `RewardDestination::Controller` to"] + #[doc = "`RewardDestination::Account(controller)`."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "This will waive the transaction fee if the `payee` is successfully migrated."] + pub struct UpdatePayee { + pub controller: update_payee::Controller, + } + pub mod update_payee { + use super::runtime_types; + pub type Controller = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::blocks::StaticExtrinsic for UpdatePayee { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "update_payee"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Updates a batch of controller accounts to their corresponding stash account if they are"] + #[doc = "not the same. Ignores any controller accounts that do not exist, and does not operate if"] + #[doc = "the stash and controller are already the same."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin must be `T::AdminOrigin`."] + pub struct DeprecateControllerBatch { + pub controllers: deprecate_controller_batch::Controllers, + } + pub mod deprecate_controller_batch { + use super::runtime_types; + pub type Controllers = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for DeprecateControllerBatch { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "deprecate_controller_batch"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Restores the state of a ledger which is in an inconsistent state."] + #[doc = ""] + #[doc = "The requirements to restore a ledger are the following:"] + #[doc = "* The stash is bonded; or"] + #[doc = "* The stash is not bonded but it has a staking lock left behind; or"] + #[doc = "* If the stash has an associated ledger and its state is inconsistent; or"] + #[doc = "* If the ledger is not corrupted *but* its staking lock is out of sync."] + #[doc = ""] + #[doc = "The `maybe_*` input parameters will overwrite the corresponding data and metadata of the"] + #[doc = "ledger associated with the stash. If the input parameters are not set, the ledger will"] + #[doc = "be reset values from on-chain state."] + pub struct RestoreLedger { + pub stash: restore_ledger::Stash, + pub maybe_controller: restore_ledger::MaybeController, + pub maybe_total: restore_ledger::MaybeTotal, + pub maybe_unlocking: restore_ledger::MaybeUnlocking, + } + pub mod restore_ledger { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type MaybeController = + ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type MaybeTotal = ::core::option::Option<::core::primitive::u128>; + pub type MaybeUnlocking = ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for RestoreLedger { + const PALLET: &'static str = "Staking"; + const CALL: &'static str = "restore_ledger"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] + #[doc = ""] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed"] + #[doc = "as dust."] + pub fn bond( + &self, + value: types::bond::Value, + payee: types::bond::Payee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "bond", + types::Bond { value, payee }, + [ + 45u8, 207u8, 34u8, 221u8, 252u8, 224u8, 162u8, 185u8, 67u8, 224u8, + 88u8, 91u8, 232u8, 114u8, 183u8, 44u8, 39u8, 5u8, 12u8, 163u8, 57u8, + 31u8, 251u8, 58u8, 37u8, 232u8, 206u8, 75u8, 164u8, 26u8, 170u8, 101u8, + ], + ) + } + #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] + #[doc = "for staking."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] + #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] + #[doc = "any limitation on the amount that can be added."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- O(1)."] + pub fn bond_extra( + &self, + max_additional: types::bond_extra::MaxAdditional, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "bond_extra", + types::BondExtra { max_additional }, + [ + 9u8, 143u8, 179u8, 99u8, 91u8, 254u8, 114u8, 189u8, 202u8, 245u8, 48u8, + 130u8, 103u8, 17u8, 183u8, 177u8, 172u8, 156u8, 227u8, 145u8, 191u8, + 134u8, 81u8, 3u8, 170u8, 85u8, 40u8, 56u8, 216u8, 95u8, 232u8, 52u8, + ], + ) + } + #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] + #[doc = "period ends. If this leaves an amount actively bonded less than"] + #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] + #[doc = "the funds out of management ready for transfer."] + #[doc = ""] + #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] + #[doc = ""] + #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] + #[doc = "they should call `chill` first in order to free up their bonded funds."] + #[doc = ""] + #[doc = "Emits `Unbonded`."] + #[doc = ""] + #[doc = "See also [`Call::withdraw_unbonded`]."] + pub fn unbond( + &self, + value: types::unbond::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "unbond", + types::Unbond { value }, + [ + 70u8, 201u8, 146u8, 56u8, 51u8, 237u8, 90u8, 193u8, 69u8, 42u8, 168u8, + 96u8, 215u8, 128u8, 253u8, 22u8, 239u8, 14u8, 214u8, 103u8, 170u8, + 140u8, 2u8, 182u8, 3u8, 190u8, 184u8, 191u8, 231u8, 137u8, 50u8, 16u8, + ], + ) + } + #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] + #[doc = ""] + #[doc = "This essentially frees up that balance to be used by the stash account to do whatever"] + #[doc = "it wants."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller."] + #[doc = ""] + #[doc = "Emits `Withdrawn`."] + #[doc = ""] + #[doc = "See also [`Call::unbond`]."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans` indicates the number of metadata slashing spans to clear when"] + #[doc = "this call results in a complete removal of all the data related to the stash account."] + #[doc = "In this case, the `num_slashing_spans` must be larger or equal to the number of"] + #[doc = "slashing spans associated with the stash account in the [`SlashingSpans`] storage type,"] + #[doc = "otherwise the call will fail. The call weight is directly proportional to"] + #[doc = "`num_slashing_spans`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(S) where S is the number of slashing spans to remove"] + #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] + pub fn withdraw_unbonded( + &self, + num_slashing_spans: types::withdraw_unbonded::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "withdraw_unbonded", + types::WithdrawUnbonded { num_slashing_spans }, + [ + 229u8, 128u8, 177u8, 224u8, 197u8, 118u8, 239u8, 142u8, 179u8, 164u8, + 10u8, 205u8, 124u8, 254u8, 209u8, 157u8, 172u8, 87u8, 58u8, 120u8, + 74u8, 12u8, 150u8, 117u8, 234u8, 32u8, 191u8, 182u8, 92u8, 97u8, 77u8, + 59u8, + ], + ) + } + #[doc = "Declare the desire to validate for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + pub fn validate( + &self, + prefs: types::validate::Prefs, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "validate", + types::Validate { prefs }, + [ + 63u8, 83u8, 12u8, 16u8, 56u8, 84u8, 41u8, 141u8, 202u8, 0u8, 37u8, + 30u8, 115u8, 2u8, 145u8, 101u8, 168u8, 89u8, 94u8, 98u8, 8u8, 45u8, + 140u8, 237u8, 101u8, 136u8, 179u8, 162u8, 205u8, 41u8, 88u8, 248u8, + ], + ) + } + #[doc = "Declare the desire to nominate `targets` for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] + #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] + #[doc = "- Both the reads and writes follow a similar pattern."] + pub fn nominate( + &self, + targets: types::nominate::Targets, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "nominate", + types::Nominate { targets }, + [ + 235u8, 128u8, 69u8, 72u8, 149u8, 110u8, 119u8, 10u8, 99u8, 130u8, + 173u8, 12u8, 136u8, 41u8, 43u8, 223u8, 200u8, 216u8, 75u8, 216u8, 91u8, + 173u8, 247u8, 253u8, 129u8, 76u8, 89u8, 17u8, 35u8, 151u8, 208u8, + 227u8, + ], + ) + } + #[doc = "Declare no desire to either validate or nominate."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains one read."] + #[doc = "- Writes are limited to the `origin` account key."] + pub fn chill(&self) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "chill", + types::Chill {}, + [ + 157u8, 75u8, 243u8, 69u8, 110u8, 192u8, 22u8, 27u8, 107u8, 68u8, 236u8, + 58u8, 179u8, 34u8, 118u8, 98u8, 131u8, 62u8, 242u8, 84u8, 149u8, 24u8, + 83u8, 223u8, 78u8, 12u8, 192u8, 22u8, 111u8, 11u8, 171u8, 149u8, + ], + ) + } + #[doc = "(Re-)set the payment target for a controller."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "---------"] + pub fn set_payee( + &self, + payee: types::set_payee::Payee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "set_payee", + types::SetPayee { payee }, + [ + 86u8, 172u8, 187u8, 98u8, 106u8, 240u8, 184u8, 60u8, 163u8, 244u8, 7u8, + 64u8, 147u8, 168u8, 192u8, 177u8, 211u8, 138u8, 73u8, 188u8, 159u8, + 154u8, 175u8, 219u8, 231u8, 235u8, 93u8, 195u8, 204u8, 100u8, 196u8, + 241u8, + ], + ) + } + #[doc = "(Re-)sets the controller of a stash to the stash itself. This function previously"] + #[doc = "accepted a `controller` argument to set the controller to an account other than the"] + #[doc = "stash itself. This functionality has now been removed, now only setting the controller"] + #[doc = "to the stash, if it is not already."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(1)"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + pub fn set_controller( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "set_controller", + types::SetController {}, + [ + 172u8, 27u8, 195u8, 188u8, 145u8, 203u8, 190u8, 174u8, 145u8, 43u8, + 253u8, 87u8, 11u8, 229u8, 112u8, 18u8, 57u8, 101u8, 84u8, 235u8, 109u8, + 228u8, 58u8, 129u8, 179u8, 174u8, 245u8, 169u8, 89u8, 240u8, 39u8, + 67u8, + ], + ) + } + #[doc = "Sets the ideal number of validators."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(1)"] + pub fn set_validator_count( + &self, + new: types::set_validator_count::New, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "set_validator_count", + types::SetValidatorCount { new }, + [ + 172u8, 225u8, 157u8, 48u8, 242u8, 217u8, 126u8, 206u8, 26u8, 156u8, + 203u8, 100u8, 116u8, 189u8, 98u8, 89u8, 151u8, 101u8, 77u8, 236u8, + 101u8, 8u8, 148u8, 236u8, 180u8, 175u8, 232u8, 146u8, 141u8, 141u8, + 78u8, 165u8, + ], + ) + } + #[doc = "Increments the ideal number of validators up to maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "Same as [`Self::set_validator_count`]."] + pub fn increase_validator_count( + &self, + additional: types::increase_validator_count::Additional, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "increase_validator_count", + types::IncreaseValidatorCount { additional }, + [ + 108u8, 67u8, 131u8, 248u8, 139u8, 227u8, 224u8, 221u8, 248u8, 94u8, + 141u8, 104u8, 131u8, 250u8, 127u8, 164u8, 137u8, 211u8, 5u8, 27u8, + 185u8, 251u8, 120u8, 243u8, 165u8, 50u8, 197u8, 161u8, 125u8, 195u8, + 16u8, 29u8, + ], + ) + } + #[doc = "Scale up the ideal number of validators by a factor up to maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "Same as [`Self::set_validator_count`]."] + pub fn scale_validator_count( + &self, + factor: types::scale_validator_count::Factor, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "scale_validator_count", + types::ScaleValidatorCount { factor }, + [ + 93u8, 200u8, 119u8, 240u8, 148u8, 144u8, 175u8, 135u8, 102u8, 130u8, + 183u8, 216u8, 28u8, 215u8, 155u8, 233u8, 152u8, 65u8, 49u8, 125u8, + 196u8, 79u8, 31u8, 195u8, 233u8, 79u8, 150u8, 138u8, 103u8, 161u8, + 78u8, 154u8, + ], + ) + } + #[doc = "Force there to be no new eras indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "Thus the election process may be ongoing when this is called. In this case the"] + #[doc = "election will continue until the next era is triggered."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + pub fn force_no_eras( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "force_no_eras", + types::ForceNoEras {}, + [ + 77u8, 5u8, 105u8, 167u8, 251u8, 78u8, 52u8, 80u8, 177u8, 226u8, 28u8, + 130u8, 106u8, 62u8, 40u8, 210u8, 110u8, 62u8, 21u8, 113u8, 234u8, + 227u8, 171u8, 205u8, 240u8, 46u8, 32u8, 84u8, 184u8, 208u8, 61u8, + 207u8, + ], + ) + } + #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] + #[doc = "reset to normal (non-forced) behaviour."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + pub fn force_new_era( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "force_new_era", + types::ForceNewEra {}, + [ + 119u8, 45u8, 11u8, 87u8, 236u8, 189u8, 41u8, 142u8, 130u8, 10u8, 132u8, + 140u8, 210u8, 134u8, 66u8, 152u8, 149u8, 55u8, 60u8, 31u8, 190u8, 41u8, + 177u8, 103u8, 245u8, 193u8, 95u8, 255u8, 29u8, 79u8, 112u8, 188u8, + ], + ) + } + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + pub fn set_invulnerables( + &self, + invulnerables: types::set_invulnerables::Invulnerables, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "set_invulnerables", + types::SetInvulnerables { invulnerables }, + [ + 31u8, 115u8, 221u8, 229u8, 187u8, 61u8, 33u8, 22u8, 126u8, 142u8, + 248u8, 190u8, 213u8, 35u8, 49u8, 208u8, 193u8, 0u8, 58u8, 18u8, 136u8, + 220u8, 32u8, 8u8, 121u8, 36u8, 184u8, 57u8, 6u8, 125u8, 199u8, 245u8, + ], + ) + } + #[doc = "Force a current staker to become completely unstaked, immediately."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more"] + #[doc = "details."] + pub fn force_unstake( + &self, + stash: types::force_unstake::Stash, + num_slashing_spans: types::force_unstake::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "force_unstake", + types::ForceUnstake { stash, num_slashing_spans }, + [ + 205u8, 115u8, 222u8, 58u8, 168u8, 3u8, 59u8, 58u8, 220u8, 98u8, 204u8, + 90u8, 36u8, 250u8, 178u8, 45u8, 213u8, 158u8, 92u8, 107u8, 3u8, 94u8, + 118u8, 194u8, 187u8, 196u8, 101u8, 250u8, 36u8, 119u8, 21u8, 19u8, + ], + ) + } + #[doc = "Force there to be a new era at the end of sessions indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + pub fn force_new_era_always( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "force_new_era_always", + types::ForceNewEraAlways {}, + [ + 102u8, 153u8, 116u8, 85u8, 80u8, 52u8, 89u8, 215u8, 173u8, 159u8, 96u8, + 99u8, 180u8, 5u8, 62u8, 142u8, 181u8, 101u8, 160u8, 57u8, 177u8, 182u8, + 6u8, 252u8, 107u8, 252u8, 225u8, 104u8, 147u8, 123u8, 244u8, 134u8, + ], + ) + } + #[doc = "Cancel enactment of a deferred slash."] + #[doc = ""] + #[doc = "Can be called by the `T::AdminOrigin`."] + #[doc = ""] + #[doc = "Parameters: era and indices of the slashes for that era to kill."] + pub fn cancel_deferred_slash( + &self, + era: types::cancel_deferred_slash::Era, + slash_indices: types::cancel_deferred_slash::SlashIndices, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "cancel_deferred_slash", + types::CancelDeferredSlash { era, slash_indices }, + [ + 49u8, 208u8, 248u8, 109u8, 25u8, 132u8, 73u8, 172u8, 232u8, 194u8, + 114u8, 23u8, 114u8, 4u8, 64u8, 156u8, 70u8, 41u8, 207u8, 208u8, 78u8, + 199u8, 81u8, 125u8, 101u8, 31u8, 17u8, 140u8, 190u8, 254u8, 64u8, + 101u8, + ], + ) + } + #[doc = "Pay out next page of the stakers behind a validator for the given era."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "The reward payout could be paged in case there are too many nominators backing the"] + #[doc = "`validator_stash`. This call will payout unpaid pages in an ascending order. To claim a"] + #[doc = "specific page, use `payout_stakers_by_page`.`"] + #[doc = ""] + #[doc = "If all pages are claimed, it returns an error `InvalidPage`."] + pub fn payout_stakers( + &self, + validator_stash: types::payout_stakers::ValidatorStash, + era: types::payout_stakers::Era, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "payout_stakers", + types::PayoutStakers { validator_stash, era }, + [ + 69u8, 67u8, 140u8, 197u8, 89u8, 20u8, 59u8, 55u8, 142u8, 197u8, 62u8, + 107u8, 239u8, 50u8, 237u8, 52u8, 4u8, 65u8, 119u8, 73u8, 138u8, 57u8, + 46u8, 78u8, 252u8, 157u8, 187u8, 14u8, 232u8, 244u8, 217u8, 171u8, + ], + ) + } + #[doc = "Rebond a portion of the stash scheduled to be unlocked."] + #[doc = ""] + #[doc = "The dispatch origin must be signed by the controller."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Time complexity: O(L), where L is unlocking chunks"] + #[doc = "- Bounded by `MaxUnlockingChunks`."] + pub fn rebond( + &self, + value: types::rebond::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "rebond", + types::Rebond { value }, + [ + 204u8, 209u8, 27u8, 219u8, 45u8, 129u8, 15u8, 39u8, 105u8, 165u8, + 255u8, 55u8, 0u8, 59u8, 115u8, 79u8, 139u8, 82u8, 163u8, 197u8, 44u8, + 89u8, 41u8, 234u8, 116u8, 214u8, 248u8, 123u8, 250u8, 49u8, 15u8, 77u8, + ], + ) + } + #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] + #[doc = "be considered `dust` in the staking system. The requirements are:"] + #[doc = ""] + #[doc = "1. the `total_balance` of the stash is below existential deposit."] + #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] + #[doc = "3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero."] + #[doc = ""] + #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] + #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] + #[doc = ""] + #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] + #[doc = ""] + #[doc = "Refunds the transaction fees upon successful execution."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more"] + #[doc = "details."] + pub fn reap_stash( + &self, + stash: types::reap_stash::Stash, + num_slashing_spans: types::reap_stash::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "reap_stash", + types::ReapStash { stash, num_slashing_spans }, + [ + 231u8, 240u8, 152u8, 33u8, 10u8, 60u8, 18u8, 233u8, 0u8, 229u8, 90u8, + 45u8, 118u8, 29u8, 98u8, 109u8, 89u8, 7u8, 228u8, 254u8, 119u8, 125u8, + 172u8, 209u8, 217u8, 107u8, 50u8, 226u8, 31u8, 5u8, 153u8, 93u8, + ], + ) + } + #[doc = "Remove the given nominations from the calling validator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] + #[doc = " should no longer be nominating this validator."] + #[doc = ""] + #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] + #[doc = "block any further nominations."] + pub fn kick( + &self, + who: types::kick::Who, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "kick", + types::Kick { who }, + [ + 61u8, 49u8, 184u8, 238u8, 17u8, 11u8, 173u8, 187u8, 229u8, 163u8, 69u8, + 139u8, 23u8, 90u8, 87u8, 10u8, 179u8, 39u8, 19u8, 251u8, 74u8, 21u8, + 126u8, 165u8, 21u8, 43u8, 237u8, 241u8, 75u8, 186u8, 35u8, 53u8, + ], + ) + } + #[doc = "Update the various staking configurations ."] + #[doc = ""] + #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] + #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] + #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] + #[doc = " should be filled in order for the `chill_other` transaction to work."] + #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] + #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] + #[doc = ""] + #[doc = "RuntimeOrigin must be Root to call this function."] + #[doc = ""] + #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] + #[doc = "to kick people under the new limits, `chill_other` should be called."] + pub fn set_staking_configs( + &self, + min_nominator_bond: types::set_staking_configs::MinNominatorBond, + min_validator_bond: types::set_staking_configs::MinValidatorBond, + max_nominator_count: types::set_staking_configs::MaxNominatorCount, + max_validator_count: types::set_staking_configs::MaxValidatorCount, + chill_threshold: types::set_staking_configs::ChillThreshold, + min_commission: types::set_staking_configs::MinCommission, + max_staked_rewards: types::set_staking_configs::MaxStakedRewards, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "set_staking_configs", + types::SetStakingConfigs { + min_nominator_bond, + min_validator_bond, + max_nominator_count, + max_validator_count, + chill_threshold, + min_commission, + max_staked_rewards, + }, + [ + 14u8, 242u8, 77u8, 245u8, 48u8, 49u8, 147u8, 180u8, 37u8, 61u8, 225u8, + 86u8, 130u8, 232u8, 77u8, 134u8, 152u8, 139u8, 18u8, 105u8, 135u8, + 203u8, 113u8, 240u8, 240u8, 90u8, 163u8, 185u8, 47u8, 233u8, 157u8, + 8u8, + ], + ) + } + #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] + #[doc = ""] + #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] + #[doc = "enforced, and this function behaves just like `chill`."] + #[doc = ""] + #[doc = "If the caller is different than the controller being targeted, the following conditions"] + #[doc = "must be met:"] + #[doc = ""] + #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] + #[doc = ""] + #[doc = "Or:"] + #[doc = ""] + #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] + #[doc = " nominators or validators we must reach before users can start chilling one-another."] + #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] + #[doc = " how close we are to the threshold."] + #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] + #[doc = " if this is a person that should be chilled because they have not met the threshold"] + #[doc = " bond required."] + #[doc = ""] + #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] + #[doc = "who do not satisfy these requirements."] + pub fn chill_other( + &self, + stash: types::chill_other::Stash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "chill_other", + types::ChillOther { stash }, + [ + 201u8, 75u8, 216u8, 132u8, 113u8, 58u8, 148u8, 34u8, 17u8, 214u8, + 224u8, 89u8, 131u8, 119u8, 243u8, 193u8, 198u8, 154u8, 16u8, 67u8, + 42u8, 144u8, 1u8, 163u8, 248u8, 90u8, 105u8, 0u8, 42u8, 31u8, 223u8, + 39u8, + ], + ) + } + #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] + #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] + #[doc = "can call this."] + pub fn force_apply_min_commission( + &self, + validator_stash: types::force_apply_min_commission::ValidatorStash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "force_apply_min_commission", + types::ForceApplyMinCommission { validator_stash }, + [ + 158u8, 27u8, 152u8, 23u8, 97u8, 53u8, 54u8, 49u8, 179u8, 236u8, 69u8, + 65u8, 253u8, 136u8, 232u8, 44u8, 207u8, 66u8, 5u8, 186u8, 49u8, 91u8, + 173u8, 5u8, 84u8, 45u8, 154u8, 91u8, 239u8, 97u8, 62u8, 42u8, + ], + ) + } + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + pub fn set_min_commission( + &self, + new: types::set_min_commission::New, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "set_min_commission", + types::SetMinCommission { new }, + [ + 96u8, 168u8, 55u8, 79u8, 79u8, 49u8, 8u8, 127u8, 98u8, 158u8, 106u8, + 187u8, 177u8, 201u8, 68u8, 181u8, 219u8, 172u8, 63u8, 120u8, 172u8, + 173u8, 251u8, 167u8, 84u8, 165u8, 238u8, 115u8, 110u8, 97u8, 144u8, + 50u8, + ], + ) + } + #[doc = "Pay out a page of the stakers behind a validator for the given era and page."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = "- `page` is the page index of nominators to pay out with value between 0 and"] + #[doc = " `num_nominators / T::MaxExposurePageSize`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "If a validator has more than [`Config::MaxExposurePageSize`] nominators backing"] + #[doc = "them, then the list of nominators is paged, with each page being capped at"] + #[doc = "[`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators,"] + #[doc = "the call needs to be made for each page separately in order for all the nominators"] + #[doc = "backing a validator to receive the reward. The nominators are not sorted across pages"] + #[doc = "and so it should not be assumed the highest staker would be on the topmost page and vice"] + #[doc = "versa. If rewards are not claimed in [`Config::HistoryDepth`] eras, they are lost."] + pub fn payout_stakers_by_page( + &self, + validator_stash: types::payout_stakers_by_page::ValidatorStash, + era: types::payout_stakers_by_page::Era, + page: types::payout_stakers_by_page::Page, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "payout_stakers_by_page", + types::PayoutStakersByPage { validator_stash, era, page }, + [ + 133u8, 110u8, 190u8, 187u8, 40u8, 216u8, 207u8, 44u8, 217u8, 226u8, + 38u8, 188u8, 45u8, 146u8, 236u8, 250u8, 165u8, 199u8, 79u8, 7u8, 184u8, + 7u8, 182u8, 43u8, 34u8, 87u8, 38u8, 211u8, 203u8, 172u8, 24u8, 71u8, + ], + ) + } + #[doc = "Migrates an account's `RewardDestination::Controller` to"] + #[doc = "`RewardDestination::Account(controller)`."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "This will waive the transaction fee if the `payee` is successfully migrated."] + pub fn update_payee( + &self, + controller: types::update_payee::Controller, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "update_payee", + types::UpdatePayee { controller }, + [ + 6u8, 125u8, 134u8, 248u8, 54u8, 153u8, 184u8, 201u8, 80u8, 39u8, 95u8, + 114u8, 212u8, 96u8, 120u8, 89u8, 32u8, 115u8, 120u8, 127u8, 249u8, + 133u8, 59u8, 62u8, 164u8, 105u8, 97u8, 22u8, 155u8, 126u8, 176u8, + 236u8, + ], + ) + } + #[doc = "Updates a batch of controller accounts to their corresponding stash account if they are"] + #[doc = "not the same. Ignores any controller accounts that do not exist, and does not operate if"] + #[doc = "the stash and controller are already the same."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin must be `T::AdminOrigin`."] + pub fn deprecate_controller_batch( + &self, + controllers: types::deprecate_controller_batch::Controllers, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "deprecate_controller_batch", + types::DeprecateControllerBatch { controllers }, + [ + 15u8, 242u8, 202u8, 86u8, 115u8, 251u8, 199u8, 201u8, 165u8, 155u8, + 87u8, 0u8, 235u8, 124u8, 60u8, 170u8, 24u8, 22u8, 55u8, 226u8, 68u8, + 210u8, 107u8, 147u8, 191u8, 128u8, 190u8, 142u8, 204u8, 38u8, 101u8, + 12u8, + ], + ) + } + #[doc = "Restores the state of a ledger which is in an inconsistent state."] + #[doc = ""] + #[doc = "The requirements to restore a ledger are the following:"] + #[doc = "* The stash is bonded; or"] + #[doc = "* The stash is not bonded but it has a staking lock left behind; or"] + #[doc = "* If the stash has an associated ledger and its state is inconsistent; or"] + #[doc = "* If the ledger is not corrupted *but* its staking lock is out of sync."] + #[doc = ""] + #[doc = "The `maybe_*` input parameters will overwrite the corresponding data and metadata of the"] + #[doc = "ledger associated with the stash. If the input parameters are not set, the ledger will"] + #[doc = "be reset values from on-chain state."] + pub fn restore_ledger( + &self, + stash: types::restore_ledger::Stash, + maybe_controller: types::restore_ledger::MaybeController, + maybe_total: types::restore_ledger::MaybeTotal, + maybe_unlocking: types::restore_ledger::MaybeUnlocking, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Staking", + "restore_ledger", + types::RestoreLedger { + stash, + maybe_controller, + maybe_total, + maybe_unlocking, + }, + [ + 199u8, 92u8, 58u8, 85u8, 126u8, 61u8, 68u8, 207u8, 29u8, 62u8, 9u8, + 161u8, 162u8, 101u8, 180u8, 210u8, 157u8, 88u8, 216u8, 169u8, 169u8, + 229u8, 190u8, 94u8, 40u8, 73u8, 37u8, 64u8, 23u8, 125u8, 117u8, 31u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_staking::pallet::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] + #[doc = "the remainder from the maximum amount of reward."] + pub struct EraPaid { + pub era_index: era_paid::EraIndex, + pub validator_payout: era_paid::ValidatorPayout, + pub remainder: era_paid::Remainder, + } + pub mod era_paid { + use super::runtime_types; + pub type EraIndex = ::core::primitive::u32; + pub type ValidatorPayout = ::core::primitive::u128; + pub type Remainder = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for EraPaid { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "EraPaid"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The nominator has been rewarded by this amount to this destination."] + pub struct Rewarded { + pub stash: rewarded::Stash, + pub dest: rewarded::Dest, + pub amount: rewarded::Amount, + } + pub mod rewarded { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type Dest = runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Rewarded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Rewarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A staker (validator or nominator) has been slashed by the given amount."] + pub struct Slashed { + pub staker: slashed::Staker, + pub amount: slashed::Amount, + } + pub mod slashed { + use super::runtime_types; + pub type Staker = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Slashed { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Slashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + pub struct SlashReported { + pub validator: slash_reported::Validator, + pub fraction: slash_reported::Fraction, + pub slash_era: slash_reported::SlashEra, + } + pub mod slash_reported { + use super::runtime_types; + pub type Validator = ::subxt_core::utils::AccountId32; + pub type Fraction = runtime_types::sp_arithmetic::per_things::Perbill; + pub type SlashEra = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for SlashReported { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "SlashReported"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An old slashing report from a prior era was discarded because it could"] + #[doc = "not be processed."] + pub struct OldSlashingReportDiscarded { + pub session_index: old_slashing_report_discarded::SessionIndex, + } + pub mod old_slashing_report_discarded { + use super::runtime_types; + pub type SessionIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for OldSlashingReportDiscarded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "OldSlashingReportDiscarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new set of stakers was elected."] + pub struct StakersElected; + impl ::subxt_core::events::StaticEvent for StakersElected { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "StakersElected"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has bonded this amount. \\[stash, amount\\]"] + #[doc = ""] + #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] + #[doc = "it will not be emitted for staking rewards when they are added to stake."] + pub struct Bonded { + pub stash: bonded::Stash, + pub amount: bonded::Amount, + } + pub mod bonded { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Bonded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Bonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has unbonded this amount."] + pub struct Unbonded { + pub stash: unbonded::Stash, + pub amount: unbonded::Amount, + } + pub mod unbonded { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Unbonded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] + #[doc = "from the unlocking queue."] + pub struct Withdrawn { + pub stash: withdrawn::Stash, + pub amount: withdrawn::Amount, + } + pub mod withdrawn { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Withdrawn"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A nominator has been kicked from a validator."] + pub struct Kicked { + pub nominator: kicked::Nominator, + pub stash: kicked::Stash, + } + pub mod kicked { + use super::runtime_types; + pub type Nominator = ::subxt_core::utils::AccountId32; + pub type Stash = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Kicked { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Kicked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The election failed. No new era is planned."] + pub struct StakingElectionFailed; + impl ::subxt_core::events::StaticEvent for StakingElectionFailed { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "StakingElectionFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An account has stopped participating as either a validator or nominator."] + pub struct Chilled { + pub stash: chilled::Stash, + } + pub mod chilled { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Chilled { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "Chilled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The stakers' rewards are getting paid."] + pub struct PayoutStarted { + pub era_index: payout_started::EraIndex, + pub validator_stash: payout_started::ValidatorStash, + } + pub mod payout_started { + use super::runtime_types; + pub type EraIndex = ::core::primitive::u32; + pub type ValidatorStash = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for PayoutStarted { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "PayoutStarted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A validator has set their preferences."] + pub struct ValidatorPrefsSet { + pub stash: validator_prefs_set::Stash, + pub prefs: validator_prefs_set::Prefs, + } + pub mod validator_prefs_set { + use super::runtime_types; + pub type Stash = ::subxt_core::utils::AccountId32; + pub type Prefs = runtime_types::pallet_staking::ValidatorPrefs; + } + impl ::subxt_core::events::StaticEvent for ValidatorPrefsSet { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ValidatorPrefsSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Voters size limit reached."] + pub struct SnapshotVotersSizeExceeded { + pub size: snapshot_voters_size_exceeded::Size, + } + pub mod snapshot_voters_size_exceeded { + use super::runtime_types; + pub type Size = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for SnapshotVotersSizeExceeded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "SnapshotVotersSizeExceeded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Targets size limit reached."] + pub struct SnapshotTargetsSizeExceeded { + pub size: snapshot_targets_size_exceeded::Size, + } + pub mod snapshot_targets_size_exceeded { + use super::runtime_types; + pub type Size = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for SnapshotTargetsSizeExceeded { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "SnapshotTargetsSizeExceeded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new force era mode was set."] + pub struct ForceEra { + pub mode: force_era::Mode, + } + pub mod force_era { + use super::runtime_types; + pub type Mode = runtime_types::pallet_staking::Forcing; + } + impl ::subxt_core::events::StaticEvent for ForceEra { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ForceEra"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Report of a controller batch deprecation."] + pub struct ControllerBatchDeprecated { + pub failures: controller_batch_deprecated::Failures, + } + pub mod controller_batch_deprecated { + use super::runtime_types; + pub type Failures = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for ControllerBatchDeprecated { + const PALLET: &'static str = "Staking"; + const EVENT: &'static str = "ControllerBatchDeprecated"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod validator_count { + use super::runtime_types; + pub type ValidatorCount = ::core::primitive::u32; + } + pub mod minimum_validator_count { + use super::runtime_types; + pub type MinimumValidatorCount = ::core::primitive::u32; + } + pub mod invulnerables { + use super::runtime_types; + pub type Invulnerables = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + pub mod bonded { + use super::runtime_types; + pub type Bonded = ::subxt_core::utils::AccountId32; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod min_nominator_bond { + use super::runtime_types; + pub type MinNominatorBond = ::core::primitive::u128; + } + pub mod min_validator_bond { + use super::runtime_types; + pub type MinValidatorBond = ::core::primitive::u128; + } + pub mod minimum_active_stake { + use super::runtime_types; + pub type MinimumActiveStake = ::core::primitive::u128; + } + pub mod min_commission { + use super::runtime_types; + pub type MinCommission = runtime_types::sp_arithmetic::per_things::Perbill; + } + pub mod ledger { + use super::runtime_types; + pub type Ledger = runtime_types::pallet_staking::StakingLedger; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod payee { + use super::runtime_types; + pub type Payee = runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod validators { + use super::runtime_types; + pub type Validators = runtime_types::pallet_staking::ValidatorPrefs; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_validators { + use super::runtime_types; + pub type CounterForValidators = ::core::primitive::u32; + } + pub mod max_validators_count { + use super::runtime_types; + pub type MaxValidatorsCount = ::core::primitive::u32; + } + pub mod nominators { + use super::runtime_types; + pub type Nominators = runtime_types::pallet_staking::Nominations; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_nominators { + use super::runtime_types; + pub type CounterForNominators = ::core::primitive::u32; + } + pub mod virtual_stakers { + use super::runtime_types; + pub type VirtualStakers = (); + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_virtual_stakers { + use super::runtime_types; + pub type CounterForVirtualStakers = ::core::primitive::u32; + } + pub mod max_nominators_count { + use super::runtime_types; + pub type MaxNominatorsCount = ::core::primitive::u32; + } + pub mod current_era { + use super::runtime_types; + pub type CurrentEra = ::core::primitive::u32; + } + pub mod active_era { + use super::runtime_types; + pub type ActiveEra = runtime_types::pallet_staking::ActiveEraInfo; + } + pub mod eras_start_session_index { + use super::runtime_types; + pub type ErasStartSessionIndex = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u32; + } + pub mod eras_stakers { + use super::runtime_types; + pub type ErasStakers = runtime_types::sp_staking::Exposure< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod eras_stakers_overview { + use super::runtime_types; + pub type ErasStakersOverview = + runtime_types::sp_staking::PagedExposureMetadata<::core::primitive::u128>; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod eras_stakers_clipped { + use super::runtime_types; + pub type ErasStakersClipped = runtime_types::sp_staking::Exposure< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod eras_stakers_paged { + use super::runtime_types; + pub type ErasStakersPaged = runtime_types::sp_staking::ExposurePage< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + pub type Param2 = ::core::primitive::u32; + } + pub mod claimed_rewards { + use super::runtime_types; + pub type ClaimedRewards = ::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod eras_validator_prefs { + use super::runtime_types; + pub type ErasValidatorPrefs = runtime_types::pallet_staking::ValidatorPrefs; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod eras_validator_reward { + use super::runtime_types; + pub type ErasValidatorReward = ::core::primitive::u128; + pub type Param0 = ::core::primitive::u32; + } + pub mod eras_reward_points { + use super::runtime_types; + pub type ErasRewardPoints = runtime_types::pallet_staking::EraRewardPoints< + ::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod eras_total_stake { + use super::runtime_types; + pub type ErasTotalStake = ::core::primitive::u128; + pub type Param0 = ::core::primitive::u32; + } + pub mod force_era { + use super::runtime_types; + pub type ForceEra = runtime_types::pallet_staking::Forcing; + } + pub mod max_staked_rewards { + use super::runtime_types; + pub type MaxStakedRewards = runtime_types::sp_arithmetic::per_things::Percent; + } + pub mod slash_reward_fraction { + use super::runtime_types; + pub type SlashRewardFraction = + runtime_types::sp_arithmetic::per_things::Perbill; + } + pub mod canceled_slash_payout { + use super::runtime_types; + pub type CanceledSlashPayout = ::core::primitive::u128; + } + pub mod unapplied_slashes { + use super::runtime_types; + pub type UnappliedSlashes = ::subxt_core::alloc::vec::Vec< + runtime_types::pallet_staking::UnappliedSlash< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod bonded_eras { + use super::runtime_types; + pub type BondedEras = ::subxt_core::alloc::vec::Vec<( + ::core::primitive::u32, + ::core::primitive::u32, + )>; + } + pub mod validator_slash_in_era { + use super::runtime_types; + pub type ValidatorSlashInEra = ( + runtime_types::sp_arithmetic::per_things::Perbill, + ::core::primitive::u128, + ); + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod nominator_slash_in_era { + use super::runtime_types; + pub type NominatorSlashInEra = ::core::primitive::u128; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod slashing_spans { + use super::runtime_types; + pub type SlashingSpans = runtime_types::pallet_staking::slashing::SlashingSpans; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod span_slash { + use super::runtime_types; + pub type SpanSlash = runtime_types::pallet_staking::slashing::SpanRecord< + ::core::primitive::u128, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + pub type Param1 = ::core::primitive::u32; + } + pub mod current_planned_session { + use super::runtime_types; + pub type CurrentPlannedSession = ::core::primitive::u32; + } + pub mod disabled_validators { + use super::runtime_types; + pub type DisabledValidators = + ::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + } + pub mod chill_threshold { + use super::runtime_types; + pub type ChillThreshold = runtime_types::sp_arithmetic::per_things::Percent; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The ideal number of active validators."] + pub fn validator_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::validator_count::ValidatorCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ValidatorCount", + (), + [ + 105u8, 251u8, 193u8, 198u8, 232u8, 118u8, 73u8, 115u8, 205u8, 78u8, + 49u8, 253u8, 140u8, 193u8, 161u8, 205u8, 13u8, 147u8, 125u8, 102u8, + 142u8, 244u8, 210u8, 227u8, 225u8, 46u8, 144u8, 122u8, 254u8, 48u8, + 44u8, 169u8, + ], + ) + } + #[doc = " Minimum number of staking participants before emergency conditions are imposed."] + pub fn minimum_validator_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::minimum_validator_count::MinimumValidatorCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MinimumValidatorCount", + (), + [ + 103u8, 178u8, 29u8, 91u8, 90u8, 31u8, 49u8, 9u8, 11u8, 58u8, 178u8, + 30u8, 219u8, 55u8, 58u8, 181u8, 80u8, 155u8, 9u8, 11u8, 38u8, 46u8, + 125u8, 179u8, 220u8, 20u8, 212u8, 181u8, 136u8, 103u8, 58u8, 48u8, + ], + ) + } + #[doc = " Any validators that may never be slashed or forcibly kicked. It's a Vec since they're"] + #[doc = " easy to initialize and the performance hit is minimal (we expect no more than four"] + #[doc = " invulnerables) and restricted to testnets."] + pub fn invulnerables( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::invulnerables::Invulnerables, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Invulnerables", + (), + [ + 199u8, 35u8, 0u8, 229u8, 160u8, 128u8, 139u8, 245u8, 27u8, 133u8, 47u8, + 240u8, 86u8, 195u8, 90u8, 169u8, 158u8, 231u8, 128u8, 58u8, 24u8, + 173u8, 138u8, 122u8, 226u8, 104u8, 239u8, 114u8, 91u8, 165u8, 207u8, + 150u8, + ], + ) + } + #[doc = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn bonded_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bonded::Bonded, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Bonded", + (), + [ + 99u8, 128u8, 108u8, 100u8, 235u8, 102u8, 243u8, 95u8, 61u8, 206u8, + 220u8, 49u8, 155u8, 85u8, 236u8, 110u8, 99u8, 21u8, 117u8, 127u8, + 157u8, 226u8, 108u8, 80u8, 126u8, 93u8, 203u8, 0u8, 160u8, 253u8, 56u8, + 101u8, + ], + ) + } + #[doc = " Map from all locked \"stash\" accounts to the controller account."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn bonded( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::bonded::Bonded, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Bonded", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 99u8, 128u8, 108u8, 100u8, 235u8, 102u8, 243u8, 95u8, 61u8, 206u8, + 220u8, 49u8, 155u8, 85u8, 236u8, 110u8, 99u8, 21u8, 117u8, 127u8, + 157u8, 226u8, 108u8, 80u8, 126u8, 93u8, 203u8, 0u8, 160u8, 253u8, 56u8, + 101u8, + ], + ) + } + #[doc = " The minimum active bond to become and maintain the role of a nominator."] + pub fn min_nominator_bond( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_nominator_bond::MinNominatorBond, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MinNominatorBond", + (), + [ + 102u8, 115u8, 254u8, 15u8, 191u8, 228u8, 85u8, 249u8, 112u8, 190u8, + 129u8, 243u8, 236u8, 39u8, 195u8, 232u8, 10u8, 230u8, 11u8, 144u8, + 115u8, 1u8, 45u8, 70u8, 181u8, 161u8, 17u8, 92u8, 19u8, 70u8, 100u8, + 94u8, + ], + ) + } + #[doc = " The minimum active bond to become and maintain the role of a validator."] + pub fn min_validator_bond( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_validator_bond::MinValidatorBond, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MinValidatorBond", + (), + [ + 146u8, 249u8, 26u8, 52u8, 224u8, 81u8, 85u8, 153u8, 118u8, 169u8, + 140u8, 37u8, 208u8, 242u8, 8u8, 29u8, 156u8, 73u8, 154u8, 162u8, 186u8, + 159u8, 119u8, 100u8, 109u8, 227u8, 6u8, 139u8, 155u8, 203u8, 167u8, + 244u8, + ], + ) + } + #[doc = " The minimum active nominator stake of the last successful election."] + pub fn minimum_active_stake( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::minimum_active_stake::MinimumActiveStake, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MinimumActiveStake", + (), + [ + 166u8, 211u8, 59u8, 23u8, 2u8, 160u8, 244u8, 52u8, 153u8, 12u8, 103u8, + 113u8, 51u8, 232u8, 145u8, 188u8, 54u8, 67u8, 227u8, 221u8, 186u8, 6u8, + 28u8, 63u8, 146u8, 212u8, 233u8, 173u8, 134u8, 41u8, 169u8, 153u8, + ], + ) + } + #[doc = " The minimum amount of commission that validators can set."] + #[doc = ""] + #[doc = " If set to `0`, no limit exists."] + pub fn min_commission( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_commission::MinCommission, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MinCommission", + (), + [ + 220u8, 197u8, 232u8, 212u8, 205u8, 242u8, 121u8, 165u8, 255u8, 199u8, + 122u8, 20u8, 145u8, 245u8, 175u8, 26u8, 45u8, 70u8, 207u8, 26u8, 112u8, + 234u8, 181u8, 167u8, 140u8, 75u8, 15u8, 1u8, 221u8, 168u8, 17u8, 211u8, + ], + ) + } + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + #[doc = ""] + #[doc = " Note: All the reads and mutations to this storage *MUST* be done through the methods exposed"] + #[doc = " by [`StakingLedger`] to ensure data and lock consistency."] + pub fn ledger_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::ledger::Ledger, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Ledger", + (), + [ + 109u8, 240u8, 70u8, 127u8, 227u8, 170u8, 76u8, 152u8, 52u8, 24u8, 90u8, + 23u8, 56u8, 59u8, 16u8, 55u8, 68u8, 214u8, 235u8, 142u8, 189u8, 234u8, + 180u8, 250u8, 180u8, 127u8, 41u8, 173u8, 62u8, 252u8, 18u8, 227u8, + ], + ) + } + #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."] + #[doc = ""] + #[doc = " Note: All the reads and mutations to this storage *MUST* be done through the methods exposed"] + #[doc = " by [`StakingLedger`] to ensure data and lock consistency."] + pub fn ledger( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::ledger::Ledger, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Ledger", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 109u8, 240u8, 70u8, 127u8, 227u8, 170u8, 76u8, 152u8, 52u8, 24u8, 90u8, + 23u8, 56u8, 59u8, 16u8, 55u8, 68u8, 214u8, 235u8, 142u8, 189u8, 234u8, + 180u8, 250u8, 180u8, 127u8, 41u8, 173u8, 62u8, 252u8, 18u8, 227u8, + ], + ) + } + #[doc = " Where the reward payment should be made. Keyed by stash."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn payee_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::payee::Payee, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Payee", + (), + [ + 218u8, 38u8, 125u8, 139u8, 146u8, 230u8, 58u8, 61u8, 163u8, 36u8, 81u8, + 175u8, 227u8, 148u8, 135u8, 196u8, 132u8, 198u8, 228u8, 137u8, 4u8, + 39u8, 140u8, 47u8, 103u8, 102u8, 195u8, 239u8, 107u8, 208u8, 165u8, + 232u8, + ], + ) + } + #[doc = " Where the reward payment should be made. Keyed by stash."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn payee( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::payee::Payee, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Payee", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 218u8, 38u8, 125u8, 139u8, 146u8, 230u8, 58u8, 61u8, 163u8, 36u8, 81u8, + 175u8, 227u8, 148u8, 135u8, 196u8, 132u8, 198u8, 228u8, 137u8, 4u8, + 39u8, 140u8, 47u8, 103u8, 102u8, 195u8, 239u8, 107u8, 208u8, 165u8, + 232u8, + ], + ) + } + #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn validators_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::validators::Validators, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Validators", + (), + [ + 149u8, 207u8, 68u8, 38u8, 24u8, 220u8, 207u8, 84u8, 236u8, 33u8, 210u8, + 124u8, 200u8, 99u8, 98u8, 29u8, 235u8, 46u8, 124u8, 4u8, 203u8, 6u8, + 209u8, 21u8, 124u8, 236u8, 112u8, 118u8, 180u8, 85u8, 78u8, 13u8, + ], + ) + } + #[doc = " The map from (wannabe) validator stash key to the preferences of that validator."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn validators( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::validators::Validators, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Validators", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 149u8, 207u8, 68u8, 38u8, 24u8, 220u8, 207u8, 84u8, 236u8, 33u8, 210u8, + 124u8, 200u8, 99u8, 98u8, 29u8, 235u8, 46u8, 124u8, 4u8, 203u8, 6u8, + 209u8, 21u8, 124u8, 236u8, 112u8, 118u8, 180u8, 85u8, 78u8, 13u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_validators( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_validators::CounterForValidators, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "CounterForValidators", + (), + [ + 169u8, 146u8, 194u8, 114u8, 57u8, 232u8, 137u8, 93u8, 214u8, 98u8, + 176u8, 151u8, 237u8, 165u8, 176u8, 252u8, 73u8, 124u8, 22u8, 166u8, + 225u8, 217u8, 65u8, 56u8, 174u8, 12u8, 32u8, 2u8, 7u8, 173u8, 125u8, + 235u8, + ], + ) + } + #[doc = " The maximum validator count before we stop allowing new validators to join."] + #[doc = ""] + #[doc = " When this value is not set, no limits are enforced."] + pub fn max_validators_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_validators_count::MaxValidatorsCount, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MaxValidatorsCount", + (), + [ + 139u8, 116u8, 236u8, 217u8, 110u8, 47u8, 140u8, 197u8, 184u8, 246u8, + 180u8, 188u8, 233u8, 99u8, 102u8, 21u8, 114u8, 23u8, 143u8, 163u8, + 224u8, 250u8, 248u8, 185u8, 235u8, 94u8, 110u8, 83u8, 170u8, 123u8, + 113u8, 168u8, + ], + ) + } + #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] + #[doc = " they wish to support."] + #[doc = ""] + #[doc = " Note that the keys of this storage map might become non-decodable in case the"] + #[doc = " account's [`NominationsQuota::MaxNominations`] configuration is decreased."] + #[doc = " In this rare case, these nominators"] + #[doc = " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`"] + #[doc = " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable"] + #[doc = " nominators will effectively not-exist, until they re-submit their preferences such that it"] + #[doc = " is within the bounds of the newly set `Config::MaxNominations`."] + #[doc = ""] + #[doc = " This implies that `::iter_keys().count()` and `::iter().count()` might return different"] + #[doc = " values for this map. Moreover, the main `::count()` is aligned with the former, namely the"] + #[doc = " number of keys that exist."] + #[doc = ""] + #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] + #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn nominators_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::nominators::Nominators, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Nominators", + (), + [ + 244u8, 174u8, 214u8, 105u8, 215u8, 218u8, 241u8, 145u8, 155u8, 54u8, + 219u8, 34u8, 158u8, 224u8, 251u8, 17u8, 245u8, 9u8, 150u8, 36u8, 2u8, + 233u8, 222u8, 218u8, 136u8, 86u8, 37u8, 244u8, 18u8, 50u8, 91u8, 120u8, + ], + ) + } + #[doc = " The map from nominator stash key to their nomination preferences, namely the validators that"] + #[doc = " they wish to support."] + #[doc = ""] + #[doc = " Note that the keys of this storage map might become non-decodable in case the"] + #[doc = " account's [`NominationsQuota::MaxNominations`] configuration is decreased."] + #[doc = " In this rare case, these nominators"] + #[doc = " are still existent in storage, their key is correct and retrievable (i.e. `contains_key`"] + #[doc = " indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable"] + #[doc = " nominators will effectively not-exist, until they re-submit their preferences such that it"] + #[doc = " is within the bounds of the newly set `Config::MaxNominations`."] + #[doc = ""] + #[doc = " This implies that `::iter_keys().count()` and `::iter().count()` might return different"] + #[doc = " values for this map. Moreover, the main `::count()` is aligned with the former, namely the"] + #[doc = " number of keys that exist."] + #[doc = ""] + #[doc = " Lastly, if any of the nominators become non-decodable, they can be chilled immediately via"] + #[doc = " [`Call::chill_other`] dispatchable by anyone."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn nominators( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::nominators::Nominators, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "Nominators", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 244u8, 174u8, 214u8, 105u8, 215u8, 218u8, 241u8, 145u8, 155u8, 54u8, + 219u8, 34u8, 158u8, 224u8, 251u8, 17u8, 245u8, 9u8, 150u8, 36u8, 2u8, + 233u8, 222u8, 218u8, 136u8, 86u8, 37u8, 244u8, 18u8, 50u8, 91u8, 120u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_nominators( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_nominators::CounterForNominators, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "CounterForNominators", + (), + [ + 150u8, 236u8, 184u8, 12u8, 224u8, 26u8, 13u8, 204u8, 208u8, 178u8, + 68u8, 148u8, 232u8, 85u8, 74u8, 248u8, 167u8, 61u8, 88u8, 126u8, 40u8, + 20u8, 73u8, 47u8, 94u8, 57u8, 144u8, 77u8, 156u8, 179u8, 55u8, 49u8, + ], + ) + } + #[doc = " Stakers whose funds are managed by other pallets."] + #[doc = ""] + #[doc = " This pallet does not apply any locks on them, therefore they are only virtually bonded. They"] + #[doc = " are expected to be keyless accounts and hence should not be allowed to mutate their ledger"] + #[doc = " directly via this pallet. Instead, these accounts are managed by other pallets and accessed"] + #[doc = " via low level apis. We keep track of them to do minimal integrity checks."] + pub fn virtual_stakers_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::virtual_stakers::VirtualStakers, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "VirtualStakers", + (), + [ + 176u8, 114u8, 176u8, 164u8, 4u8, 33u8, 248u8, 152u8, 206u8, 8u8, 241u8, + 209u8, 96u8, 131u8, 145u8, 120u8, 74u8, 141u8, 249u8, 208u8, 93u8, + 157u8, 125u8, 0u8, 63u8, 18u8, 61u8, 195u8, 240u8, 145u8, 15u8, 161u8, + ], + ) + } + #[doc = " Stakers whose funds are managed by other pallets."] + #[doc = ""] + #[doc = " This pallet does not apply any locks on them, therefore they are only virtually bonded. They"] + #[doc = " are expected to be keyless accounts and hence should not be allowed to mutate their ledger"] + #[doc = " directly via this pallet. Instead, these accounts are managed by other pallets and accessed"] + #[doc = " via low level apis. We keep track of them to do minimal integrity checks."] + pub fn virtual_stakers( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::virtual_stakers::Param0, + >, + types::virtual_stakers::VirtualStakers, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "VirtualStakers", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 176u8, 114u8, 176u8, 164u8, 4u8, 33u8, 248u8, 152u8, 206u8, 8u8, 241u8, + 209u8, 96u8, 131u8, 145u8, 120u8, 74u8, 141u8, 249u8, 208u8, 93u8, + 157u8, 125u8, 0u8, 63u8, 18u8, 61u8, 195u8, 240u8, 145u8, 15u8, 161u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_virtual_stakers( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_virtual_stakers::CounterForVirtualStakers, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "CounterForVirtualStakers", + (), + [ + 50u8, 194u8, 203u8, 237u8, 196u8, 237u8, 212u8, 33u8, 145u8, 68u8, + 29u8, 99u8, 68u8, 153u8, 191u8, 111u8, 104u8, 148u8, 191u8, 92u8, + 249u8, 22u8, 253u8, 98u8, 176u8, 152u8, 237u8, 143u8, 26u8, 5u8, 1u8, + 98u8, + ], + ) + } + #[doc = " The maximum nominator count before we stop allowing new validators to join."] + #[doc = ""] + #[doc = " When this value is not set, no limits are enforced."] + pub fn max_nominators_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_nominators_count::MaxNominatorsCount, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MaxNominatorsCount", + (), + [ + 11u8, 234u8, 179u8, 254u8, 95u8, 119u8, 35u8, 255u8, 141u8, 95u8, + 148u8, 209u8, 43u8, 202u8, 19u8, 57u8, 185u8, 50u8, 152u8, 192u8, 95u8, + 13u8, 158u8, 245u8, 113u8, 199u8, 255u8, 187u8, 37u8, 44u8, 8u8, 119u8, + ], + ) + } + #[doc = " The current era index."] + #[doc = ""] + #[doc = " This is the latest planned era, depending on how the Session pallet queues the validator"] + #[doc = " set, it might be active or not."] + pub fn current_era( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_era::CurrentEra, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "CurrentEra", + (), + [ + 247u8, 239u8, 171u8, 18u8, 137u8, 240u8, 213u8, 3u8, 173u8, 173u8, + 236u8, 141u8, 202u8, 191u8, 228u8, 120u8, 196u8, 188u8, 13u8, 66u8, + 253u8, 117u8, 90u8, 8u8, 158u8, 11u8, 236u8, 141u8, 178u8, 44u8, 119u8, + 25u8, + ], + ) + } + #[doc = " The active era information, it holds index and start."] + #[doc = ""] + #[doc = " The active era is the era being currently rewarded. Validator set of this era must be"] + #[doc = " equal to [`SessionInterface::validators`]."] + pub fn active_era( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::active_era::ActiveEra, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ActiveEra", + (), + [ + 24u8, 229u8, 66u8, 56u8, 111u8, 234u8, 139u8, 93u8, 245u8, 137u8, + 110u8, 110u8, 121u8, 15u8, 216u8, 207u8, 97u8, 120u8, 125u8, 45u8, + 61u8, 2u8, 50u8, 100u8, 3u8, 106u8, 12u8, 233u8, 123u8, 156u8, 145u8, + 38u8, + ], + ) + } + #[doc = " The session index at which the era start for the last [`Config::HistoryDepth`] eras."] + #[doc = ""] + #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] + #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] + pub fn eras_start_session_index_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_start_session_index::ErasStartSessionIndex, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStartSessionIndex", + (), + [ + 104u8, 76u8, 102u8, 20u8, 9u8, 146u8, 55u8, 204u8, 12u8, 15u8, 117u8, + 22u8, 54u8, 230u8, 98u8, 105u8, 191u8, 136u8, 140u8, 65u8, 48u8, 29u8, + 19u8, 144u8, 159u8, 241u8, 158u8, 77u8, 4u8, 230u8, 216u8, 52u8, + ], + ) + } + #[doc = " The session index at which the era start for the last [`Config::HistoryDepth`] eras."] + #[doc = ""] + #[doc = " Note: This tracks the starting session (i.e. session index when era start being active)"] + #[doc = " for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`."] + pub fn eras_start_session_index( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_start_session_index::Param0, + >, + types::eras_start_session_index::ErasStartSessionIndex, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStartSessionIndex", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 104u8, 76u8, 102u8, 20u8, 9u8, 146u8, 55u8, 204u8, 12u8, 15u8, 117u8, + 22u8, 54u8, 230u8, 98u8, 105u8, 191u8, 136u8, 140u8, 65u8, 48u8, 29u8, + 19u8, 144u8, 159u8, 241u8, 158u8, 77u8, 4u8, 230u8, 216u8, 52u8, + ], + ) + } + #[doc = " Exposure of validator at era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + #[doc = ""] + #[doc = " Note: Deprecated since v14. Use `EraInfo` instead to work with exposures."] + pub fn eras_stakers_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_stakers::ErasStakers, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakers", + (), + [ + 120u8, 64u8, 232u8, 134u8, 109u8, 212u8, 242u8, 64u8, 68u8, 196u8, + 108u8, 91u8, 255u8, 123u8, 245u8, 27u8, 55u8, 254u8, 60u8, 74u8, 183u8, + 183u8, 226u8, 159u8, 244u8, 56u8, 139u8, 34u8, 228u8, 176u8, 241u8, + 76u8, + ], + ) + } + #[doc = " Exposure of validator at era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + #[doc = ""] + #[doc = " Note: Deprecated since v14. Use `EraInfo` instead to work with exposures."] + pub fn eras_stakers_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::eras_stakers::ErasStakers, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakers", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 120u8, 64u8, 232u8, 134u8, 109u8, 212u8, 242u8, 64u8, 68u8, 196u8, + 108u8, 91u8, 255u8, 123u8, 245u8, 27u8, 55u8, 254u8, 60u8, 74u8, 183u8, + 183u8, 226u8, 159u8, 244u8, 56u8, 139u8, 34u8, 228u8, 176u8, 241u8, + 76u8, + ], + ) + } + #[doc = " Exposure of validator at era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + #[doc = ""] + #[doc = " Note: Deprecated since v14. Use `EraInfo` instead to work with exposures."] + pub fn eras_stakers( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers::Param1, + >, + ), + types::eras_stakers::ErasStakers, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakers", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 120u8, 64u8, 232u8, 134u8, 109u8, 212u8, 242u8, 64u8, 68u8, 196u8, + 108u8, 91u8, 255u8, 123u8, 245u8, 27u8, 55u8, 254u8, 60u8, 74u8, 183u8, + 183u8, 226u8, 159u8, 244u8, 56u8, 139u8, 34u8, 228u8, 176u8, 241u8, + 76u8, + ], + ) + } + #[doc = " Summary of validator exposure at a given era."] + #[doc = ""] + #[doc = " This contains the total stake in support of the validator and their own stake. In addition,"] + #[doc = " it can also be used to get the number of nominators backing this validator and the number of"] + #[doc = " exposure pages they are divided into. The page count is useful to determine the number of"] + #[doc = " pages of rewards that needs to be claimed."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = " Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty overview is returned."] + pub fn eras_stakers_overview_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_stakers_overview::ErasStakersOverview, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersOverview", + (), + [ + 235u8, 255u8, 39u8, 72u8, 235u8, 168u8, 98u8, 191u8, 30u8, 195u8, + 141u8, 103u8, 167u8, 115u8, 74u8, 170u8, 117u8, 153u8, 151u8, 186u8, + 20u8, 99u8, 64u8, 159u8, 247u8, 153u8, 206u8, 169u8, 13u8, 239u8, 39u8, + 157u8, + ], + ) + } + #[doc = " Summary of validator exposure at a given era."] + #[doc = ""] + #[doc = " This contains the total stake in support of the validator and their own stake. In addition,"] + #[doc = " it can also be used to get the number of nominators backing this validator and the number of"] + #[doc = " exposure pages they are divided into. The page count is useful to determine the number of"] + #[doc = " pages of rewards that needs to be claimed."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = " Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty overview is returned."] + pub fn eras_stakers_overview_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_overview::Param0, + >, + types::eras_stakers_overview::ErasStakersOverview, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersOverview", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 235u8, 255u8, 39u8, 72u8, 235u8, 168u8, 98u8, 191u8, 30u8, 195u8, + 141u8, 103u8, 167u8, 115u8, 74u8, 170u8, 117u8, 153u8, 151u8, 186u8, + 20u8, 99u8, 64u8, 159u8, 247u8, 153u8, 206u8, 169u8, 13u8, 239u8, 39u8, + 157u8, + ], + ) + } + #[doc = " Summary of validator exposure at a given era."] + #[doc = ""] + #[doc = " This contains the total stake in support of the validator and their own stake. In addition,"] + #[doc = " it can also be used to get the number of nominators backing this validator and the number of"] + #[doc = " exposure pages they are divided into. The page count is useful to determine the number of"] + #[doc = " pages of rewards that needs to be claimed."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = " Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty overview is returned."] + pub fn eras_stakers_overview( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_overview::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_overview::Param1, + >, + ), + types::eras_stakers_overview::ErasStakersOverview, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersOverview", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 235u8, 255u8, 39u8, 72u8, 235u8, 168u8, 98u8, 191u8, 30u8, 195u8, + 141u8, 103u8, 167u8, 115u8, 74u8, 170u8, 117u8, 153u8, 151u8, 186u8, + 20u8, 99u8, 64u8, 159u8, 247u8, 153u8, 206u8, 169u8, 13u8, 239u8, 39u8, + 157u8, + ], + ) + } + #[doc = " Clipped Exposure of validator at era."] + #[doc = ""] + #[doc = " Note: This is deprecated, should be used as read-only and will be removed in the future."] + #[doc = " New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead."] + #[doc = ""] + #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] + #[doc = " `T::MaxExposurePageSize` biggest stakers."] + #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] + #[doc = " This is used to limit the i/o cost for the nominator payout."] + #[doc = ""] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " It is removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + #[doc = ""] + #[doc = " Note: Deprecated since v14. Use `EraInfo` instead to work with exposures."] + pub fn eras_stakers_clipped_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_stakers_clipped::ErasStakersClipped, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersClipped", + (), + [ + 85u8, 192u8, 164u8, 53u8, 181u8, 61u8, 132u8, 255u8, 144u8, 41u8, 44u8, + 199u8, 34u8, 11u8, 248u8, 81u8, 203u8, 204u8, 152u8, 138u8, 112u8, + 229u8, 145u8, 253u8, 111u8, 111u8, 38u8, 74u8, 199u8, 164u8, 16u8, + 45u8, + ], + ) + } + #[doc = " Clipped Exposure of validator at era."] + #[doc = ""] + #[doc = " Note: This is deprecated, should be used as read-only and will be removed in the future."] + #[doc = " New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead."] + #[doc = ""] + #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] + #[doc = " `T::MaxExposurePageSize` biggest stakers."] + #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] + #[doc = " This is used to limit the i/o cost for the nominator payout."] + #[doc = ""] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " It is removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + #[doc = ""] + #[doc = " Note: Deprecated since v14. Use `EraInfo` instead to work with exposures."] + pub fn eras_stakers_clipped_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_clipped::Param0, + >, + types::eras_stakers_clipped::ErasStakersClipped, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersClipped", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 85u8, 192u8, 164u8, 53u8, 181u8, 61u8, 132u8, 255u8, 144u8, 41u8, 44u8, + 199u8, 34u8, 11u8, 248u8, 81u8, 203u8, 204u8, 152u8, 138u8, 112u8, + 229u8, 145u8, 253u8, 111u8, 111u8, 38u8, 74u8, 199u8, 164u8, 16u8, + 45u8, + ], + ) + } + #[doc = " Clipped Exposure of validator at era."] + #[doc = ""] + #[doc = " Note: This is deprecated, should be used as read-only and will be removed in the future."] + #[doc = " New `Exposure`s are stored in a paged manner in `ErasStakersPaged` instead."] + #[doc = ""] + #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"] + #[doc = " `T::MaxExposurePageSize` biggest stakers."] + #[doc = " (Note: the field `total` and `own` of the exposure remains unchanged)."] + #[doc = " This is used to limit the i/o cost for the nominator payout."] + #[doc = ""] + #[doc = " This is keyed fist by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " It is removed after [`Config::HistoryDepth`] eras."] + #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."] + #[doc = ""] + #[doc = " Note: Deprecated since v14. Use `EraInfo` instead to work with exposures."] + pub fn eras_stakers_clipped( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_clipped::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_clipped::Param1, + >, + ), + types::eras_stakers_clipped::ErasStakersClipped, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersClipped", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 85u8, 192u8, 164u8, 53u8, 181u8, 61u8, 132u8, 255u8, 144u8, 41u8, 44u8, + 199u8, 34u8, 11u8, 248u8, 81u8, 203u8, 204u8, 152u8, 138u8, 112u8, + 229u8, 145u8, 253u8, 111u8, 111u8, 38u8, 74u8, 199u8, 164u8, 16u8, + 45u8, + ], + ) + } + #[doc = " Paginated exposure of a validator at given era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion, then stash account and finally"] + #[doc = " the page. Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " This is cleared after [`Config::HistoryDepth`] eras."] + pub fn eras_stakers_paged_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_stakers_paged::ErasStakersPaged, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersPaged", + (), + [ + 111u8, 11u8, 84u8, 186u8, 98u8, 173u8, 68u8, 65u8, 58u8, 241u8, 211u8, + 126u8, 10u8, 96u8, 40u8, 20u8, 233u8, 238u8, 116u8, 113u8, 215u8, + 178u8, 99u8, 229u8, 114u8, 234u8, 248u8, 157u8, 173u8, 201u8, 244u8, + 217u8, + ], + ) + } + #[doc = " Paginated exposure of a validator at given era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion, then stash account and finally"] + #[doc = " the page. Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " This is cleared after [`Config::HistoryDepth`] eras."] + pub fn eras_stakers_paged_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_paged::Param0, + >, + types::eras_stakers_paged::ErasStakersPaged, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersPaged", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 111u8, 11u8, 84u8, 186u8, 98u8, 173u8, 68u8, 65u8, 58u8, 241u8, 211u8, + 126u8, 10u8, 96u8, 40u8, 20u8, 233u8, 238u8, 116u8, 113u8, 215u8, + 178u8, 99u8, 229u8, 114u8, 234u8, 248u8, 157u8, 173u8, 201u8, 244u8, + 217u8, + ], + ) + } + #[doc = " Paginated exposure of a validator at given era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion, then stash account and finally"] + #[doc = " the page. Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " This is cleared after [`Config::HistoryDepth`] eras."] + pub fn eras_stakers_paged_iter2( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_paged::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_paged::Param1, + >, + ), + types::eras_stakers_paged::ErasStakersPaged, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersPaged", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 111u8, 11u8, 84u8, 186u8, 98u8, 173u8, 68u8, 65u8, 58u8, 241u8, 211u8, + 126u8, 10u8, 96u8, 40u8, 20u8, 233u8, 238u8, 116u8, 113u8, 215u8, + 178u8, 99u8, 229u8, 114u8, 234u8, 248u8, 157u8, 173u8, 201u8, 244u8, + 217u8, + ], + ) + } + #[doc = " Paginated exposure of a validator at given era."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion, then stash account and finally"] + #[doc = " the page. Should only be accessed through `EraInfo`."] + #[doc = ""] + #[doc = " This is cleared after [`Config::HistoryDepth`] eras."] + pub fn eras_stakers_paged( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + _2: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_paged::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_paged::Param1, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_stakers_paged::Param2, + >, + ), + types::eras_stakers_paged::ErasStakersPaged, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasStakersPaged", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_2.borrow()), + ), + [ + 111u8, 11u8, 84u8, 186u8, 98u8, 173u8, 68u8, 65u8, 58u8, 241u8, 211u8, + 126u8, 10u8, 96u8, 40u8, 20u8, 233u8, 238u8, 116u8, 113u8, 215u8, + 178u8, 99u8, 229u8, 114u8, 234u8, 248u8, 157u8, 173u8, 201u8, 244u8, + 217u8, + ], + ) + } + #[doc = " History of claimed paged rewards by era and validator."] + #[doc = ""] + #[doc = " This is keyed by era and validator stash which maps to the set of page indexes which have"] + #[doc = " been claimed."] + #[doc = ""] + #[doc = " It is removed after [`Config::HistoryDepth`] eras."] + pub fn claimed_rewards_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::claimed_rewards::ClaimedRewards, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ClaimedRewards", + (), + [ + 44u8, 248u8, 79u8, 211u8, 69u8, 179u8, 60u8, 185u8, 3u8, 175u8, 51u8, + 137u8, 222u8, 150u8, 73u8, 60u8, 178u8, 0u8, 179u8, 117u8, 37u8, 86u8, + 201u8, 189u8, 49u8, 33u8, 182u8, 17u8, 14u8, 12u8, 190u8, 89u8, + ], + ) + } + #[doc = " History of claimed paged rewards by era and validator."] + #[doc = ""] + #[doc = " This is keyed by era and validator stash which maps to the set of page indexes which have"] + #[doc = " been claimed."] + #[doc = ""] + #[doc = " It is removed after [`Config::HistoryDepth`] eras."] + pub fn claimed_rewards_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::claimed_rewards::Param0, + >, + types::claimed_rewards::ClaimedRewards, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ClaimedRewards", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 44u8, 248u8, 79u8, 211u8, 69u8, 179u8, 60u8, 185u8, 3u8, 175u8, 51u8, + 137u8, 222u8, 150u8, 73u8, 60u8, 178u8, 0u8, 179u8, 117u8, 37u8, 86u8, + 201u8, 189u8, 49u8, 33u8, 182u8, 17u8, 14u8, 12u8, 190u8, 89u8, + ], + ) + } + #[doc = " History of claimed paged rewards by era and validator."] + #[doc = ""] + #[doc = " This is keyed by era and validator stash which maps to the set of page indexes which have"] + #[doc = " been claimed."] + #[doc = ""] + #[doc = " It is removed after [`Config::HistoryDepth`] eras."] + pub fn claimed_rewards( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::claimed_rewards::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::claimed_rewards::Param1, + >, + ), + types::claimed_rewards::ClaimedRewards, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ClaimedRewards", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 44u8, 248u8, 79u8, 211u8, 69u8, 179u8, 60u8, 185u8, 3u8, 175u8, 51u8, + 137u8, 222u8, 150u8, 73u8, 60u8, 178u8, 0u8, 179u8, 117u8, 37u8, 86u8, + 201u8, 189u8, 49u8, 33u8, 182u8, 17u8, 14u8, 12u8, 190u8, 89u8, + ], + ) + } + #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + pub fn eras_validator_prefs_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_validator_prefs::ErasValidatorPrefs, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasValidatorPrefs", + (), + [ + 134u8, 250u8, 229u8, 21u8, 44u8, 119u8, 43u8, 99u8, 69u8, 94u8, 177u8, + 180u8, 174u8, 134u8, 54u8, 25u8, 56u8, 144u8, 194u8, 149u8, 56u8, + 234u8, 78u8, 238u8, 78u8, 247u8, 205u8, 43u8, 16u8, 159u8, 92u8, 169u8, + ], + ) + } + #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + pub fn eras_validator_prefs_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_validator_prefs::Param0, + >, + types::eras_validator_prefs::ErasValidatorPrefs, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasValidatorPrefs", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 134u8, 250u8, 229u8, 21u8, 44u8, 119u8, 43u8, 99u8, 69u8, 94u8, 177u8, + 180u8, 174u8, 134u8, 54u8, 25u8, 56u8, 144u8, 194u8, 149u8, 56u8, + 234u8, 78u8, 238u8, 78u8, 247u8, 205u8, 43u8, 16u8, 159u8, 92u8, 169u8, + ], + ) + } + #[doc = " Similar to `ErasStakers`, this holds the preferences of validators."] + #[doc = ""] + #[doc = " This is keyed first by the era index to allow bulk deletion and then the stash account."] + #[doc = ""] + #[doc = " Is it removed after [`Config::HistoryDepth`] eras."] + pub fn eras_validator_prefs( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::eras_validator_prefs::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::eras_validator_prefs::Param1, + >, + ), + types::eras_validator_prefs::ErasValidatorPrefs, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasValidatorPrefs", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 134u8, 250u8, 229u8, 21u8, 44u8, 119u8, 43u8, 99u8, 69u8, 94u8, 177u8, + 180u8, 174u8, 134u8, 54u8, 25u8, 56u8, 144u8, 194u8, 149u8, 56u8, + 234u8, 78u8, 238u8, 78u8, 247u8, 205u8, 43u8, 16u8, 159u8, 92u8, 169u8, + ], + ) + } + #[doc = " The total validator era payout for the last [`Config::HistoryDepth`] eras."] + #[doc = ""] + #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] + pub fn eras_validator_reward_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_validator_reward::ErasValidatorReward, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasValidatorReward", + (), + [ + 185u8, 85u8, 179u8, 163u8, 178u8, 168u8, 141u8, 200u8, 59u8, 77u8, 2u8, + 197u8, 36u8, 188u8, 133u8, 117u8, 2u8, 25u8, 105u8, 132u8, 44u8, 75u8, + 15u8, 82u8, 57u8, 89u8, 242u8, 234u8, 70u8, 244u8, 198u8, 126u8, + ], + ) + } + #[doc = " The total validator era payout for the last [`Config::HistoryDepth`] eras."] + #[doc = ""] + #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."] + pub fn eras_validator_reward( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_validator_reward::Param0, + >, + types::eras_validator_reward::ErasValidatorReward, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasValidatorReward", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 185u8, 85u8, 179u8, 163u8, 178u8, 168u8, 141u8, 200u8, 59u8, 77u8, 2u8, + 197u8, 36u8, 188u8, 133u8, 117u8, 2u8, 25u8, 105u8, 132u8, 44u8, 75u8, + 15u8, 82u8, 57u8, 89u8, 242u8, 234u8, 70u8, 244u8, 198u8, 126u8, + ], + ) + } + #[doc = " Rewards for the last [`Config::HistoryDepth`] eras."] + #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] + pub fn eras_reward_points_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_reward_points::ErasRewardPoints, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasRewardPoints", + (), + [ + 135u8, 0u8, 85u8, 241u8, 213u8, 133u8, 30u8, 192u8, 251u8, 191u8, 41u8, + 38u8, 233u8, 236u8, 218u8, 246u8, 166u8, 93u8, 46u8, 37u8, 48u8, 187u8, + 172u8, 48u8, 251u8, 178u8, 75u8, 203u8, 60u8, 188u8, 204u8, 207u8, + ], + ) + } + #[doc = " Rewards for the last [`Config::HistoryDepth`] eras."] + #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."] + pub fn eras_reward_points( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_reward_points::Param0, + >, + types::eras_reward_points::ErasRewardPoints, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasRewardPoints", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 135u8, 0u8, 85u8, 241u8, 213u8, 133u8, 30u8, 192u8, 251u8, 191u8, 41u8, + 38u8, 233u8, 236u8, 218u8, 246u8, 166u8, 93u8, 46u8, 37u8, 48u8, 187u8, + 172u8, 48u8, 251u8, 178u8, 75u8, 203u8, 60u8, 188u8, 204u8, 207u8, + ], + ) + } + #[doc = " The total amount staked for the last [`Config::HistoryDepth`] eras."] + #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] + pub fn eras_total_stake_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::eras_total_stake::ErasTotalStake, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasTotalStake", + (), + [ + 8u8, 78u8, 101u8, 62u8, 124u8, 126u8, 66u8, 26u8, 47u8, 126u8, 239u8, + 204u8, 222u8, 104u8, 19u8, 108u8, 238u8, 160u8, 112u8, 242u8, 56u8, + 2u8, 250u8, 164u8, 250u8, 213u8, 201u8, 84u8, 193u8, 117u8, 108u8, + 146u8, + ], + ) + } + #[doc = " The total amount staked for the last [`Config::HistoryDepth`] eras."] + #[doc = " If total hasn't been set or has been removed then 0 stake is returned."] + pub fn eras_total_stake( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::eras_total_stake::Param0, + >, + types::eras_total_stake::ErasTotalStake, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ErasTotalStake", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 8u8, 78u8, 101u8, 62u8, 124u8, 126u8, 66u8, 26u8, 47u8, 126u8, 239u8, + 204u8, 222u8, 104u8, 19u8, 108u8, 238u8, 160u8, 112u8, 242u8, 56u8, + 2u8, 250u8, 164u8, 250u8, 213u8, 201u8, 84u8, 193u8, 117u8, 108u8, + 146u8, + ], + ) + } + #[doc = " Mode of era forcing."] + pub fn force_era( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::force_era::ForceEra, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ForceEra", + (), + [ + 177u8, 148u8, 73u8, 108u8, 136u8, 126u8, 89u8, 18u8, 124u8, 66u8, 30u8, + 102u8, 133u8, 164u8, 78u8, 214u8, 184u8, 163u8, 75u8, 164u8, 117u8, + 233u8, 209u8, 158u8, 99u8, 208u8, 21u8, 194u8, 152u8, 82u8, 16u8, + 222u8, + ], + ) + } + #[doc = " Maximum staked rewards, i.e. the percentage of the era inflation that"] + #[doc = " is used for stake rewards."] + #[doc = " See [Era payout](./index.html#era-payout)."] + pub fn max_staked_rewards( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_staked_rewards::MaxStakedRewards, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "MaxStakedRewards", + (), + [ + 115u8, 208u8, 243u8, 76u8, 110u8, 71u8, 154u8, 80u8, 193u8, 138u8, + 75u8, 11u8, 24u8, 51u8, 112u8, 125u8, 153u8, 151u8, 216u8, 67u8, 214u8, + 4u8, 94u8, 229u8, 32u8, 186u8, 140u8, 150u8, 100u8, 233u8, 88u8, 53u8, + ], + ) + } + #[doc = " The percentage of the slash that is distributed to reporters."] + #[doc = ""] + #[doc = " The rest of the slashed value is handled by the `Slash`."] + pub fn slash_reward_fraction( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::slash_reward_fraction::SlashRewardFraction, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "SlashRewardFraction", + (), + [ + 53u8, 88u8, 253u8, 237u8, 84u8, 228u8, 187u8, 130u8, 108u8, 195u8, + 135u8, 25u8, 75u8, 52u8, 238u8, 62u8, 133u8, 38u8, 139u8, 129u8, 216u8, + 193u8, 197u8, 216u8, 245u8, 171u8, 128u8, 207u8, 125u8, 246u8, 248u8, + 7u8, + ], + ) + } + #[doc = " The amount of currency given to reporters of a slash event which was"] + #[doc = " canceled by extraordinary circumstances (e.g. governance)."] + pub fn canceled_slash_payout( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::canceled_slash_payout::CanceledSlashPayout, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "CanceledSlashPayout", + (), + [ + 221u8, 88u8, 134u8, 81u8, 22u8, 229u8, 100u8, 27u8, 86u8, 244u8, 229u8, + 107u8, 251u8, 119u8, 58u8, 153u8, 19u8, 20u8, 254u8, 169u8, 248u8, + 220u8, 98u8, 118u8, 48u8, 213u8, 22u8, 79u8, 242u8, 250u8, 147u8, + 173u8, + ], + ) + } + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::unapplied_slashes::UnappliedSlashes, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "UnappliedSlashes", + (), + [ + 158u8, 134u8, 7u8, 21u8, 200u8, 222u8, 197u8, 166u8, 199u8, 39u8, 1u8, + 167u8, 164u8, 154u8, 165u8, 118u8, 92u8, 223u8, 219u8, 136u8, 196u8, + 155u8, 243u8, 20u8, 198u8, 92u8, 198u8, 61u8, 252u8, 176u8, 175u8, + 172u8, + ], + ) + } + #[doc = " All unapplied slashes that are queued for later."] + pub fn unapplied_slashes( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::unapplied_slashes::Param0, + >, + types::unapplied_slashes::UnappliedSlashes, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "UnappliedSlashes", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 158u8, 134u8, 7u8, 21u8, 200u8, 222u8, 197u8, 166u8, 199u8, 39u8, 1u8, + 167u8, 164u8, 154u8, 165u8, 118u8, 92u8, 223u8, 219u8, 136u8, 196u8, + 155u8, 243u8, 20u8, 198u8, 92u8, 198u8, 61u8, 252u8, 176u8, 175u8, + 172u8, + ], + ) + } + #[doc = " A mapping from still-bonded eras to the first session index of that era."] + #[doc = ""] + #[doc = " Must contains information for eras for the range:"] + #[doc = " `[active_era - bounding_duration; active_era]`"] + pub fn bonded_eras( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bonded_eras::BondedEras, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "BondedEras", + (), + [ + 20u8, 0u8, 164u8, 169u8, 183u8, 130u8, 242u8, 167u8, 92u8, 254u8, + 191u8, 206u8, 177u8, 182u8, 219u8, 162u8, 7u8, 116u8, 223u8, 166u8, + 239u8, 216u8, 140u8, 42u8, 174u8, 237u8, 134u8, 186u8, 180u8, 62u8, + 175u8, 239u8, + ], + ) + } + #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] + #[doc = " and slash value of the era."] + pub fn validator_slash_in_era_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::validator_slash_in_era::ValidatorSlashInEra, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ValidatorSlashInEra", + (), + [ + 245u8, 72u8, 52u8, 22u8, 10u8, 177u8, 127u8, 83u8, 180u8, 246u8, 17u8, + 82u8, 6u8, 231u8, 131u8, 68u8, 73u8, 92u8, 241u8, 251u8, 32u8, 97u8, + 121u8, 137u8, 190u8, 227u8, 162u8, 16u8, 224u8, 207u8, 63u8, 184u8, + ], + ) + } + #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] + #[doc = " and slash value of the era."] + pub fn validator_slash_in_era_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::validator_slash_in_era::Param0, + >, + types::validator_slash_in_era::ValidatorSlashInEra, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ValidatorSlashInEra", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 245u8, 72u8, 52u8, 22u8, 10u8, 177u8, 127u8, 83u8, 180u8, 246u8, 17u8, + 82u8, 6u8, 231u8, 131u8, 68u8, 73u8, 92u8, 241u8, 251u8, 32u8, 97u8, + 121u8, 137u8, 190u8, 227u8, 162u8, 16u8, 224u8, 207u8, 63u8, 184u8, + ], + ) + } + #[doc = " All slashing events on validators, mapped by era to the highest slash proportion"] + #[doc = " and slash value of the era."] + pub fn validator_slash_in_era( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::validator_slash_in_era::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::validator_slash_in_era::Param1, + >, + ), + types::validator_slash_in_era::ValidatorSlashInEra, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ValidatorSlashInEra", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 245u8, 72u8, 52u8, 22u8, 10u8, 177u8, 127u8, 83u8, 180u8, 246u8, 17u8, + 82u8, 6u8, 231u8, 131u8, 68u8, 73u8, 92u8, 241u8, 251u8, 32u8, 97u8, + 121u8, 137u8, 190u8, 227u8, 162u8, 16u8, 224u8, 207u8, 63u8, 184u8, + ], + ) + } + #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::nominator_slash_in_era::NominatorSlashInEra, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "NominatorSlashInEra", + (), + [ + 8u8, 89u8, 171u8, 183u8, 64u8, 29u8, 44u8, 185u8, 11u8, 204u8, 67u8, + 60u8, 208u8, 132u8, 9u8, 214u8, 13u8, 148u8, 205u8, 26u8, 5u8, 7u8, + 250u8, 191u8, 83u8, 118u8, 95u8, 17u8, 40u8, 126u8, 16u8, 135u8, + ], + ) + } + #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::nominator_slash_in_era::Param0, + >, + types::nominator_slash_in_era::NominatorSlashInEra, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "NominatorSlashInEra", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 8u8, 89u8, 171u8, 183u8, 64u8, 29u8, 44u8, 185u8, 11u8, 204u8, 67u8, + 60u8, 208u8, 132u8, 9u8, 214u8, 13u8, 148u8, 205u8, 26u8, 5u8, 7u8, + 250u8, 191u8, 83u8, 118u8, 95u8, 17u8, 40u8, 126u8, 16u8, 135u8, + ], + ) + } + #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."] + pub fn nominator_slash_in_era( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::nominator_slash_in_era::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::nominator_slash_in_era::Param1, + >, + ), + types::nominator_slash_in_era::NominatorSlashInEra, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "NominatorSlashInEra", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 8u8, 89u8, 171u8, 183u8, 64u8, 29u8, 44u8, 185u8, 11u8, 204u8, 67u8, + 60u8, 208u8, 132u8, 9u8, 214u8, 13u8, 148u8, 205u8, 26u8, 5u8, 7u8, + 250u8, 191u8, 83u8, 118u8, 95u8, 17u8, 40u8, 126u8, 16u8, 135u8, + ], + ) + } + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::slashing_spans::SlashingSpans, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "SlashingSpans", + (), + [ + 74u8, 169u8, 189u8, 252u8, 193u8, 191u8, 114u8, 107u8, 158u8, 125u8, + 252u8, 35u8, 177u8, 129u8, 99u8, 24u8, 77u8, 223u8, 238u8, 24u8, 237u8, + 225u8, 5u8, 117u8, 163u8, 180u8, 139u8, 22u8, 169u8, 185u8, 60u8, + 217u8, + ], + ) + } + #[doc = " Slashing spans for stash accounts."] + pub fn slashing_spans( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::slashing_spans::SlashingSpans, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "SlashingSpans", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 74u8, 169u8, 189u8, 252u8, 193u8, 191u8, 114u8, 107u8, 158u8, 125u8, + 252u8, 35u8, 177u8, 129u8, 99u8, 24u8, 77u8, 223u8, 238u8, 24u8, 237u8, + 225u8, 5u8, 117u8, 163u8, 180u8, 139u8, 22u8, 169u8, 185u8, 60u8, + 217u8, + ], + ) + } + #[doc = " Records information about the maximum slash of a stash within a slashing span,"] + #[doc = " as well as how much reward has been paid out."] + pub fn span_slash_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::span_slash::SpanSlash, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "SpanSlash", + (), + [ + 158u8, 168u8, 151u8, 108u8, 4u8, 168u8, 253u8, 28u8, 69u8, 111u8, 99u8, + 235u8, 175u8, 72u8, 48u8, 238u8, 239u8, 142u8, 40u8, 142u8, 97u8, 77u8, + 72u8, 123u8, 210u8, 157u8, 119u8, 180u8, 205u8, 98u8, 110u8, 215u8, + ], + ) + } + #[doc = " Records information about the maximum slash of a stash within a slashing span,"] + #[doc = " as well as how much reward has been paid out."] + pub fn span_slash_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::span_slash::SpanSlash, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "SpanSlash", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 158u8, 168u8, 151u8, 108u8, 4u8, 168u8, 253u8, 28u8, 69u8, 111u8, 99u8, + 235u8, 175u8, 72u8, 48u8, 238u8, 239u8, 142u8, 40u8, 142u8, 97u8, 77u8, + 72u8, 123u8, 210u8, 157u8, 119u8, 180u8, 205u8, 98u8, 110u8, 215u8, + ], + ) + } + #[doc = " Records information about the maximum slash of a stash within a slashing span,"] + #[doc = " as well as how much reward has been paid out."] + pub fn span_slash( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::span_slash::SpanSlash, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "SpanSlash", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 158u8, 168u8, 151u8, 108u8, 4u8, 168u8, 253u8, 28u8, 69u8, 111u8, 99u8, + 235u8, 175u8, 72u8, 48u8, 238u8, 239u8, 142u8, 40u8, 142u8, 97u8, 77u8, + 72u8, 123u8, 210u8, 157u8, 119u8, 180u8, 205u8, 98u8, 110u8, 215u8, + ], + ) + } + #[doc = " The last planned session scheduled by the session pallet."] + #[doc = ""] + #[doc = " This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]."] + pub fn current_planned_session( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_planned_session::CurrentPlannedSession, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "CurrentPlannedSession", + (), + [ + 12u8, 47u8, 20u8, 104u8, 155u8, 181u8, 35u8, 91u8, 172u8, 97u8, 206u8, + 135u8, 185u8, 142u8, 46u8, 72u8, 32u8, 118u8, 225u8, 191u8, 28u8, + 130u8, 7u8, 38u8, 181u8, 233u8, 201u8, 8u8, 160u8, 161u8, 86u8, 204u8, + ], + ) + } + #[doc = " Indices of validators that have offended in the active era. The offenders are disabled for a"] + #[doc = " whole era. For this reason they are kept here - only staking pallet knows about eras. The"] + #[doc = " implementor of [`DisablingStrategy`] defines if a validator should be disabled which"] + #[doc = " implicitly means that the implementor also controls the max number of disabled validators."] + #[doc = ""] + #[doc = " The vec is always kept sorted so that we can find whether a given validator has previously"] + #[doc = " offended using binary search."] + pub fn disabled_validators( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::disabled_validators::DisabledValidators, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "DisabledValidators", + (), + [ + 213u8, 19u8, 168u8, 234u8, 187u8, 200u8, 180u8, 97u8, 234u8, 189u8, + 36u8, 233u8, 158u8, 184u8, 45u8, 35u8, 129u8, 213u8, 133u8, 8u8, 104u8, + 183u8, 46u8, 68u8, 154u8, 240u8, 132u8, 22u8, 247u8, 11u8, 54u8, 221u8, + ], + ) + } + #[doc = " The threshold for when users can start calling `chill_other` for other validators /"] + #[doc = " nominators. The threshold is compared to the actual number of validators / nominators"] + #[doc = " (`CountFor*`) in the system compared to the configured max (`Max*Count`)."] + pub fn chill_threshold( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::chill_threshold::ChillThreshold, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Staking", + "ChillThreshold", + (), + [ + 133u8, 222u8, 1u8, 208u8, 212u8, 216u8, 247u8, 66u8, 178u8, 96u8, 35u8, + 112u8, 33u8, 245u8, 11u8, 249u8, 255u8, 212u8, 204u8, 161u8, 44u8, + 38u8, 126u8, 151u8, 140u8, 42u8, 253u8, 101u8, 1u8, 23u8, 239u8, 39u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Number of eras to keep in history."] + #[doc = ""] + #[doc = " Following information is kept for eras in `[current_era -"] + #[doc = " HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,"] + #[doc = " `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,"] + #[doc = " `ErasTotalStake`, `ErasStartSessionIndex`, `ClaimedRewards`, `ErasStakersPaged`,"] + #[doc = " `ErasStakersOverview`."] + #[doc = ""] + #[doc = " Must be more than the number of eras delayed by session."] + #[doc = " I.e. active era must always be in history. I.e. `active_era >"] + #[doc = " current_era - history_depth` must be guaranteed."] + #[doc = ""] + #[doc = " If migrating an existing pallet from storage value to config value,"] + #[doc = " this should be set to same value or greater as in storage."] + #[doc = ""] + #[doc = " Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`"] + #[doc = " item `StakingLedger.legacy_claimed_rewards`. Setting this value lower than"] + #[doc = " the existing value can lead to inconsistencies in the"] + #[doc = " `StakingLedger` and will need to be handled properly in a migration."] + #[doc = " The test `reducing_history_depth_abrupt` shows this effect."] + pub fn history_depth( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Staking", + "HistoryDepth", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of sessions per era."] + pub fn sessions_per_era( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Staking", + "SessionsPerEra", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of eras that staked funds must remain bonded for."] + pub fn bonding_duration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Staking", + "BondingDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of eras that slashes are deferred by, after computation."] + #[doc = ""] + #[doc = " This should be less than the bonding duration. Set to 0 if slashes"] + #[doc = " should be applied immediately, without opportunity for intervention."] + pub fn slash_defer_duration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Staking", + "SlashDeferDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum size of each `T::ExposurePage`."] + #[doc = ""] + #[doc = " An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize`"] + #[doc = " nominators."] + #[doc = ""] + #[doc = " For older non-paged exposure, a reward payout was restricted to the top"] + #[doc = " `MaxExposurePageSize` nominators. This is to limit the i/o cost for the"] + #[doc = " nominator payout."] + #[doc = ""] + #[doc = " Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce"] + #[doc = " without handling it in a migration."] + pub fn max_exposure_page_size( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Staking", + "MaxExposurePageSize", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of `unlocking` chunks a [`StakingLedger`] can"] + #[doc = " have. Effectively determines how many unique eras a staker may be"] + #[doc = " unbonding in."] + #[doc = ""] + #[doc = " Note: `MaxUnlockingChunks` is used as the upper bound for the"] + #[doc = " `BoundedVec` item `StakingLedger.unlocking`. Setting this value"] + #[doc = " lower than the existing value can lead to inconsistencies in the"] + #[doc = " `StakingLedger` and will need to be handled properly in a runtime"] + #[doc = " migration. The test `reducing_max_unlocking_chunks_abrupt` shows"] + #[doc = " this effect."] + pub fn max_unlocking_chunks( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Staking", + "MaxUnlockingChunks", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod session { + use super::root_mod; + use super::runtime_types; + #[doc = "Error for the session pallet."] + pub type Error = runtime_types::pallet_session::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_session::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] + pub struct SetKeys { + pub keys: set_keys::Keys, + pub proof: set_keys::Proof, + } + pub mod set_keys { + use super::runtime_types; + pub type Keys = runtime_types::tangle_testnet_runtime::opaque::SessionKeys; + pub type Proof = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetKeys { + const PALLET: &'static str = "Session"; + const CALL: &'static str = "set_keys"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Removes any session key(s) of the function caller."] + #[doc = ""] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + pub struct PurgeKeys; + impl ::subxt_core::blocks::StaticExtrinsic for PurgeKeys { + const PALLET: &'static str = "Session"; + const CALL: &'static str = "purge_keys"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] + pub fn set_keys( + &self, + keys: types::set_keys::Keys, + proof: types::set_keys::Proof, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Session", + "set_keys", + types::SetKeys { keys, proof }, + [ + 228u8, 24u8, 198u8, 80u8, 11u8, 55u8, 61u8, 63u8, 97u8, 52u8, 16u8, + 194u8, 244u8, 83u8, 205u8, 189u8, 19u8, 158u8, 195u8, 163u8, 162u8, + 154u8, 168u8, 176u8, 206u8, 179u8, 171u8, 98u8, 27u8, 32u8, 60u8, 72u8, + ], + ) + } + #[doc = "Removes any session key(s) of the function caller."] + #[doc = ""] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + pub fn purge_keys( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Session", + "purge_keys", + types::PurgeKeys {}, + [ + 215u8, 204u8, 146u8, 236u8, 32u8, 78u8, 198u8, 79u8, 85u8, 214u8, 15u8, + 151u8, 158u8, 31u8, 146u8, 119u8, 119u8, 204u8, 151u8, 169u8, 226u8, + 67u8, 217u8, 39u8, 241u8, 245u8, 203u8, 240u8, 203u8, 172u8, 16u8, + 209u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_session::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "New session has happened. Note that the argument is the session index, not the"] + #[doc = "block number as the type might suggest."] + pub struct NewSession { + pub session_index: new_session::SessionIndex, + } + pub mod new_session { + use super::runtime_types; + pub type SessionIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for NewSession { + const PALLET: &'static str = "Session"; + const EVENT: &'static str = "NewSession"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod validators { + use super::runtime_types; + pub type Validators = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + pub mod current_index { + use super::runtime_types; + pub type CurrentIndex = ::core::primitive::u32; + } + pub mod queued_changed { + use super::runtime_types; + pub type QueuedChanged = ::core::primitive::bool; + } + pub mod queued_keys { + use super::runtime_types; + pub type QueuedKeys = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + runtime_types::tangle_testnet_runtime::opaque::SessionKeys, + )>; + } + pub mod disabled_validators { + use super::runtime_types; + pub type DisabledValidators = + ::subxt_core::alloc::vec::Vec<::core::primitive::u32>; + } + pub mod next_keys { + use super::runtime_types; + pub type NextKeys = runtime_types::tangle_testnet_runtime::opaque::SessionKeys; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod key_owner { + use super::runtime_types; + pub type KeyOwner = ::subxt_core::utils::AccountId32; + pub type Param0 = runtime_types::sp_core::crypto::KeyTypeId; + pub type Param1 = [::core::primitive::u8]; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The current set of validators."] + pub fn validators( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::validators::Validators, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "Validators", + (), + [ + 50u8, 86u8, 154u8, 222u8, 249u8, 209u8, 156u8, 22u8, 155u8, 25u8, + 133u8, 194u8, 210u8, 50u8, 38u8, 28u8, 139u8, 201u8, 90u8, 139u8, + 115u8, 12u8, 12u8, 141u8, 4u8, 178u8, 201u8, 241u8, 223u8, 234u8, 6u8, + 86u8, + ], + ) + } + #[doc = " Current index of the session."] + pub fn current_index( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_index::CurrentIndex, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "CurrentIndex", + (), + [ + 167u8, 151u8, 125u8, 150u8, 159u8, 21u8, 78u8, 217u8, 237u8, 183u8, + 135u8, 65u8, 187u8, 114u8, 188u8, 206u8, 16u8, 32u8, 69u8, 208u8, + 134u8, 159u8, 232u8, 224u8, 243u8, 27u8, 31u8, 166u8, 145u8, 44u8, + 221u8, 230u8, + ], + ) + } + #[doc = " True if the underlying economic identities or weighting behind the validators"] + #[doc = " has changed in the queued validator set."] + pub fn queued_changed( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::queued_changed::QueuedChanged, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "QueuedChanged", + (), + [ + 184u8, 137u8, 224u8, 137u8, 31u8, 236u8, 95u8, 164u8, 102u8, 225u8, + 198u8, 227u8, 140u8, 37u8, 113u8, 57u8, 59u8, 4u8, 202u8, 102u8, 117u8, + 36u8, 226u8, 64u8, 113u8, 141u8, 199u8, 111u8, 99u8, 144u8, 198u8, + 153u8, + ], + ) + } + #[doc = " The queued keys for the next session. When the next session begins, these keys"] + #[doc = " will be used to determine the validator's session keys."] + pub fn queued_keys( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::queued_keys::QueuedKeys, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "QueuedKeys", + (), + [ + 232u8, 66u8, 243u8, 215u8, 174u8, 100u8, 75u8, 44u8, 98u8, 40u8, 166u8, + 83u8, 9u8, 54u8, 94u8, 197u8, 135u8, 15u8, 181u8, 251u8, 14u8, 185u8, + 2u8, 97u8, 190u8, 184u8, 43u8, 48u8, 157u8, 18u8, 116u8, 194u8, + ], + ) + } + #[doc = " Indices of disabled validators."] + #[doc = ""] + #[doc = " The vec is always kept sorted so that we can find whether a given validator is"] + #[doc = " disabled using binary search. It gets cleared when `on_session_ending` returns"] + #[doc = " a new set of identities."] + pub fn disabled_validators( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::disabled_validators::DisabledValidators, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "DisabledValidators", + (), + [ + 213u8, 19u8, 168u8, 234u8, 187u8, 200u8, 180u8, 97u8, 234u8, 189u8, + 36u8, 233u8, 158u8, 184u8, 45u8, 35u8, 129u8, 213u8, 133u8, 8u8, 104u8, + 183u8, 46u8, 68u8, 154u8, 240u8, 132u8, 22u8, 247u8, 11u8, 54u8, 221u8, + ], + ) + } + #[doc = " The next session keys for a validator."] + pub fn next_keys_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_keys::NextKeys, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "NextKeys", + (), + [ + 51u8, 114u8, 107u8, 2u8, 144u8, 184u8, 167u8, 66u8, 213u8, 2u8, 91u8, + 69u8, 17u8, 28u8, 34u8, 5u8, 89u8, 79u8, 23u8, 55u8, 5u8, 222u8, 177u8, + 132u8, 194u8, 54u8, 56u8, 167u8, 57u8, 48u8, 230u8, 149u8, + ], + ) + } + #[doc = " The next session keys for a validator."] + pub fn next_keys( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::next_keys::NextKeys, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "NextKeys", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 51u8, 114u8, 107u8, 2u8, 144u8, 184u8, 167u8, 66u8, 213u8, 2u8, 91u8, + 69u8, 17u8, 28u8, 34u8, 5u8, 89u8, 79u8, 23u8, 55u8, 5u8, 222u8, 177u8, + 132u8, 194u8, 54u8, 56u8, 167u8, 57u8, 48u8, 230u8, 149u8, + ], + ) + } + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::key_owner::KeyOwner, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "KeyOwner", + (), + [ + 217u8, 204u8, 21u8, 114u8, 247u8, 129u8, 32u8, 242u8, 93u8, 91u8, + 253u8, 253u8, 248u8, 90u8, 12u8, 202u8, 195u8, 25u8, 18u8, 100u8, + 253u8, 109u8, 88u8, 77u8, 217u8, 140u8, 51u8, 40u8, 118u8, 35u8, 107u8, + 206u8, + ], + ) + } + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::key_owner::KeyOwner, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "KeyOwner", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 217u8, 204u8, 21u8, 114u8, 247u8, 129u8, 32u8, 242u8, 93u8, 91u8, + 253u8, 253u8, 248u8, 90u8, 12u8, 202u8, 195u8, 25u8, 18u8, 100u8, + 253u8, 109u8, 88u8, 77u8, 217u8, 140u8, 51u8, 40u8, 118u8, 35u8, 107u8, + 206u8, + ], + ) + } + #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."] + pub fn key_owner( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::key_owner::KeyOwner, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Session", + "KeyOwner", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 217u8, 204u8, 21u8, 114u8, 247u8, 129u8, 32u8, 242u8, 93u8, 91u8, + 253u8, 253u8, 248u8, 90u8, 12u8, 202u8, 195u8, 25u8, 18u8, 100u8, + 253u8, 109u8, 88u8, 77u8, 217u8, 140u8, 51u8, 40u8, 118u8, 35u8, 107u8, + 206u8, + ], + ) + } + } + } + } + pub mod historical { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod historical_sessions { + use super::runtime_types; + pub type HistoricalSessions = + (::subxt_core::utils::H256, ::core::primitive::u32); + pub type Param0 = ::core::primitive::u32; + } + pub mod stored_range { + use super::runtime_types; + pub type StoredRange = (::core::primitive::u32, ::core::primitive::u32); + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Mapping from historical session indices to session-data root hash and validator count."] + pub fn historical_sessions_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::historical_sessions::HistoricalSessions, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Historical", + "HistoricalSessions", + (), + [ + 9u8, 138u8, 247u8, 141u8, 178u8, 146u8, 124u8, 81u8, 162u8, 211u8, + 205u8, 149u8, 222u8, 254u8, 253u8, 188u8, 170u8, 242u8, 218u8, 41u8, + 124u8, 178u8, 109u8, 209u8, 163u8, 125u8, 225u8, 206u8, 249u8, 175u8, + 117u8, 75u8, + ], + ) + } + #[doc = " Mapping from historical session indices to session-data root hash and validator count."] + pub fn historical_sessions( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::historical_sessions::Param0, + >, + types::historical_sessions::HistoricalSessions, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Historical", + "HistoricalSessions", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 9u8, 138u8, 247u8, 141u8, 178u8, 146u8, 124u8, 81u8, 162u8, 211u8, + 205u8, 149u8, 222u8, 254u8, 253u8, 188u8, 170u8, 242u8, 218u8, 41u8, + 124u8, 178u8, 109u8, 209u8, 163u8, 125u8, 225u8, 206u8, 249u8, 175u8, + 117u8, 75u8, + ], + ) + } + #[doc = " The range of historical sessions we store. [first, last)"] + pub fn stored_range( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::stored_range::StoredRange, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Historical", + "StoredRange", + (), + [ + 134u8, 32u8, 250u8, 13u8, 201u8, 25u8, 54u8, 243u8, 231u8, 81u8, 252u8, + 231u8, 68u8, 217u8, 235u8, 43u8, 22u8, 223u8, 220u8, 133u8, 198u8, + 218u8, 95u8, 152u8, 189u8, 87u8, 6u8, 228u8, 242u8, 59u8, 232u8, 59u8, + ], + ) + } + } + } + } + pub mod treasury { + use super::root_mod; + use super::runtime_types; + #[doc = "Error for the treasury pallet."] + pub type Error = runtime_types::pallet_treasury::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_treasury::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] + #[doc = ""] + #[doc = "### Details"] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::SpendApproved`] if successful."] + pub struct SpendLocal { + #[codec(compact)] + pub amount: spend_local::Amount, + pub beneficiary: spend_local::Beneficiary, + } + pub mod spend_local { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SpendLocal { + const PALLET: &'static str = "Treasury"; + const CALL: &'static str = "spend_local"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The original deposit will no longer be returned."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "### Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = ""] + #[doc = "### Errors"] + #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] + #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] + #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] + #[doc = " in the first place."] + pub struct RemoveApproval { + #[codec(compact)] + pub proposal_id: remove_approval::ProposalId, + } + pub mod remove_approval { + use super::runtime_types; + pub type ProposalId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveApproval { + const PALLET: &'static str = "Treasury"; + const CALL: &'static str = "remove_approval"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] + #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] + #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] + #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] + #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The beneficiary of the spend."] + #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] + #[doc = " the past if the resulting spend has not yet expired according to the"] + #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] + #[doc = " approval."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] + pub struct Spend { + pub asset_kind: ::subxt_core::alloc::boxed::Box, + #[codec(compact)] + pub amount: spend::Amount, + pub beneficiary: ::subxt_core::alloc::boxed::Box, + pub valid_from: spend::ValidFrom, + } + pub mod spend { + use super::runtime_types; + pub type AssetKind = (); + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + pub type ValidFrom = ::core::option::Option<::core::primitive::u64>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Spend { + const PALLET: &'static str = "Treasury"; + const CALL: &'static str = "spend"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claim a spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed"] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] + #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] + #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] + #[doc = "dispatchable before retrying with the current function."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::Paid`] if successful."] + pub struct Payout { + pub index: payout::Index, + } + pub mod payout { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Payout { + const PALLET: &'static str = "Treasury"; + const CALL: &'static str = "payout"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Check the status of the spend and remove it from the storage if processed."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The status check is a prerequisite for retrying a failed payout."] + #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] + #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] + #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] + pub struct CheckStatus { + pub index: check_status::Index, + } + pub mod check_status { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CheckStatus { + const PALLET: &'static str = "Treasury"; + const CALL: &'static str = "check_status"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Void previously approved spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "A spend void is only possible if the payout has not been attempted yet."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] + pub struct VoidSpend { + pub index: void_spend::Index, + } + pub mod void_spend { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for VoidSpend { + const PALLET: &'static str = "Treasury"; + const CALL: &'static str = "void_spend"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] + #[doc = ""] + #[doc = "### Details"] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::SpendApproved`] if successful."] + pub fn spend_local( + &self, + amount: types::spend_local::Amount, + beneficiary: types::spend_local::Beneficiary, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Treasury", + "spend_local", + types::SpendLocal { amount, beneficiary }, + [ + 81u8, 1u8, 208u8, 59u8, 56u8, 65u8, 91u8, 139u8, 14u8, 209u8, 31u8, + 42u8, 52u8, 9u8, 2u8, 90u8, 114u8, 133u8, 68u8, 243u8, 169u8, 60u8, + 172u8, 4u8, 58u8, 167u8, 52u8, 93u8, 45u8, 38u8, 248u8, 15u8, + ], + ) + } + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The original deposit will no longer be returned."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "### Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = ""] + #[doc = "### Errors"] + #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] + #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] + #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] + #[doc = " in the first place."] + pub fn remove_approval( + &self, + proposal_id: types::remove_approval::ProposalId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Treasury", + "remove_approval", + types::RemoveApproval { proposal_id }, + [ + 180u8, 20u8, 39u8, 227u8, 29u8, 228u8, 234u8, 36u8, 155u8, 114u8, + 197u8, 135u8, 185u8, 31u8, 56u8, 247u8, 224u8, 168u8, 254u8, 233u8, + 250u8, 134u8, 186u8, 155u8, 108u8, 84u8, 94u8, 226u8, 207u8, 130u8, + 196u8, 100u8, + ], + ) + } + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] + #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] + #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] + #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] + #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The beneficiary of the spend."] + #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] + #[doc = " the past if the resulting spend has not yet expired according to the"] + #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] + #[doc = " approval."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] + pub fn spend( + &self, + asset_kind: types::spend::AssetKind, + amount: types::spend::Amount, + beneficiary: types::spend::Beneficiary, + valid_from: types::spend::ValidFrom, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Treasury", + "spend", + types::Spend { + asset_kind: ::subxt_core::alloc::boxed::Box::new(asset_kind), + amount, + beneficiary: ::subxt_core::alloc::boxed::Box::new(beneficiary), + valid_from, + }, + [ + 64u8, 180u8, 212u8, 19u8, 205u8, 214u8, 70u8, 215u8, 10u8, 233u8, + 148u8, 136u8, 36u8, 4u8, 199u8, 203u8, 66u8, 117u8, 182u8, 114u8, + 104u8, 228u8, 60u8, 157u8, 104u8, 214u8, 223u8, 81u8, 94u8, 7u8, 141u8, + 254u8, + ], + ) + } + #[doc = "Claim a spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed"] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] + #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] + #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] + #[doc = "dispatchable before retrying with the current function."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::Paid`] if successful."] + pub fn payout( + &self, + index: types::payout::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Treasury", + "payout", + types::Payout { index }, + [ + 179u8, 254u8, 82u8, 94u8, 248u8, 26u8, 6u8, 34u8, 93u8, 244u8, 186u8, + 199u8, 163u8, 32u8, 110u8, 220u8, 78u8, 11u8, 168u8, 182u8, 169u8, + 56u8, 53u8, 194u8, 168u8, 218u8, 131u8, 38u8, 46u8, 156u8, 93u8, 234u8, + ], + ) + } + #[doc = "Check the status of the spend and remove it from the storage if processed."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The status check is a prerequisite for retrying a failed payout."] + #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] + #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] + #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] + pub fn check_status( + &self, + index: types::check_status::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Treasury", + "check_status", + types::CheckStatus { index }, + [ + 164u8, 111u8, 10u8, 11u8, 104u8, 237u8, 112u8, 240u8, 104u8, 130u8, + 179u8, 221u8, 54u8, 18u8, 8u8, 172u8, 148u8, 245u8, 110u8, 174u8, 75u8, + 38u8, 46u8, 143u8, 101u8, 232u8, 65u8, 252u8, 36u8, 152u8, 29u8, 209u8, + ], + ) + } + #[doc = "Void previously approved spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "A spend void is only possible if the payout has not been attempted yet."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] + pub fn void_spend( + &self, + index: types::void_spend::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Treasury", + "void_spend", + types::VoidSpend { index }, + [ + 9u8, 212u8, 174u8, 92u8, 43u8, 102u8, 224u8, 124u8, 247u8, 239u8, + 196u8, 68u8, 132u8, 171u8, 116u8, 206u8, 52u8, 23u8, 92u8, 31u8, 156u8, + 160u8, 25u8, 16u8, 125u8, 60u8, 9u8, 109u8, 145u8, 139u8, 102u8, 224u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_treasury::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "We have ended a spend period and will now allocate funds."] + pub struct Spending { + pub budget_remaining: spending::BudgetRemaining, + } + pub mod spending { + use super::runtime_types; + pub type BudgetRemaining = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Spending { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Spending"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some funds have been allocated."] + pub struct Awarded { + pub proposal_index: awarded::ProposalIndex, + pub award: awarded::Award, + pub account: awarded::Account, + } + pub mod awarded { + use super::runtime_types; + pub type ProposalIndex = ::core::primitive::u32; + pub type Award = ::core::primitive::u128; + pub type Account = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Awarded { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Awarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some of our funds have been burnt."] + pub struct Burnt { + pub burnt_funds: burnt::BurntFunds, + } + pub mod burnt { + use super::runtime_types; + pub type BurntFunds = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Burnt { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Burnt"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Spending has finished; this is the amount that rolls over until next spend."] + pub struct Rollover { + pub rollover_balance: rollover::RolloverBalance, + } + pub mod rollover { + use super::runtime_types; + pub type RolloverBalance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Rollover { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Rollover"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Some funds have been deposited."] + pub struct Deposit { + pub value: deposit::Value, + } + pub mod deposit { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Deposit { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Deposit"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new spend proposal has been approved."] + pub struct SpendApproved { + pub proposal_index: spend_approved::ProposalIndex, + pub amount: spend_approved::Amount, + pub beneficiary: spend_approved::Beneficiary, + } + pub mod spend_approved { + use super::runtime_types; + pub type ProposalIndex = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for SpendApproved { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "SpendApproved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The inactive funds of the pallet have been updated."] + pub struct UpdatedInactive { + pub reactivated: updated_inactive::Reactivated, + pub deactivated: updated_inactive::Deactivated, + } + pub mod updated_inactive { + use super::runtime_types; + pub type Reactivated = ::core::primitive::u128; + pub type Deactivated = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for UpdatedInactive { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "UpdatedInactive"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new asset spend proposal has been approved."] + pub struct AssetSpendApproved { + pub index: asset_spend_approved::Index, + pub asset_kind: asset_spend_approved::AssetKind, + pub amount: asset_spend_approved::Amount, + pub beneficiary: asset_spend_approved::Beneficiary, + pub valid_from: asset_spend_approved::ValidFrom, + pub expire_at: asset_spend_approved::ExpireAt, + } + pub mod asset_spend_approved { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type AssetKind = (); + pub type Amount = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + pub type ValidFrom = ::core::primitive::u64; + pub type ExpireAt = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for AssetSpendApproved { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "AssetSpendApproved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An approved spend was voided."] + pub struct AssetSpendVoided { + pub index: asset_spend_voided::Index, + } + pub mod asset_spend_voided { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for AssetSpendVoided { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "AssetSpendVoided"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A payment happened."] + pub struct Paid { + pub index: paid::Index, + pub payment_id: paid::PaymentId, + } + pub mod paid { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type PaymentId = (); + } + impl ::subxt_core::events::StaticEvent for Paid { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "Paid"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A payment failed and can be retried."] + pub struct PaymentFailed { + pub index: payment_failed::Index, + pub payment_id: payment_failed::PaymentId, + } + pub mod payment_failed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type PaymentId = (); + } + impl ::subxt_core::events::StaticEvent for PaymentFailed { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "PaymentFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A spend was processed and removed from the storage. It might have been successfully"] + #[doc = "paid or it may have expired."] + pub struct SpendProcessed { + pub index: spend_processed::Index, + } + pub mod spend_processed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for SpendProcessed { + const PALLET: &'static str = "Treasury"; + const EVENT: &'static str = "SpendProcessed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod proposal_count { + use super::runtime_types; + pub type ProposalCount = ::core::primitive::u32; + } + pub mod proposals { + use super::runtime_types; + pub type Proposals = runtime_types::pallet_treasury::Proposal< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod deactivated { + use super::runtime_types; + pub type Deactivated = ::core::primitive::u128; + } + pub mod approvals { + use super::runtime_types; + pub type Approvals = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >; + } + pub mod spend_count { + use super::runtime_types; + pub type SpendCount = ::core::primitive::u32; + } + pub mod spends { + use super::runtime_types; + pub type Spends = runtime_types::pallet_treasury::SpendStatus< + (), + ::core::primitive::u128, + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + (), + >; + pub type Param0 = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of proposals that have been made."] + pub fn proposal_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::proposal_count::ProposalCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "ProposalCount", + (), + [ + 91u8, 238u8, 246u8, 106u8, 95u8, 66u8, 83u8, 134u8, 1u8, 225u8, 164u8, + 216u8, 113u8, 101u8, 203u8, 200u8, 113u8, 97u8, 246u8, 228u8, 140u8, + 29u8, 29u8, 48u8, 176u8, 137u8, 93u8, 230u8, 56u8, 75u8, 51u8, 149u8, + ], + ) + } + #[doc = " Proposals that have been made."] + pub fn proposals_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::proposals::Proposals, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "Proposals", + (), + [ + 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, + 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, + 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, + 55u8, + ], + ) + } + #[doc = " Proposals that have been made."] + pub fn proposals( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::proposals::Proposals, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "Proposals", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 207u8, 135u8, 145u8, 146u8, 48u8, 10u8, 252u8, 40u8, 20u8, 115u8, + 205u8, 41u8, 173u8, 83u8, 115u8, 46u8, 106u8, 40u8, 130u8, 157u8, + 213u8, 87u8, 45u8, 23u8, 14u8, 167u8, 99u8, 208u8, 153u8, 163u8, 141u8, + 55u8, + ], + ) + } + #[doc = " The amount which has been reported as inactive to Currency."] + pub fn deactivated( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::deactivated::Deactivated, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "Deactivated", + (), + [ + 120u8, 221u8, 159u8, 56u8, 161u8, 44u8, 54u8, 233u8, 47u8, 114u8, + 170u8, 150u8, 52u8, 24u8, 137u8, 212u8, 122u8, 247u8, 40u8, 17u8, + 208u8, 130u8, 42u8, 154u8, 33u8, 222u8, 59u8, 116u8, 0u8, 15u8, 79u8, + 123u8, + ], + ) + } + #[doc = " Proposal indices that have been approved but not yet awarded."] + pub fn approvals( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::approvals::Approvals, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "Approvals", + (), + [ + 78u8, 147u8, 186u8, 235u8, 17u8, 40u8, 247u8, 235u8, 67u8, 222u8, 3u8, + 14u8, 248u8, 17u8, 67u8, 180u8, 93u8, 161u8, 64u8, 35u8, 119u8, 194u8, + 187u8, 226u8, 135u8, 162u8, 147u8, 174u8, 139u8, 72u8, 99u8, 212u8, + ], + ) + } + #[doc = " The count of spends that have been made."] + pub fn spend_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::spend_count::SpendCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "SpendCount", + (), + [ + 220u8, 74u8, 248u8, 52u8, 243u8, 209u8, 42u8, 236u8, 27u8, 98u8, 76u8, + 153u8, 129u8, 176u8, 34u8, 177u8, 33u8, 132u8, 21u8, 71u8, 206u8, + 146u8, 222u8, 44u8, 232u8, 246u8, 205u8, 92u8, 240u8, 136u8, 182u8, + 30u8, + ], + ) + } + #[doc = " Spends that have been approved and being processed."] + pub fn spends_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::spends::Spends, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "Spends", + (), + [ + 156u8, 92u8, 96u8, 152u8, 53u8, 132u8, 115u8, 226u8, 178u8, 130u8, + 50u8, 11u8, 217u8, 191u8, 189u8, 65u8, 91u8, 94u8, 176u8, 90u8, 76u8, + 144u8, 125u8, 123u8, 92u8, 85u8, 55u8, 43u8, 207u8, 22u8, 161u8, 160u8, + ], + ) + } + #[doc = " Spends that have been approved and being processed."] + pub fn spends( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::spends::Spends, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Treasury", + "Spends", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 156u8, 92u8, 96u8, 152u8, 53u8, 132u8, 115u8, 226u8, 178u8, 130u8, + 50u8, 11u8, 217u8, 191u8, 189u8, 65u8, 91u8, 94u8, 176u8, 90u8, 76u8, + 144u8, 125u8, 123u8, 92u8, 85u8, 55u8, 43u8, 207u8, 22u8, 161u8, 160u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Period between successive spends."] + pub fn spend_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Treasury", + "SpendPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " Percentage of spare funds (if any) that are burnt per spend period."] + pub fn burn( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_arithmetic::per_things::Permill, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Treasury", + "Burn", + [ + 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, + 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, + 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, + ], + ) + } + #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."] + pub fn pallet_id( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Treasury", + "PalletId", + [ + 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, + 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, + 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, + ], + ) + } + #[doc = " The maximum number of approvals that can wait in the spending queue."] + #[doc = ""] + #[doc = " NOTE: This parameter is also used within the Bounties Pallet extension if enabled."] + pub fn max_approvals( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Treasury", + "MaxApprovals", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The period during which an approved treasury spend has to be claimed."] + pub fn payout_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Treasury", + "PayoutPeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_bounties::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_bounties::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Propose a new bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] + #[doc = "or slashed when rejected."] + #[doc = ""] + #[doc = "- `curator`: The curator account whom will manage this bounty."] + #[doc = "- `fee`: The curator fee."] + #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] + #[doc = "- `description`: The description of this bounty."] + pub struct ProposeBounty { + #[codec(compact)] + pub value: propose_bounty::Value, + pub description: propose_bounty::Description, + } + pub mod propose_bounty { + use super::runtime_types; + pub type Value = ::core::primitive::u128; + pub type Description = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for ProposeBounty { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "propose_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] + #[doc = "and the original deposit will be returned."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct ApproveBounty { + #[codec(compact)] + pub bounty_id: approve_bounty::BountyId, + } + pub mod approve_bounty { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ApproveBounty { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "approve_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Propose a curator to a funded bounty."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct ProposeCurator { + #[codec(compact)] + pub bounty_id: propose_curator::BountyId, + pub curator: propose_curator::Curator, + #[codec(compact)] + pub fee: propose_curator::Fee, + } + pub mod propose_curator { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + pub type Curator = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Fee = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ProposeCurator { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "propose_curator"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unassign curator from a bounty."] + #[doc = ""] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] + #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = ""] + #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] + #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] + #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] + #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] + #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct UnassignCurator { + #[codec(compact)] + pub bounty_id: unassign_curator::BountyId, + } + pub mod unassign_curator { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for UnassignCurator { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "unassign_curator"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = ""] + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct AcceptCurator { + #[codec(compact)] + pub bounty_id: accept_curator::BountyId, + } + pub mod accept_curator { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for AcceptCurator { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "accept_curator"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct AwardBounty { + #[codec(compact)] + pub bounty_id: award_bounty::BountyId, + pub beneficiary: award_bounty::Beneficiary, + } + pub mod award_bounty { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + pub type Beneficiary = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for AwardBounty { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "award_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct ClaimBounty { + #[codec(compact)] + pub bounty_id: claim_bounty::BountyId, + } + pub mod claim_bounty { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimBounty { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "claim_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[doc = ""] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct CloseBounty { + #[codec(compact)] + pub bounty_id: close_bounty::BountyId, + } + pub mod close_bounty { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CloseBounty { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "close_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct ExtendBountyExpiry { + #[codec(compact)] + pub bounty_id: extend_bounty_expiry::BountyId, + pub remark: extend_bounty_expiry::Remark, + } + pub mod extend_bounty_expiry { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + pub type Remark = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for ExtendBountyExpiry { + const PALLET: &'static str = "Bounties"; + const CALL: &'static str = "extend_bounty_expiry"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Propose a new bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] + #[doc = "or slashed when rejected."] + #[doc = ""] + #[doc = "- `curator`: The curator account whom will manage this bounty."] + #[doc = "- `fee`: The curator fee."] + #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] + #[doc = "- `description`: The description of this bounty."] + pub fn propose_bounty( + &self, + value: types::propose_bounty::Value, + description: types::propose_bounty::Description, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "propose_bounty", + types::ProposeBounty { value, description }, + [ + 131u8, 169u8, 55u8, 102u8, 212u8, 139u8, 9u8, 65u8, 75u8, 112u8, 6u8, + 180u8, 92u8, 124u8, 43u8, 42u8, 38u8, 40u8, 226u8, 24u8, 28u8, 34u8, + 169u8, 220u8, 184u8, 206u8, 109u8, 227u8, 53u8, 228u8, 88u8, 25u8, + ], + ) + } + #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] + #[doc = "and the original deposit will be returned."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn approve_bounty( + &self, + bounty_id: types::approve_bounty::BountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "approve_bounty", + types::ApproveBounty { bounty_id }, + [ + 85u8, 12u8, 177u8, 91u8, 183u8, 124u8, 175u8, 148u8, 188u8, 200u8, + 237u8, 144u8, 6u8, 67u8, 159u8, 48u8, 177u8, 222u8, 183u8, 137u8, + 173u8, 131u8, 128u8, 219u8, 255u8, 243u8, 80u8, 224u8, 126u8, 136u8, + 90u8, 47u8, + ], + ) + } + #[doc = "Propose a curator to a funded bounty."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn propose_curator( + &self, + bounty_id: types::propose_curator::BountyId, + curator: types::propose_curator::Curator, + fee: types::propose_curator::Fee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "propose_curator", + types::ProposeCurator { bounty_id, curator, fee }, + [ + 137u8, 37u8, 180u8, 149u8, 223u8, 16u8, 83u8, 160u8, 153u8, 149u8, + 137u8, 167u8, 231u8, 100u8, 142u8, 13u8, 43u8, 161u8, 108u8, 121u8, + 202u8, 196u8, 35u8, 176u8, 203u8, 87u8, 23u8, 226u8, 89u8, 222u8, 47u8, + 112u8, + ], + ) + } + #[doc = "Unassign curator from a bounty."] + #[doc = ""] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] + #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = ""] + #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] + #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] + #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] + #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] + #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn unassign_curator( + &self, + bounty_id: types::unassign_curator::BountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "unassign_curator", + types::UnassignCurator { bounty_id }, + [ + 98u8, 94u8, 107u8, 111u8, 151u8, 182u8, 71u8, 239u8, 214u8, 88u8, + 108u8, 11u8, 51u8, 163u8, 102u8, 162u8, 245u8, 247u8, 244u8, 159u8, + 197u8, 23u8, 171u8, 6u8, 60u8, 146u8, 144u8, 101u8, 68u8, 133u8, 245u8, + 74u8, + ], + ) + } + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = ""] + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn accept_curator( + &self, + bounty_id: types::accept_curator::BountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "accept_curator", + types::AcceptCurator { bounty_id }, + [ + 178u8, 142u8, 138u8, 15u8, 243u8, 10u8, 222u8, 169u8, 150u8, 200u8, + 85u8, 185u8, 39u8, 167u8, 134u8, 3u8, 186u8, 84u8, 43u8, 140u8, 11u8, + 70u8, 56u8, 197u8, 39u8, 84u8, 138u8, 139u8, 198u8, 104u8, 41u8, 238u8, + ], + ) + } + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn award_bounty( + &self, + bounty_id: types::award_bounty::BountyId, + beneficiary: types::award_bounty::Beneficiary, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "award_bounty", + types::AwardBounty { bounty_id, beneficiary }, + [ + 130u8, 148u8, 63u8, 19u8, 102u8, 114u8, 81u8, 70u8, 249u8, 32u8, 175u8, + 81u8, 140u8, 195u8, 98u8, 221u8, 153u8, 148u8, 196u8, 104u8, 15u8, + 91u8, 153u8, 51u8, 2u8, 179u8, 35u8, 136u8, 12u8, 219u8, 27u8, 100u8, + ], + ) + } + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn claim_bounty( + &self, + bounty_id: types::claim_bounty::BountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "claim_bounty", + types::ClaimBounty { bounty_id }, + [ + 211u8, 143u8, 123u8, 205u8, 140u8, 43u8, 176u8, 103u8, 110u8, 125u8, + 158u8, 131u8, 103u8, 62u8, 69u8, 215u8, 220u8, 110u8, 11u8, 3u8, 30u8, + 193u8, 235u8, 177u8, 96u8, 241u8, 140u8, 53u8, 62u8, 133u8, 170u8, + 25u8, + ], + ) + } + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[doc = ""] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn close_bounty( + &self, + bounty_id: types::close_bounty::BountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "close_bounty", + types::CloseBounty { bounty_id }, + [ + 144u8, 234u8, 109u8, 39u8, 227u8, 231u8, 104u8, 48u8, 45u8, 196u8, + 217u8, 220u8, 241u8, 197u8, 157u8, 227u8, 154u8, 156u8, 181u8, 69u8, + 146u8, 77u8, 203u8, 167u8, 79u8, 102u8, 15u8, 253u8, 135u8, 53u8, 96u8, + 60u8, + ], + ) + } + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn extend_bounty_expiry( + &self, + bounty_id: types::extend_bounty_expiry::BountyId, + remark: types::extend_bounty_expiry::Remark, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Bounties", + "extend_bounty_expiry", + types::ExtendBountyExpiry { bounty_id, remark }, + [ + 102u8, 118u8, 89u8, 189u8, 138u8, 157u8, 216u8, 10u8, 239u8, 3u8, + 200u8, 217u8, 219u8, 19u8, 195u8, 182u8, 105u8, 220u8, 11u8, 146u8, + 222u8, 79u8, 95u8, 136u8, 188u8, 230u8, 248u8, 119u8, 30u8, 6u8, 242u8, + 194u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_bounties::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "New bounty proposal."] + pub struct BountyProposed { + pub index: bounty_proposed::Index, + } + pub mod bounty_proposed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for BountyProposed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyProposed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty proposal was rejected; funds were slashed."] + pub struct BountyRejected { + pub index: bounty_rejected::Index, + pub bond: bounty_rejected::Bond, + } + pub mod bounty_rejected { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Bond = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for BountyRejected { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyRejected"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty proposal is funded and became active."] + pub struct BountyBecameActive { + pub index: bounty_became_active::Index, + } + pub mod bounty_became_active { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for BountyBecameActive { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyBecameActive"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty is awarded to a beneficiary."] + pub struct BountyAwarded { + pub index: bounty_awarded::Index, + pub beneficiary: bounty_awarded::Beneficiary, + } + pub mod bounty_awarded { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for BountyAwarded { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyAwarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty is claimed by beneficiary."] + pub struct BountyClaimed { + pub index: bounty_claimed::Index, + pub payout: bounty_claimed::Payout, + pub beneficiary: bounty_claimed::Beneficiary, + } + pub mod bounty_claimed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Payout = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for BountyClaimed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyClaimed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty is cancelled."] + pub struct BountyCanceled { + pub index: bounty_canceled::Index, + } + pub mod bounty_canceled { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for BountyCanceled { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyCanceled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty expiry is extended."] + pub struct BountyExtended { + pub index: bounty_extended::Index, + } + pub mod bounty_extended { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for BountyExtended { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyExtended"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty is approved."] + pub struct BountyApproved { + pub index: bounty_approved::Index, + } + pub mod bounty_approved { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for BountyApproved { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "BountyApproved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty curator is proposed."] + pub struct CuratorProposed { + pub bounty_id: curator_proposed::BountyId, + pub curator: curator_proposed::Curator, + } + pub mod curator_proposed { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + pub type Curator = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for CuratorProposed { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "CuratorProposed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty curator is unassigned."] + pub struct CuratorUnassigned { + pub bounty_id: curator_unassigned::BountyId, + } + pub mod curator_unassigned { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for CuratorUnassigned { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "CuratorUnassigned"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bounty curator is accepted."] + pub struct CuratorAccepted { + pub bounty_id: curator_accepted::BountyId, + pub curator: curator_accepted::Curator, + } + pub mod curator_accepted { + use super::runtime_types; + pub type BountyId = ::core::primitive::u32; + pub type Curator = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for CuratorAccepted { + const PALLET: &'static str = "Bounties"; + const EVENT: &'static str = "CuratorAccepted"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod bounty_count { + use super::runtime_types; + pub type BountyCount = ::core::primitive::u32; + } + pub mod bounties { + use super::runtime_types; + pub type Bounties = runtime_types::pallet_bounties::Bounty< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u64, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod bounty_descriptions { + use super::runtime_types; + pub type BountyDescriptions = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod bounty_approvals { + use super::runtime_types; + pub type BountyApprovals = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of bounty proposals that have been made."] + pub fn bounty_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bounty_count::BountyCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Bounties", + "BountyCount", + (), + [ + 120u8, 204u8, 26u8, 150u8, 37u8, 81u8, 43u8, 223u8, 180u8, 252u8, + 142u8, 144u8, 109u8, 5u8, 184u8, 72u8, 223u8, 230u8, 66u8, 196u8, 14u8, + 14u8, 164u8, 190u8, 246u8, 168u8, 190u8, 56u8, 212u8, 73u8, 175u8, + 26u8, + ], + ) + } + #[doc = " Bounties that have been made."] + pub fn bounties_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bounties::Bounties, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Bounties", + "Bounties", + (), + [ + 61u8, 113u8, 145u8, 206u8, 130u8, 71u8, 78u8, 125u8, 214u8, 253u8, + 128u8, 143u8, 36u8, 0u8, 201u8, 132u8, 215u8, 58u8, 129u8, 34u8, 46u8, + 164u8, 68u8, 103u8, 25u8, 241u8, 43u8, 147u8, 6u8, 199u8, 145u8, 222u8, + ], + ) + } + #[doc = " Bounties that have been made."] + pub fn bounties( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::bounties::Bounties, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Bounties", + "Bounties", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 61u8, 113u8, 145u8, 206u8, 130u8, 71u8, 78u8, 125u8, 214u8, 253u8, + 128u8, 143u8, 36u8, 0u8, 201u8, 132u8, 215u8, 58u8, 129u8, 34u8, 46u8, + 164u8, 68u8, 103u8, 25u8, 241u8, 43u8, 147u8, 6u8, 199u8, 145u8, 222u8, + ], + ) + } + #[doc = " The description of each bounty."] + pub fn bounty_descriptions_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bounty_descriptions::BountyDescriptions, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Bounties", + "BountyDescriptions", + (), + [ + 71u8, 40u8, 133u8, 84u8, 55u8, 207u8, 169u8, 189u8, 160u8, 51u8, 202u8, + 144u8, 15u8, 226u8, 97u8, 114u8, 54u8, 247u8, 53u8, 26u8, 36u8, 54u8, + 186u8, 163u8, 198u8, 100u8, 191u8, 121u8, 186u8, 160u8, 85u8, 97u8, + ], + ) + } + #[doc = " The description of each bounty."] + pub fn bounty_descriptions( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::bounty_descriptions::Param0, + >, + types::bounty_descriptions::BountyDescriptions, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Bounties", + "BountyDescriptions", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 71u8, 40u8, 133u8, 84u8, 55u8, 207u8, 169u8, 189u8, 160u8, 51u8, 202u8, + 144u8, 15u8, 226u8, 97u8, 114u8, 54u8, 247u8, 53u8, 26u8, 36u8, 54u8, + 186u8, 163u8, 198u8, 100u8, 191u8, 121u8, 186u8, 160u8, 85u8, 97u8, + ], + ) + } + #[doc = " Bounty indices that have been approved but not yet funded."] + pub fn bounty_approvals( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bounty_approvals::BountyApprovals, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Bounties", + "BountyApprovals", + (), + [ + 182u8, 228u8, 0u8, 46u8, 176u8, 25u8, 222u8, 180u8, 51u8, 57u8, 14u8, + 0u8, 69u8, 160u8, 64u8, 27u8, 88u8, 29u8, 227u8, 146u8, 2u8, 121u8, + 27u8, 85u8, 45u8, 110u8, 244u8, 62u8, 134u8, 77u8, 175u8, 188u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The amount held on deposit for placing a bounty proposal."] + pub fn bounty_deposit_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "BountyDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The delay period for which a bounty beneficiary need to wait before claim the payout."] + pub fn bounty_deposit_payout_delay( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "BountyDepositPayoutDelay", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " Bounty duration in blocks."] + pub fn bounty_update_period( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "BountyUpdatePeriod", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The curator deposit is calculated as a percentage of the curator fee."] + #[doc = ""] + #[doc = " This deposit has optional upper and lower bounds with `CuratorDepositMax` and"] + #[doc = " `CuratorDepositMin`."] + pub fn curator_deposit_multiplier( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_arithmetic::per_things::Permill, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "CuratorDepositMultiplier", + [ + 65u8, 93u8, 120u8, 165u8, 204u8, 81u8, 159u8, 163u8, 93u8, 135u8, + 114u8, 121u8, 147u8, 35u8, 215u8, 213u8, 4u8, 223u8, 83u8, 37u8, 225u8, + 200u8, 189u8, 156u8, 140u8, 36u8, 58u8, 46u8, 42u8, 232u8, 155u8, 0u8, + ], + ) + } + #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_max( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + ::core::option::Option<::core::primitive::u128>, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "CuratorDepositMax", + [ + 198u8, 51u8, 89u8, 159u8, 124u8, 251u8, 51u8, 80u8, 167u8, 193u8, 44u8, + 199u8, 80u8, 36u8, 41u8, 130u8, 137u8, 229u8, 178u8, 208u8, 37u8, + 215u8, 169u8, 183u8, 180u8, 191u8, 140u8, 240u8, 250u8, 61u8, 42u8, + 147u8, + ], + ) + } + #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."] + pub fn curator_deposit_min( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + ::core::option::Option<::core::primitive::u128>, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "CuratorDepositMin", + [ + 198u8, 51u8, 89u8, 159u8, 124u8, 251u8, 51u8, 80u8, 167u8, 193u8, 44u8, + 199u8, 80u8, 36u8, 41u8, 130u8, 137u8, 229u8, 178u8, 208u8, 37u8, + 215u8, 169u8, 183u8, 180u8, 191u8, 140u8, 240u8, 250u8, 61u8, 42u8, + 147u8, + ], + ) + } + #[doc = " Minimum value for a bounty."] + pub fn bounty_value_minimum( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "BountyValueMinimum", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount held on deposit per byte within the tip report reason or bounty description."] + pub fn data_deposit_per_byte( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "DataDepositPerByte", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " Maximum acceptable reason length."] + #[doc = ""] + #[doc = " Benchmarks depend on this value, be sure to update weights file when changing this value"] + pub fn maximum_reason_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Bounties", + "MaximumReasonLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod child_bounties { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_child_bounties::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_child_bounties::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + pub struct AddChildBounty { + #[codec(compact)] + pub parent_bounty_id: add_child_bounty::ParentBountyId, + #[codec(compact)] + pub value: add_child_bounty::Value, + pub description: add_child_bounty::Description, + } + pub mod add_child_bounty { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type Value = ::core::primitive::u128; + pub type Description = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for AddChildBounty { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "add_child_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + pub struct ProposeCurator { + #[codec(compact)] + pub parent_bounty_id: propose_curator::ParentBountyId, + #[codec(compact)] + pub child_bounty_id: propose_curator::ChildBountyId, + pub curator: propose_curator::Curator, + #[codec(compact)] + pub fee: propose_curator::Fee, + } + pub mod propose_curator { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type ChildBountyId = ::core::primitive::u32; + pub type Curator = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Fee = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ProposeCurator { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "propose_curator"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Accept the curator role for the child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub struct AcceptCurator { + #[codec(compact)] + pub parent_bounty_id: accept_curator::ParentBountyId, + #[codec(compact)] + pub child_bounty_id: accept_curator::ChildBountyId, + } + pub mod accept_curator { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type ChildBountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for AcceptCurator { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "accept_curator"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unassign curator from a child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub struct UnassignCurator { + #[codec(compact)] + pub parent_bounty_id: unassign_curator::ParentBountyId, + #[codec(compact)] + pub child_bounty_id: unassign_curator::ChildBountyId, + } + pub mod unassign_curator { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type ChildBountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for UnassignCurator { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "unassign_curator"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Award child-bounty to a beneficiary."] + #[doc = ""] + #[doc = "The beneficiary will be able to claim the funds after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + pub struct AwardChildBounty { + #[codec(compact)] + pub parent_bounty_id: award_child_bounty::ParentBountyId, + #[codec(compact)] + pub child_bounty_id: award_child_bounty::ChildBountyId, + pub beneficiary: award_child_bounty::Beneficiary, + } + pub mod award_child_bounty { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type ChildBountyId = ::core::primitive::u32; + pub type Beneficiary = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for AwardChildBounty { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "award_child_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub struct ClaimChildBounty { + #[codec(compact)] + pub parent_bounty_id: claim_child_bounty::ParentBountyId, + #[codec(compact)] + pub child_bounty_id: claim_child_bounty::ChildBountyId, + } + pub mod claim_child_bounty { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type ChildBountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimChildBounty { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "claim_child_bounty"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub struct CloseChildBounty { + #[codec(compact)] + pub parent_bounty_id: close_child_bounty::ParentBountyId, + #[codec(compact)] + pub child_bounty_id: close_child_bounty::ChildBountyId, + } + pub mod close_child_bounty { + use super::runtime_types; + pub type ParentBountyId = ::core::primitive::u32; + pub type ChildBountyId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CloseChildBounty { + const PALLET: &'static str = "ChildBounties"; + const CALL: &'static str = "close_child_bounty"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + pub fn add_child_bounty( + &self, + parent_bounty_id: types::add_child_bounty::ParentBountyId, + value: types::add_child_bounty::Value, + description: types::add_child_bounty::Description, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "add_child_bounty", + types::AddChildBounty { parent_bounty_id, value, description }, + [ + 249u8, 159u8, 185u8, 144u8, 114u8, 142u8, 104u8, 215u8, 136u8, 52u8, + 255u8, 125u8, 54u8, 243u8, 220u8, 171u8, 254u8, 49u8, 105u8, 134u8, + 137u8, 221u8, 100u8, 111u8, 72u8, 38u8, 184u8, 122u8, 72u8, 204u8, + 182u8, 123u8, + ], + ) + } + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + pub fn propose_curator( + &self, + parent_bounty_id: types::propose_curator::ParentBountyId, + child_bounty_id: types::propose_curator::ChildBountyId, + curator: types::propose_curator::Curator, + fee: types::propose_curator::Fee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "propose_curator", + types::ProposeCurator { parent_bounty_id, child_bounty_id, curator, fee }, + [ + 15u8, 139u8, 57u8, 81u8, 211u8, 60u8, 35u8, 225u8, 143u8, 75u8, 187u8, + 90u8, 21u8, 158u8, 80u8, 116u8, 87u8, 207u8, 92u8, 76u8, 79u8, 180u8, + 157u8, 200u8, 60u8, 19u8, 147u8, 127u8, 92u8, 158u8, 178u8, 16u8, + ], + ) + } + #[doc = "Accept the curator role for the child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn accept_curator( + &self, + parent_bounty_id: types::accept_curator::ParentBountyId, + child_bounty_id: types::accept_curator::ChildBountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "accept_curator", + types::AcceptCurator { parent_bounty_id, child_bounty_id }, + [ + 80u8, 117u8, 237u8, 83u8, 230u8, 230u8, 159u8, 136u8, 87u8, 17u8, + 239u8, 110u8, 190u8, 12u8, 52u8, 63u8, 171u8, 118u8, 82u8, 168u8, + 190u8, 255u8, 91u8, 85u8, 117u8, 226u8, 51u8, 28u8, 116u8, 230u8, + 137u8, 123u8, + ], + ) + } + #[doc = "Unassign curator from a child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn unassign_curator( + &self, + parent_bounty_id: types::unassign_curator::ParentBountyId, + child_bounty_id: types::unassign_curator::ChildBountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "unassign_curator", + types::UnassignCurator { parent_bounty_id, child_bounty_id }, + [ + 120u8, 208u8, 75u8, 141u8, 220u8, 153u8, 79u8, 28u8, 255u8, 227u8, + 239u8, 10u8, 243u8, 116u8, 0u8, 226u8, 205u8, 208u8, 91u8, 193u8, + 154u8, 81u8, 169u8, 240u8, 120u8, 48u8, 102u8, 35u8, 25u8, 136u8, 92u8, + 141u8, + ], + ) + } + #[doc = "Award child-bounty to a beneficiary."] + #[doc = ""] + #[doc = "The beneficiary will be able to claim the funds after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + pub fn award_child_bounty( + &self, + parent_bounty_id: types::award_child_bounty::ParentBountyId, + child_bounty_id: types::award_child_bounty::ChildBountyId, + beneficiary: types::award_child_bounty::Beneficiary, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "award_child_bounty", + types::AwardChildBounty { parent_bounty_id, child_bounty_id, beneficiary }, + [ + 239u8, 218u8, 175u8, 237u8, 227u8, 66u8, 182u8, 162u8, 38u8, 30u8, + 108u8, 58u8, 24u8, 255u8, 202u8, 56u8, 234u8, 200u8, 138u8, 21u8, 99u8, + 246u8, 199u8, 136u8, 223u8, 83u8, 43u8, 83u8, 130u8, 41u8, 232u8, + 165u8, + ], + ) + } + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn claim_child_bounty( + &self, + parent_bounty_id: types::claim_child_bounty::ParentBountyId, + child_bounty_id: types::claim_child_bounty::ChildBountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "claim_child_bounty", + types::ClaimChildBounty { parent_bounty_id, child_bounty_id }, + [ + 114u8, 134u8, 242u8, 240u8, 103u8, 141u8, 181u8, 214u8, 193u8, 222u8, + 23u8, 19u8, 68u8, 174u8, 190u8, 60u8, 94u8, 235u8, 14u8, 115u8, 155u8, + 199u8, 0u8, 106u8, 37u8, 144u8, 92u8, 188u8, 2u8, 149u8, 235u8, 244u8, + ], + ) + } + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + pub fn close_child_bounty( + &self, + parent_bounty_id: types::close_child_bounty::ParentBountyId, + child_bounty_id: types::close_child_bounty::ChildBountyId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ChildBounties", + "close_child_bounty", + types::CloseChildBounty { parent_bounty_id, child_bounty_id }, + [ + 121u8, 20u8, 81u8, 13u8, 102u8, 102u8, 162u8, 24u8, 133u8, 35u8, 203u8, + 58u8, 28u8, 195u8, 114u8, 31u8, 254u8, 252u8, 118u8, 57u8, 30u8, 211u8, + 217u8, 124u8, 148u8, 244u8, 144u8, 224u8, 39u8, 155u8, 162u8, 91u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_child_bounties::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A child-bounty is added."] + pub struct Added { + pub index: added::Index, + pub child_index: added::ChildIndex, + } + pub mod added { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type ChildIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Added { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Added"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A child-bounty is awarded to a beneficiary."] + pub struct Awarded { + pub index: awarded::Index, + pub child_index: awarded::ChildIndex, + pub beneficiary: awarded::Beneficiary, + } + pub mod awarded { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type ChildIndex = ::core::primitive::u32; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Awarded { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Awarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A child-bounty is claimed by beneficiary."] + pub struct Claimed { + pub index: claimed::Index, + pub child_index: claimed::ChildIndex, + pub payout: claimed::Payout, + pub beneficiary: claimed::Beneficiary, + } + pub mod claimed { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type ChildIndex = ::core::primitive::u32; + pub type Payout = ::core::primitive::u128; + pub type Beneficiary = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Claimed { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Claimed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A child-bounty is cancelled."] + pub struct Canceled { + pub index: canceled::Index, + pub child_index: canceled::ChildIndex, + } + pub mod canceled { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type ChildIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Canceled { + const PALLET: &'static str = "ChildBounties"; + const EVENT: &'static str = "Canceled"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod child_bounty_count { + use super::runtime_types; + pub type ChildBountyCount = ::core::primitive::u32; + } + pub mod parent_child_bounties { + use super::runtime_types; + pub type ParentChildBounties = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u32; + } + pub mod child_bounties { + use super::runtime_types; + pub type ChildBounties = runtime_types::pallet_child_bounties::ChildBounty< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u64, + >; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::core::primitive::u32; + } + pub mod child_bounty_descriptions { + use super::runtime_types; + pub type ChildBountyDescriptions = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod children_curator_fees { + use super::runtime_types; + pub type ChildrenCuratorFees = ::core::primitive::u128; + pub type Param0 = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Number of total child bounties."] + pub fn child_bounty_count( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::child_bounty_count::ChildBountyCount, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildBountyCount", + (), + [ + 206u8, 1u8, 40u8, 132u8, 51u8, 139u8, 234u8, 20u8, 89u8, 86u8, 247u8, + 107u8, 169u8, 252u8, 5u8, 180u8, 218u8, 24u8, 232u8, 94u8, 82u8, 135u8, + 24u8, 16u8, 134u8, 23u8, 201u8, 86u8, 12u8, 19u8, 199u8, 0u8, + ], + ) + } + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::parent_child_bounties::ParentChildBounties, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ParentChildBounties", + (), + [ + 52u8, 179u8, 242u8, 212u8, 91u8, 185u8, 176u8, 52u8, 100u8, 200u8, 1u8, + 41u8, 184u8, 234u8, 234u8, 8u8, 123u8, 252u8, 131u8, 55u8, 109u8, + 123u8, 89u8, 75u8, 101u8, 165u8, 117u8, 175u8, 92u8, 71u8, 62u8, 67u8, + ], + ) + } + #[doc = " Number of child bounties per parent bounty."] + #[doc = " Map of parent bounty index to number of child bounties."] + pub fn parent_child_bounties( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::parent_child_bounties::Param0, + >, + types::parent_child_bounties::ParentChildBounties, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ParentChildBounties", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 52u8, 179u8, 242u8, 212u8, 91u8, 185u8, 176u8, 52u8, 100u8, 200u8, 1u8, + 41u8, 184u8, 234u8, 234u8, 8u8, 123u8, 252u8, 131u8, 55u8, 109u8, + 123u8, 89u8, 75u8, 101u8, 165u8, 117u8, 175u8, 92u8, 71u8, 62u8, 67u8, + ], + ) + } + #[doc = " Child bounties that have been added."] + pub fn child_bounties_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::child_bounties::ChildBounties, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildBounties", + (), + [ + 147u8, 73u8, 192u8, 132u8, 112u8, 28u8, 88u8, 203u8, 183u8, 170u8, + 198u8, 134u8, 5u8, 80u8, 131u8, 179u8, 28u8, 249u8, 195u8, 139u8, + 224u8, 86u8, 41u8, 12u8, 202u8, 224u8, 104u8, 151u8, 216u8, 169u8, + 164u8, 85u8, + ], + ) + } + #[doc = " Child bounties that have been added."] + pub fn child_bounties_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::child_bounties::ChildBounties, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildBounties", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 147u8, 73u8, 192u8, 132u8, 112u8, 28u8, 88u8, 203u8, 183u8, 170u8, + 198u8, 134u8, 5u8, 80u8, 131u8, 179u8, 28u8, 249u8, 195u8, 139u8, + 224u8, 86u8, 41u8, 12u8, 202u8, 224u8, 104u8, 151u8, 216u8, 169u8, + 164u8, 85u8, + ], + ) + } + #[doc = " Child bounties that have been added."] + pub fn child_bounties( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::child_bounties::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::child_bounties::Param1, + >, + ), + types::child_bounties::ChildBounties, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildBounties", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 147u8, 73u8, 192u8, 132u8, 112u8, 28u8, 88u8, 203u8, 183u8, 170u8, + 198u8, 134u8, 5u8, 80u8, 131u8, 179u8, 28u8, 249u8, 195u8, 139u8, + 224u8, 86u8, 41u8, 12u8, 202u8, 224u8, 104u8, 151u8, 216u8, 169u8, + 164u8, 85u8, + ], + ) + } + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::child_bounty_descriptions::ChildBountyDescriptions, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildBountyDescriptions", + (), + [ + 192u8, 0u8, 220u8, 156u8, 109u8, 65u8, 113u8, 102u8, 119u8, 0u8, 109u8, + 141u8, 211u8, 128u8, 237u8, 61u8, 28u8, 56u8, 206u8, 93u8, 183u8, 74u8, + 192u8, 220u8, 76u8, 175u8, 85u8, 105u8, 179u8, 11u8, 164u8, 100u8, + ], + ) + } + #[doc = " The description of each child-bounty."] + pub fn child_bounty_descriptions( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::child_bounty_descriptions::Param0, + >, + types::child_bounty_descriptions::ChildBountyDescriptions, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildBountyDescriptions", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 192u8, 0u8, 220u8, 156u8, 109u8, 65u8, 113u8, 102u8, 119u8, 0u8, 109u8, + 141u8, 211u8, 128u8, 237u8, 61u8, 28u8, 56u8, 206u8, 93u8, 183u8, 74u8, + 192u8, 220u8, 76u8, 175u8, 85u8, 105u8, 179u8, 11u8, 164u8, 100u8, + ], + ) + } + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::children_curator_fees::ChildrenCuratorFees, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildrenCuratorFees", + (), + [ + 32u8, 16u8, 190u8, 193u8, 6u8, 80u8, 163u8, 16u8, 85u8, 111u8, 39u8, + 141u8, 209u8, 70u8, 213u8, 167u8, 22u8, 12u8, 93u8, 17u8, 104u8, 94u8, + 129u8, 37u8, 179u8, 41u8, 156u8, 117u8, 39u8, 202u8, 227u8, 235u8, + ], + ) + } + #[doc = " The cumulative child-bounty curator fee for each parent bounty."] + pub fn children_curator_fees( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::children_curator_fees::Param0, + >, + types::children_curator_fees::ChildrenCuratorFees, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ChildBounties", + "ChildrenCuratorFees", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 32u8, 16u8, 190u8, 193u8, 6u8, 80u8, 163u8, 16u8, 85u8, 111u8, 39u8, + 141u8, 209u8, 70u8, 213u8, 167u8, 22u8, 12u8, 93u8, 17u8, 104u8, 94u8, + 129u8, 37u8, 179u8, 41u8, 156u8, 117u8, 39u8, 202u8, 227u8, 235u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum number of child bounties that can be added to a parent bounty."] + pub fn max_active_child_bounty_count( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ChildBounties", + "MaxActiveChildBountyCount", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Minimum value for a child-bounty."] + pub fn child_bounty_value_minimum( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ChildBounties", + "ChildBountyValueMinimum", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + } + } + } + pub mod bags_list { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_bags_list::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_bags_list::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + pub struct Rebag { + pub dislocated: rebag::Dislocated, + } + pub mod rebag { + use super::runtime_types; + pub type Dislocated = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Rebag { + const PALLET: &'static str = "BagsList"; + const CALL: &'static str = "rebag"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`. Fee is payed by the origin under all"] + #[doc = "circumstances."] + #[doc = ""] + #[doc = "Only works if:"] + #[doc = ""] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + pub struct PutInFrontOf { + pub lighter: put_in_front_of::Lighter, + } + pub mod put_in_front_of { + use super::runtime_types; + pub type Lighter = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for PutInFrontOf { + const PALLET: &'static str = "BagsList"; + const CALL: &'static str = "put_in_front_of"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Same as [`Pallet::put_in_front_of`], but it can be called by anyone."] + #[doc = ""] + #[doc = "Fee is paid by the origin under all circumstances."] + pub struct PutInFrontOfOther { + pub heavier: put_in_front_of_other::Heavier, + pub lighter: put_in_front_of_other::Lighter, + } + pub mod put_in_front_of_other { + use super::runtime_types; + pub type Heavier = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Lighter = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for PutInFrontOfOther { + const PALLET: &'static str = "BagsList"; + const CALL: &'static str = "put_in_front_of_other"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + pub fn rebag( + &self, + dislocated: types::rebag::Dislocated, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "BagsList", + "rebag", + types::Rebag { dislocated }, + [ + 17u8, 68u8, 184u8, 176u8, 15u8, 190u8, 220u8, 192u8, 28u8, 87u8, 207u8, + 145u8, 178u8, 46u8, 112u8, 18u8, 176u8, 140u8, 102u8, 65u8, 6u8, 77u8, + 64u8, 224u8, 250u8, 114u8, 169u8, 142u8, 231u8, 253u8, 247u8, 230u8, + ], + ) + } + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`. Fee is payed by the origin under all"] + #[doc = "circumstances."] + #[doc = ""] + #[doc = "Only works if:"] + #[doc = ""] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + pub fn put_in_front_of( + &self, + lighter: types::put_in_front_of::Lighter, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "BagsList", + "put_in_front_of", + types::PutInFrontOf { lighter }, + [ + 237u8, 62u8, 128u8, 96u8, 151u8, 215u8, 182u8, 124u8, 233u8, 141u8, + 76u8, 29u8, 214u8, 88u8, 182u8, 251u8, 221u8, 81u8, 65u8, 223u8, 49u8, + 164u8, 132u8, 60u8, 208u8, 191u8, 195u8, 128u8, 31u8, 7u8, 78u8, 115u8, + ], + ) + } + #[doc = "Same as [`Pallet::put_in_front_of`], but it can be called by anyone."] + #[doc = ""] + #[doc = "Fee is paid by the origin under all circumstances."] + pub fn put_in_front_of_other( + &self, + heavier: types::put_in_front_of_other::Heavier, + lighter: types::put_in_front_of_other::Lighter, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "BagsList", + "put_in_front_of_other", + types::PutInFrontOfOther { heavier, lighter }, + [ + 124u8, 92u8, 107u8, 108u8, 210u8, 92u8, 109u8, 96u8, 100u8, 47u8, + 218u8, 221u8, 1u8, 37u8, 242u8, 32u8, 180u8, 53u8, 21u8, 121u8, 174u8, + 219u8, 155u8, 172u8, 201u8, 76u8, 214u8, 51u8, 244u8, 21u8, 115u8, + 165u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_bags_list::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Moved an account from one bag to another."] + pub struct Rebagged { + pub who: rebagged::Who, + pub from: rebagged::From, + pub to: rebagged::To, + } + pub mod rebagged { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type From = ::core::primitive::u64; + pub type To = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for Rebagged { + const PALLET: &'static str = "BagsList"; + const EVENT: &'static str = "Rebagged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Updated the score of some account to the given amount."] + pub struct ScoreUpdated { + pub who: score_updated::Who, + pub new_score: score_updated::NewScore, + } + pub mod score_updated { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type NewScore = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for ScoreUpdated { + const PALLET: &'static str = "BagsList"; + const EVENT: &'static str = "ScoreUpdated"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod list_nodes { + use super::runtime_types; + pub type ListNodes = runtime_types::pallet_bags_list::list::Node; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_list_nodes { + use super::runtime_types; + pub type CounterForListNodes = ::core::primitive::u32; + } + pub mod list_bags { + use super::runtime_types; + pub type ListBags = runtime_types::pallet_bags_list::list::Bag; + pub type Param0 = ::core::primitive::u64; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::list_nodes::ListNodes, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BagsList", + "ListNodes", + (), + [ + 240u8, 139u8, 78u8, 185u8, 159u8, 185u8, 33u8, 229u8, 171u8, 222u8, + 54u8, 81u8, 104u8, 170u8, 49u8, 232u8, 29u8, 117u8, 193u8, 68u8, 225u8, + 180u8, 46u8, 199u8, 100u8, 26u8, 99u8, 216u8, 74u8, 248u8, 73u8, 144u8, + ], + ) + } + #[doc = " A single node, within some bag."] + #[doc = ""] + #[doc = " Nodes store links forward and back within their respective bags."] + pub fn list_nodes( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::list_nodes::ListNodes, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BagsList", + "ListNodes", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 240u8, 139u8, 78u8, 185u8, 159u8, 185u8, 33u8, 229u8, 171u8, 222u8, + 54u8, 81u8, 104u8, 170u8, 49u8, 232u8, 29u8, 117u8, 193u8, 68u8, 225u8, + 180u8, 46u8, 199u8, 100u8, 26u8, 99u8, 216u8, 74u8, 248u8, 73u8, 144u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_list_nodes( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_list_nodes::CounterForListNodes, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BagsList", + "CounterForListNodes", + (), + [ + 126u8, 150u8, 201u8, 81u8, 155u8, 79u8, 50u8, 48u8, 120u8, 170u8, 3u8, + 104u8, 112u8, 254u8, 106u8, 46u8, 108u8, 126u8, 158u8, 245u8, 95u8, + 88u8, 236u8, 89u8, 79u8, 172u8, 13u8, 146u8, 202u8, 151u8, 122u8, + 132u8, + ], + ) + } + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::list_bags::ListBags, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BagsList", + "ListBags", + (), + [ + 98u8, 52u8, 177u8, 147u8, 244u8, 169u8, 45u8, 213u8, 76u8, 163u8, 47u8, + 96u8, 197u8, 245u8, 17u8, 208u8, 86u8, 15u8, 233u8, 156u8, 165u8, 44u8, + 164u8, 202u8, 117u8, 167u8, 209u8, 193u8, 218u8, 235u8, 140u8, 158u8, + ], + ) + } + #[doc = " A bag stored in storage."] + #[doc = ""] + #[doc = " Stores a `Bag` struct, which stores head and tail pointers to itself."] + pub fn list_bags( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::list_bags::ListBags, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BagsList", + "ListBags", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 98u8, 52u8, 177u8, 147u8, 244u8, 169u8, 45u8, 213u8, 76u8, 163u8, 47u8, + 96u8, 197u8, 245u8, 17u8, 208u8, 86u8, 15u8, 233u8, 156u8, 165u8, 44u8, + 164u8, 202u8, 117u8, 167u8, 209u8, 193u8, 218u8, 235u8, 140u8, 158u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The list of thresholds separating the various bags."] + #[doc = ""] + #[doc = " Ids are separated into unsorted bags according to their score. This specifies the"] + #[doc = " thresholds separating the bags. An id's bag is the largest bag for which the id's score"] + #[doc = " is less than or equal to its upper threshold."] + #[doc = ""] + #[doc = " When ids are iterated, higher bags are iterated completely before lower bags. This means"] + #[doc = " that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower"] + #[doc = " score, but peer ids within a particular bag are sorted in insertion order."] + #[doc = ""] + #[doc = " # Expressing the constant"] + #[doc = ""] + #[doc = " This constant must be sorted in strictly increasing order. Duplicate items are not"] + #[doc = " permitted."] + #[doc = ""] + #[doc = " There is an implied upper limit of `Score::MAX`; that value does not need to be"] + #[doc = " specified within the bag. For any two threshold lists, if one ends with"] + #[doc = " `Score::MAX`, the other one does not, and they are otherwise equal, the two"] + #[doc = " lists will behave identically."] + #[doc = ""] + #[doc = " # Calculation"] + #[doc = ""] + #[doc = " It is recommended to generate the set of thresholds in a geometric series, such that"] + #[doc = " there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *"] + #[doc = " constant_ratio).max(threshold[k] + 1)` for all `k`."] + #[doc = ""] + #[doc = " The helpers in the `/utils/frame/generate-bags` module can simplify this calculation."] + #[doc = ""] + #[doc = " # Examples"] + #[doc = ""] + #[doc = " - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and"] + #[doc = " iteration is strictly in insertion order."] + #[doc = " - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to"] + #[doc = " the procedure given above, then the constant ratio is equal to 2."] + #[doc = " - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to"] + #[doc = " the procedure given above, then the constant ratio is approximately equal to 1.248."] + #[doc = " - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall"] + #[doc = " into bag 0, an id with score 2 will fall into bag 1, etc."] + #[doc = ""] + #[doc = " # Migration"] + #[doc = ""] + #[doc = " In the event that this list ever changes, a copy of the old bags list must be retained."] + #[doc = " With that `List::migrate` can be called, which will perform the appropriate migration."] + pub fn bag_thresholds( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + ::subxt_core::alloc::vec::Vec<::core::primitive::u64>, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "BagsList", + "BagThresholds", + [ + 215u8, 118u8, 183u8, 172u8, 4u8, 42u8, 248u8, 108u8, 4u8, 110u8, 43u8, + 165u8, 228u8, 7u8, 36u8, 30u8, 135u8, 184u8, 56u8, 201u8, 107u8, 68u8, + 25u8, 164u8, 134u8, 32u8, 82u8, 107u8, 200u8, 219u8, 212u8, 198u8, + ], + ) + } + } + } + } + pub mod nomination_pools { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_nomination_pools::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_nomination_pools::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub struct Join { + #[codec(compact)] + pub amount: join::Amount, + pub pool_id: join::PoolId, + } + pub mod join { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Join { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "join"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] + pub struct BondExtra { + pub extra: bond_extra::Extra, + } + pub mod bond_extra { + use super::runtime_types; + pub type Extra = + runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>; + } + impl ::subxt_core::blocks::StaticExtrinsic for BondExtra { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "bond_extra"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is their first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] + #[doc = ""] + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + #[doc = ""] + #[doc = "See `claim_payout_other` to claim rewards on behalf of some `other` pool member."] + pub struct ClaimPayout; + impl ::subxt_core::blocks::StaticExtrinsic for ClaimPayout { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "claim_payout"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + pub struct Unbond { + pub member_account: unbond::MemberAccount, + #[codec(compact)] + pub unbonding_points: unbond::UnbondingPoints, + } + pub mod unbond { + use super::runtime_types; + pub type MemberAccount = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type UnbondingPoints = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Unbond { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "unbond"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if there are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub struct PoolWithdrawUnbonded { + pub pool_id: pool_withdraw_unbonded::PoolId, + pub num_slashing_spans: pool_withdraw_unbonded::NumSlashingSpans, + } + pub mod pool_withdraw_unbonded { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for PoolWithdrawUnbonded { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "pool_withdraw_unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "- If the target is the depositor, the pool will be destroyed."] + #[doc = "- If the pool has any pending slash, we also try to slash the member before letting them"] + #[doc = "withdraw. This calculation adds some weight overhead and is only defensive. In reality,"] + #[doc = "pool slashes must have been already applied via permissionless [`Call::apply_slash`]."] + pub struct WithdrawUnbonded { + pub member_account: withdraw_unbonded::MemberAccount, + pub num_slashing_spans: withdraw_unbonded::NumSlashingSpans, + } + pub mod withdraw_unbonded { + use super::runtime_types; + pub type MemberAccount = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for WithdrawUnbonded { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "withdraw_unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferable."] + pub struct Create { + #[codec(compact)] + pub amount: create::Amount, + pub root: create::Root, + pub nominator: create::Nominator, + pub bouncer: create::Bouncer, + } + pub mod create { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type Root = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Nominator = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Bouncer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Create { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "create"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub struct CreateWithPoolId { + #[codec(compact)] + pub amount: create_with_pool_id::Amount, + pub root: create_with_pool_id::Root, + pub nominator: create_with_pool_id::Nominator, + pub bouncer: create_with_pool_id::Bouncer, + pub pool_id: create_with_pool_id::PoolId, + } + pub mod create_with_pool_id { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type Root = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Nominator = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Bouncer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CreateWithPoolId { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "create_with_pool_id"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to a `root` or `nominator` role of `origin`, pool's depositor needs to have"] + #[doc = "at least `depositor_min_bond` in the pool to start nominating."] + pub struct Nominate { + pub pool_id: nominate::PoolId, + pub validators: nominate::Validators, + } + pub mod nominate { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Validators = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Nominate { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "nominate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + pub struct SetState { + pub pool_id: set_state::PoolId, + pub state: set_state::State, + } + pub mod set_state { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type State = runtime_types::pallet_nomination_pools::PoolState; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetState { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_state"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] + pub struct SetMetadata { + pub pool_id: set_metadata::PoolId, + pub metadata: set_metadata::Metadata, + } + pub mod set_metadata { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Metadata = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMetadata { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_metadata"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "[`Config::AdminOrigin`]."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] + pub struct SetConfigs { + pub min_join_bond: set_configs::MinJoinBond, + pub min_create_bond: set_configs::MinCreateBond, + pub max_pools: set_configs::MaxPools, + pub max_members: set_configs::MaxMembers, + pub max_members_per_pool: set_configs::MaxMembersPerPool, + pub global_max_commission: set_configs::GlobalMaxCommission, + } + pub mod set_configs { + use super::runtime_types; + pub type MinJoinBond = + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>; + pub type MinCreateBond = + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u128>; + pub type MaxPools = + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>; + pub type MaxMembers = + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>; + pub type MaxMembersPerPool = + runtime_types::pallet_nomination_pools::ConfigOp<::core::primitive::u32>; + pub type GlobalMaxCommission = runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetConfigs { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_configs"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + pub struct UpdateRoles { + pub pool_id: update_roles::PoolId, + pub new_root: update_roles::NewRoot, + pub new_nominator: update_roles::NewNominator, + pub new_bouncer: update_roles::NewBouncer, + } + pub mod update_roles { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NewRoot = runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt_core::utils::AccountId32, + >; + pub type NewNominator = runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt_core::utils::AccountId32, + >; + pub type NewBouncer = runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt_core::utils::AccountId32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for UpdateRoles { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "update_roles"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call can be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch:"] + #[doc = "* When pool depositor has less than `MinNominatorBond` staked, otherwise pool members"] + #[doc = " are unable to unbond."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch:"] + #[doc = "* The caller has a nominator or root role of the pool."] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub struct Chill { + pub pool_id: chill::PoolId, + } + pub mod chill { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Chill { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "chill"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessCompound` or `PermissionlessAll`."] + pub struct BondExtraOther { + pub member: bond_extra_other::Member, + pub extra: bond_extra_other::Extra, + } + pub mod bond_extra_other { + use super::runtime_types; + pub type Member = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Extra = + runtime_types::pallet_nomination_pools::BondExtra<::core::primitive::u128>; + } + impl ::subxt_core::blocks::StaticExtrinsic for BondExtraOther { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "bond_extra_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows a pool member to set a claim permission to allow or disallow permissionless"] + #[doc = "bonding and withdrawing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `origin` - Member of a pool."] + #[doc = "* `permission` - The permission to be applied."] + pub struct SetClaimPermission { + pub permission: set_claim_permission::Permission, + } + pub mod set_claim_permission { + use super::runtime_types; + pub type Permission = runtime_types::pallet_nomination_pools::ClaimPermission; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetClaimPermission { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_claim_permission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "`origin` can claim payouts on some pool member `other`'s behalf."] + #[doc = ""] + #[doc = "Pool member `other` must have a `PermissionlessWithdraw` or `PermissionlessAll` claim"] + #[doc = "permission for this call to be successful."] + pub struct ClaimPayoutOther { + pub other: claim_payout_other::Other, + } + pub mod claim_payout_other { + use super::runtime_types; + pub type Other = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimPayoutOther { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "claim_payout_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + pub struct SetCommission { + pub pool_id: set_commission::PoolId, + pub new_commission: set_commission::NewCommission, + } + pub mod set_commission { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NewCommission = ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommission { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_commission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + pub struct SetCommissionMax { + pub pool_id: set_commission_max::PoolId, + pub max_commission: set_commission_max::MaxCommission, + } + pub mod set_commission_max { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type MaxCommission = runtime_types::sp_arithmetic::per_things::Perbill; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommissionMax { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_commission_max"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + pub struct SetCommissionChangeRate { + pub pool_id: set_commission_change_rate::PoolId, + pub change_rate: set_commission_change_rate::ChangeRate, + } + pub mod set_commission_change_rate { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type ChangeRate = + runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u64, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommissionChangeRate { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_commission_change_rate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + pub struct ClaimCommission { + pub pool_id: claim_commission::PoolId, + } + pub mod claim_commission { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimCommission { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "claim_commission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Top up the deficit or withdraw the excess ED from the pool."] + #[doc = ""] + #[doc = "When a pool is created, the pool depositor transfers ED to the reward account of the"] + #[doc = "pool. ED is subject to change and over time, the deposit in the reward account may be"] + #[doc = "insufficient to cover the ED deficit of the pool or vice-versa where there is excess"] + #[doc = "deposit to the pool. This call allows anyone to adjust the ED deposit of the"] + #[doc = "pool by either topping up the deficit or claiming the excess."] + pub struct AdjustPoolDeposit { + pub pool_id: adjust_pool_deposit::PoolId, + } + pub mod adjust_pool_deposit { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for AdjustPoolDeposit { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "adjust_pool_deposit"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set or remove a pool's commission claim permission."] + #[doc = ""] + #[doc = "Determines who can claim the pool's pending commission. Only the `Root` role of the pool"] + #[doc = "is able to configure commission claim permissions."] + pub struct SetCommissionClaimPermission { + pub pool_id: set_commission_claim_permission::PoolId, + pub permission: set_commission_claim_permission::Permission, + } + pub mod set_commission_claim_permission { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Permission = ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionClaimPermission< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommissionClaimPermission { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "set_commission_claim_permission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Apply a pending slash on a member."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "The pending slash amount of the member must be equal or more than `ExistentialDeposit`."] + #[doc = "This call can be dispatched permissionlessly (i.e. by any account). If the execution"] + #[doc = "is successful, fee is refunded and caller may be rewarded with a part of the slash"] + #[doc = "based on the [`crate::pallet::Config::StakeAdapter`] configuration."] + pub struct ApplySlash { + pub member_account: apply_slash::MemberAccount, + } + pub mod apply_slash { + use super::runtime_types; + pub type MemberAccount = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ApplySlash { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "apply_slash"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Migrates delegated funds from the pool account to the `member_account`."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "This is a permission-less call and refunds any fee if claim is successful."] + #[doc = ""] + #[doc = "If the pool has migrated to delegation based staking, the staked tokens of pool members"] + #[doc = "can be moved and held in their own account. See [`adapter::DelegateStake`]"] + pub struct MigrateDelegation { + pub member_account: migrate_delegation::MemberAccount, + } + pub mod migrate_delegation { + use super::runtime_types; + pub type MemberAccount = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for MigrateDelegation { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "migrate_delegation"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Migrate pool from [`adapter::StakeStrategyType::Transfer`] to"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "This call can be dispatched permissionlessly, and refunds any fee if successful."] + #[doc = ""] + #[doc = "If the pool has already migrated to delegation based staking, this call will fail."] + pub struct MigratePoolToDelegateStake { + pub pool_id: migrate_pool_to_delegate_stake::PoolId, + } + pub mod migrate_pool_to_delegate_stake { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for MigratePoolToDelegateStake { + const PALLET: &'static str = "NominationPools"; + const CALL: &'static str = "migrate_pool_to_delegate_stake"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub fn join( + &self, + amount: types::join::Amount, + pool_id: types::join::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "join", + types::Join { amount, pool_id }, + [ + 9u8, 24u8, 209u8, 117u8, 242u8, 76u8, 192u8, 40u8, 196u8, 136u8, 158u8, + 182u8, 117u8, 140u8, 164u8, 64u8, 184u8, 160u8, 146u8, 143u8, 173u8, + 180u8, 6u8, 242u8, 203u8, 130u8, 41u8, 176u8, 158u8, 96u8, 94u8, 175u8, + ], + ) + } + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] + pub fn bond_extra( + &self, + extra: types::bond_extra::Extra, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "bond_extra", + types::BondExtra { extra }, + [ + 149u8, 176u8, 102u8, 52u8, 76u8, 227u8, 61u8, 60u8, 109u8, 187u8, 40u8, + 176u8, 163u8, 37u8, 10u8, 228u8, 164u8, 77u8, 155u8, 155u8, 14u8, + 106u8, 5u8, 177u8, 176u8, 224u8, 163u8, 28u8, 66u8, 237u8, 186u8, + 188u8, + ], + ) + } + #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is their first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] + #[doc = ""] + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + #[doc = ""] + #[doc = "See `claim_payout_other` to claim rewards on behalf of some `other` pool member."] + pub fn claim_payout( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "claim_payout", + types::ClaimPayout {}, + [ + 28u8, 87u8, 180u8, 5u8, 69u8, 49u8, 121u8, 28u8, 34u8, 63u8, 78u8, + 228u8, 223u8, 12u8, 171u8, 41u8, 181u8, 137u8, 145u8, 141u8, 198u8, + 220u8, 5u8, 101u8, 173u8, 69u8, 222u8, 59u8, 111u8, 92u8, 182u8, 8u8, + ], + ) + } + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + pub fn unbond( + &self, + member_account: types::unbond::MemberAccount, + unbonding_points: types::unbond::UnbondingPoints, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "unbond", + types::Unbond { member_account, unbonding_points }, + [ + 183u8, 93u8, 100u8, 99u8, 110u8, 67u8, 49u8, 3u8, 32u8, 33u8, 33u8, + 213u8, 198u8, 81u8, 120u8, 187u8, 249u8, 177u8, 81u8, 156u8, 162u8, + 165u8, 80u8, 88u8, 34u8, 7u8, 19u8, 199u8, 26u8, 110u8, 208u8, 218u8, + ], + ) + } + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if there are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub fn pool_withdraw_unbonded( + &self, + pool_id: types::pool_withdraw_unbonded::PoolId, + num_slashing_spans: types::pool_withdraw_unbonded::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "pool_withdraw_unbonded", + types::PoolWithdrawUnbonded { pool_id, num_slashing_spans }, + [ + 145u8, 39u8, 154u8, 109u8, 24u8, 233u8, 144u8, 66u8, 28u8, 252u8, + 180u8, 5u8, 54u8, 123u8, 28u8, 182u8, 26u8, 156u8, 69u8, 105u8, 226u8, + 208u8, 154u8, 34u8, 22u8, 201u8, 139u8, 104u8, 198u8, 195u8, 247u8, + 49u8, + ], + ) + } + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "- If the target is the depositor, the pool will be destroyed."] + #[doc = "- If the pool has any pending slash, we also try to slash the member before letting them"] + #[doc = "withdraw. This calculation adds some weight overhead and is only defensive. In reality,"] + #[doc = "pool slashes must have been already applied via permissionless [`Call::apply_slash`]."] + pub fn withdraw_unbonded( + &self, + member_account: types::withdraw_unbonded::MemberAccount, + num_slashing_spans: types::withdraw_unbonded::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "withdraw_unbonded", + types::WithdrawUnbonded { member_account, num_slashing_spans }, + [ + 86u8, 117u8, 152u8, 53u8, 236u8, 139u8, 234u8, 34u8, 89u8, 229u8, + 163u8, 115u8, 248u8, 231u8, 39u8, 82u8, 188u8, 79u8, 125u8, 134u8, + 213u8, 26u8, 162u8, 42u8, 105u8, 212u8, 31u8, 192u8, 137u8, 68u8, 93u8, + 149u8, + ], + ) + } + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferable."] + pub fn create( + &self, + amount: types::create::Amount, + root: types::create::Root, + nominator: types::create::Nominator, + bouncer: types::create::Bouncer, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "create", + types::Create { amount, root, nominator, bouncer }, + [ + 178u8, 5u8, 192u8, 56u8, 49u8, 78u8, 47u8, 174u8, 224u8, 191u8, 143u8, + 247u8, 33u8, 141u8, 180u8, 96u8, 236u8, 234u8, 181u8, 72u8, 254u8, + 148u8, 228u8, 85u8, 30u8, 187u8, 8u8, 24u8, 255u8, 247u8, 196u8, 229u8, + ], + ) + } + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub fn create_with_pool_id( + &self, + amount: types::create_with_pool_id::Amount, + root: types::create_with_pool_id::Root, + nominator: types::create_with_pool_id::Nominator, + bouncer: types::create_with_pool_id::Bouncer, + pool_id: types::create_with_pool_id::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "create_with_pool_id", + types::CreateWithPoolId { amount, root, nominator, bouncer, pool_id }, + [ + 3u8, 35u8, 125u8, 15u8, 31u8, 212u8, 98u8, 154u8, 127u8, 158u8, 202u8, + 73u8, 141u8, 248u8, 238u8, 102u8, 183u8, 24u8, 69u8, 211u8, 128u8, + 152u8, 205u8, 19u8, 215u8, 167u8, 221u8, 77u8, 210u8, 219u8, 69u8, + 246u8, + ], + ) + } + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to a `root` or `nominator` role of `origin`, pool's depositor needs to have"] + #[doc = "at least `depositor_min_bond` in the pool to start nominating."] + pub fn nominate( + &self, + pool_id: types::nominate::PoolId, + validators: types::nominate::Validators, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "nominate", + types::Nominate { pool_id, validators }, + [ + 118u8, 80u8, 137u8, 47u8, 102u8, 9u8, 20u8, 136u8, 76u8, 164u8, 161u8, + 114u8, 33u8, 159u8, 204u8, 49u8, 233u8, 199u8, 246u8, 67u8, 144u8, + 169u8, 211u8, 67u8, 12u8, 68u8, 198u8, 149u8, 87u8, 62u8, 226u8, 72u8, + ], + ) + } + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + pub fn set_state( + &self, + pool_id: types::set_state::PoolId, + state: types::set_state::State, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_state", + types::SetState { pool_id, state }, + [ + 39u8, 221u8, 24u8, 65u8, 144u8, 230u8, 228u8, 24u8, 191u8, 53u8, 171u8, + 148u8, 131u8, 45u8, 10u8, 22u8, 222u8, 240u8, 13u8, 87u8, 123u8, 182u8, + 102u8, 26u8, 124u8, 205u8, 23u8, 31u8, 25u8, 43u8, 12u8, 140u8, + ], + ) + } + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] + pub fn set_metadata( + &self, + pool_id: types::set_metadata::PoolId, + metadata: types::set_metadata::Metadata, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_metadata", + types::SetMetadata { pool_id, metadata }, + [ + 221u8, 189u8, 15u8, 232u8, 0u8, 49u8, 187u8, 67u8, 124u8, 26u8, 114u8, + 191u8, 81u8, 14u8, 253u8, 75u8, 88u8, 182u8, 136u8, 18u8, 238u8, 119u8, + 215u8, 248u8, 133u8, 160u8, 154u8, 193u8, 177u8, 140u8, 1u8, 16u8, + ], + ) + } + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "[`Config::AdminOrigin`]."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] + pub fn set_configs( + &self, + min_join_bond: types::set_configs::MinJoinBond, + min_create_bond: types::set_configs::MinCreateBond, + max_pools: types::set_configs::MaxPools, + max_members: types::set_configs::MaxMembers, + max_members_per_pool: types::set_configs::MaxMembersPerPool, + global_max_commission: types::set_configs::GlobalMaxCommission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_configs", + types::SetConfigs { + min_join_bond, + min_create_bond, + max_pools, + max_members, + max_members_per_pool, + global_max_commission, + }, + [ + 151u8, 222u8, 184u8, 213u8, 161u8, 89u8, 162u8, 112u8, 198u8, 87u8, + 186u8, 55u8, 99u8, 197u8, 164u8, 156u8, 185u8, 199u8, 202u8, 19u8, + 44u8, 34u8, 35u8, 39u8, 129u8, 22u8, 41u8, 32u8, 27u8, 37u8, 176u8, + 107u8, + ], + ) + } + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + pub fn update_roles( + &self, + pool_id: types::update_roles::PoolId, + new_root: types::update_roles::NewRoot, + new_nominator: types::update_roles::NewNominator, + new_bouncer: types::update_roles::NewBouncer, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "update_roles", + types::UpdateRoles { pool_id, new_root, new_nominator, new_bouncer }, + [ + 48u8, 253u8, 39u8, 205u8, 196u8, 231u8, 254u8, 76u8, 238u8, 70u8, 2u8, + 192u8, 188u8, 240u8, 206u8, 91u8, 213u8, 98u8, 226u8, 51u8, 167u8, + 205u8, 120u8, 128u8, 40u8, 175u8, 238u8, 57u8, 147u8, 96u8, 116u8, + 133u8, + ], + ) + } + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call can be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch:"] + #[doc = "* When pool depositor has less than `MinNominatorBond` staked, otherwise pool members"] + #[doc = " are unable to unbond."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch:"] + #[doc = "* The caller has a nominator or root role of the pool."] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn chill( + &self, + pool_id: types::chill::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "chill", + types::Chill { pool_id }, + [ + 65u8, 206u8, 54u8, 53u8, 37u8, 97u8, 161u8, 104u8, 62u8, 9u8, 93u8, + 236u8, 61u8, 185u8, 204u8, 245u8, 234u8, 218u8, 213u8, 40u8, 154u8, + 29u8, 244u8, 19u8, 207u8, 172u8, 142u8, 221u8, 38u8, 70u8, 39u8, 10u8, + ], + ) + } + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessCompound` or `PermissionlessAll`."] + pub fn bond_extra_other( + &self, + member: types::bond_extra_other::Member, + extra: types::bond_extra_other::Extra, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "bond_extra_other", + types::BondExtraOther { member, extra }, + [ + 253u8, 254u8, 246u8, 159u8, 248u8, 251u8, 20u8, 192u8, 70u8, 196u8, + 152u8, 189u8, 177u8, 144u8, 15u8, 52u8, 188u8, 132u8, 132u8, 97u8, + 112u8, 183u8, 102u8, 170u8, 132u8, 119u8, 204u8, 193u8, 7u8, 170u8, + 31u8, 156u8, + ], + ) + } + #[doc = "Allows a pool member to set a claim permission to allow or disallow permissionless"] + #[doc = "bonding and withdrawing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `origin` - Member of a pool."] + #[doc = "* `permission` - The permission to be applied."] + pub fn set_claim_permission( + &self, + permission: types::set_claim_permission::Permission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_claim_permission", + types::SetClaimPermission { permission }, + [ + 36u8, 137u8, 193u8, 200u8, 57u8, 46u8, 87u8, 236u8, 180u8, 170u8, 90u8, + 99u8, 137u8, 123u8, 99u8, 197u8, 113u8, 119u8, 72u8, 153u8, 207u8, + 189u8, 69u8, 89u8, 225u8, 115u8, 45u8, 32u8, 216u8, 43u8, 92u8, 135u8, + ], + ) + } + #[doc = "`origin` can claim payouts on some pool member `other`'s behalf."] + #[doc = ""] + #[doc = "Pool member `other` must have a `PermissionlessWithdraw` or `PermissionlessAll` claim"] + #[doc = "permission for this call to be successful."] + pub fn claim_payout_other( + &self, + other: types::claim_payout_other::Other, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "claim_payout_other", + types::ClaimPayoutOther { other }, + [ + 202u8, 130u8, 122u8, 10u8, 159u8, 181u8, 124u8, 215u8, 23u8, 85u8, + 234u8, 178u8, 169u8, 41u8, 204u8, 226u8, 195u8, 69u8, 168u8, 88u8, + 58u8, 15u8, 3u8, 227u8, 180u8, 183u8, 62u8, 224u8, 39u8, 218u8, 75u8, + 166u8, + ], + ) + } + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + pub fn set_commission( + &self, + pool_id: types::set_commission::PoolId, + new_commission: types::set_commission::NewCommission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_commission", + types::SetCommission { pool_id, new_commission }, + [ + 77u8, 139u8, 221u8, 210u8, 51u8, 57u8, 243u8, 96u8, 25u8, 0u8, 42u8, + 81u8, 80u8, 7u8, 145u8, 28u8, 17u8, 44u8, 123u8, 28u8, 130u8, 194u8, + 153u8, 139u8, 222u8, 166u8, 169u8, 184u8, 46u8, 178u8, 236u8, 246u8, + ], + ) + } + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + pub fn set_commission_max( + &self, + pool_id: types::set_commission_max::PoolId, + max_commission: types::set_commission_max::MaxCommission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_commission_max", + types::SetCommissionMax { pool_id, max_commission }, + [ + 198u8, 127u8, 255u8, 230u8, 96u8, 142u8, 9u8, 220u8, 204u8, 82u8, + 192u8, 76u8, 140u8, 52u8, 94u8, 80u8, 153u8, 30u8, 162u8, 21u8, 71u8, + 31u8, 218u8, 160u8, 254u8, 180u8, 160u8, 219u8, 163u8, 30u8, 193u8, + 6u8, + ], + ) + } + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + pub fn set_commission_change_rate( + &self, + pool_id: types::set_commission_change_rate::PoolId, + change_rate: types::set_commission_change_rate::ChangeRate, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_commission_change_rate", + types::SetCommissionChangeRate { pool_id, change_rate }, + [ + 253u8, 128u8, 246u8, 46u8, 81u8, 204u8, 114u8, 21u8, 245u8, 99u8, 88u8, + 98u8, 194u8, 103u8, 85u8, 231u8, 181u8, 61u8, 146u8, 184u8, 225u8, + 175u8, 175u8, 99u8, 63u8, 141u8, 112u8, 218u8, 160u8, 226u8, 251u8, + 185u8, + ], + ) + } + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + pub fn claim_commission( + &self, + pool_id: types::claim_commission::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "claim_commission", + types::ClaimCommission { pool_id }, + [ + 51u8, 64u8, 163u8, 230u8, 2u8, 119u8, 68u8, 5u8, 154u8, 4u8, 84u8, + 149u8, 9u8, 195u8, 173u8, 37u8, 98u8, 48u8, 188u8, 65u8, 81u8, 11u8, + 64u8, 254u8, 126u8, 62u8, 29u8, 204u8, 92u8, 230u8, 240u8, 91u8, + ], + ) + } + #[doc = "Top up the deficit or withdraw the excess ED from the pool."] + #[doc = ""] + #[doc = "When a pool is created, the pool depositor transfers ED to the reward account of the"] + #[doc = "pool. ED is subject to change and over time, the deposit in the reward account may be"] + #[doc = "insufficient to cover the ED deficit of the pool or vice-versa where there is excess"] + #[doc = "deposit to the pool. This call allows anyone to adjust the ED deposit of the"] + #[doc = "pool by either topping up the deficit or claiming the excess."] + pub fn adjust_pool_deposit( + &self, + pool_id: types::adjust_pool_deposit::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "adjust_pool_deposit", + types::AdjustPoolDeposit { pool_id }, + [ + 5u8, 203u8, 109u8, 141u8, 29u8, 58u8, 216u8, 21u8, 219u8, 139u8, 129u8, + 33u8, 49u8, 196u8, 255u8, 49u8, 79u8, 218u8, 24u8, 250u8, 254u8, 64u8, + 215u8, 33u8, 223u8, 205u8, 117u8, 209u8, 138u8, 115u8, 174u8, 181u8, + ], + ) + } + #[doc = "Set or remove a pool's commission claim permission."] + #[doc = ""] + #[doc = "Determines who can claim the pool's pending commission. Only the `Root` role of the pool"] + #[doc = "is able to configure commission claim permissions."] + pub fn set_commission_claim_permission( + &self, + pool_id: types::set_commission_claim_permission::PoolId, + permission: types::set_commission_claim_permission::Permission, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "set_commission_claim_permission", + types::SetCommissionClaimPermission { pool_id, permission }, + [ + 2u8, 140u8, 135u8, 31u8, 180u8, 2u8, 245u8, 33u8, 34u8, 204u8, 192u8, + 30u8, 131u8, 4u8, 108u8, 194u8, 154u8, 65u8, 104u8, 252u8, 84u8, 58u8, + 10u8, 47u8, 238u8, 185u8, 91u8, 162u8, 190u8, 239u8, 74u8, 38u8, + ], + ) + } + #[doc = "Apply a pending slash on a member."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "The pending slash amount of the member must be equal or more than `ExistentialDeposit`."] + #[doc = "This call can be dispatched permissionlessly (i.e. by any account). If the execution"] + #[doc = "is successful, fee is refunded and caller may be rewarded with a part of the slash"] + #[doc = "based on the [`crate::pallet::Config::StakeAdapter`] configuration."] + pub fn apply_slash( + &self, + member_account: types::apply_slash::MemberAccount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "apply_slash", + types::ApplySlash { member_account }, + [ + 2u8, 86u8, 29u8, 116u8, 16u8, 255u8, 232u8, 230u8, 97u8, 46u8, 104u8, + 167u8, 171u8, 19u8, 51u8, 170u8, 98u8, 108u8, 58u8, 181u8, 17u8, 193u8, + 172u8, 221u8, 119u8, 17u8, 249u8, 154u8, 61u8, 159u8, 31u8, 72u8, + ], + ) + } + #[doc = "Migrates delegated funds from the pool account to the `member_account`."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "This is a permission-less call and refunds any fee if claim is successful."] + #[doc = ""] + #[doc = "If the pool has migrated to delegation based staking, the staked tokens of pool members"] + #[doc = "can be moved and held in their own account. See [`adapter::DelegateStake`]"] + pub fn migrate_delegation( + &self, + member_account: types::migrate_delegation::MemberAccount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "migrate_delegation", + types::MigrateDelegation { member_account }, + [ + 26u8, 77u8, 30u8, 239u8, 89u8, 129u8, 167u8, 107u8, 181u8, 47u8, 99u8, + 75u8, 90u8, 160u8, 86u8, 222u8, 233u8, 63u8, 208u8, 149u8, 44u8, 127u8, + 9u8, 25u8, 249u8, 170u8, 186u8, 28u8, 100u8, 168u8, 13u8, 39u8, + ], + ) + } + #[doc = "Migrate pool from [`adapter::StakeStrategyType::Transfer`] to"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "This call can be dispatched permissionlessly, and refunds any fee if successful."] + #[doc = ""] + #[doc = "If the pool has already migrated to delegation based staking, this call will fail."] + pub fn migrate_pool_to_delegate_stake( + &self, + pool_id: types::migrate_pool_to_delegate_stake::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "NominationPools", + "migrate_pool_to_delegate_stake", + types::MigratePoolToDelegateStake { pool_id }, + [ + 63u8, 137u8, 37u8, 37u8, 79u8, 184u8, 127u8, 89u8, 85u8, 219u8, 64u8, + 6u8, 32u8, 115u8, 52u8, 74u8, 212u8, 117u8, 0u8, 128u8, 149u8, 225u8, + 94u8, 113u8, 4u8, 209u8, 136u8, 188u8, 224u8, 220u8, 125u8, 167u8, + ], + ) + } + } + } + #[doc = "Events of this pallet."] + pub type Event = runtime_types::pallet_nomination_pools::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool has been created."] + pub struct Created { + pub depositor: created::Depositor, + pub pool_id: created::PoolId, + } + pub mod created { + use super::runtime_types; + pub type Depositor = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Created { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Created"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has became bonded in a pool."] + pub struct Bonded { + pub member: bonded::Member, + pub pool_id: bonded::PoolId, + pub bonded: bonded::Bonded, + pub joined: bonded::Joined, + } + pub mod bonded { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Bonded = ::core::primitive::u128; + pub type Joined = ::core::primitive::bool; + } + impl ::subxt_core::events::StaticEvent for Bonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Bonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A payout has been made to a member."] + pub struct PaidOut { + pub member: paid_out::Member, + pub pool_id: paid_out::PoolId, + pub payout: paid_out::Payout, + } + pub mod paid_out { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Payout = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for PaidOut { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PaidOut"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + pub struct Unbonded { + pub member: unbonded::Member, + pub pool_id: unbonded::PoolId, + pub balance: unbonded::Balance, + pub points: unbonded::Points, + pub era: unbonded::Era, + } + pub mod unbonded { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + pub type Points = ::core::primitive::u128; + pub type Era = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Unbonded { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + pub struct Withdrawn { + pub member: withdrawn::Member, + pub pool_id: withdrawn::PoolId, + pub balance: withdrawn::Balance, + pub points: withdrawn::Points, + } + pub mod withdrawn { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + pub type Points = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Withdrawn"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool has been destroyed."] + pub struct Destroyed { + pub pool_id: destroyed::PoolId, + } + pub mod destroyed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Destroyed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "Destroyed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The state of a pool has changed"] + pub struct StateChanged { + pub pool_id: state_changed::PoolId, + pub new_state: state_changed::NewState, + } + pub mod state_changed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NewState = runtime_types::pallet_nomination_pools::PoolState; + } + impl ::subxt_core::events::StaticEvent for StateChanged { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "StateChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + pub struct MemberRemoved { + pub pool_id: member_removed::PoolId, + pub member: member_removed::Member, + } + pub mod member_removed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Member = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "MemberRemoved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + pub struct RolesUpdated { + pub root: roles_updated::Root, + pub bouncer: roles_updated::Bouncer, + pub nominator: roles_updated::Nominator, + } + pub mod roles_updated { + use super::runtime_types; + pub type Root = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type Bouncer = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type Nominator = ::core::option::Option<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::events::StaticEvent for RolesUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "RolesUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + pub struct PoolSlashed { + pub pool_id: pool_slashed::PoolId, + pub balance: pool_slashed::Balance, + } + pub mod pool_slashed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for PoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + pub struct UnbondingPoolSlashed { + pub pool_id: unbonding_pool_slashed::PoolId, + pub era: unbonding_pool_slashed::Era, + pub balance: unbonding_pool_slashed::Balance, + } + pub mod unbonding_pool_slashed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Era = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for UnbondingPoolSlashed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "UnbondingPoolSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool's commission setting has been changed."] + pub struct PoolCommissionUpdated { + pub pool_id: pool_commission_updated::PoolId, + pub current: pool_commission_updated::Current, + } + pub mod pool_commission_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Current = ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool's maximum commission setting has been changed."] + pub struct PoolMaxCommissionUpdated { + pub pool_id: pool_max_commission_updated::PoolId, + pub max_commission: pool_max_commission_updated::MaxCommission, + } + pub mod pool_max_commission_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type MaxCommission = runtime_types::sp_arithmetic::per_things::Perbill; + } + impl ::subxt_core::events::StaticEvent for PoolMaxCommissionUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolMaxCommissionUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool's commission `change_rate` has been changed."] + pub struct PoolCommissionChangeRateUpdated { + pub pool_id: pool_commission_change_rate_updated::PoolId, + pub change_rate: pool_commission_change_rate_updated::ChangeRate, + } + pub mod pool_commission_change_rate_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type ChangeRate = runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u64, + >; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionChangeRateUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionChangeRateUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pool commission claim permission has been updated."] + pub struct PoolCommissionClaimPermissionUpdated { + pub pool_id: pool_commission_claim_permission_updated::PoolId, + pub permission: pool_commission_claim_permission_updated::Permission, + } + pub mod pool_commission_claim_permission_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Permission = ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionClaimPermission< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionClaimPermissionUpdated { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionClaimPermissionUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pool commission has been claimed."] + pub struct PoolCommissionClaimed { + pub pool_id: pool_commission_claimed::PoolId, + pub commission: pool_commission_claimed::Commission, + } + pub mod pool_commission_claimed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Commission = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionClaimed { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "PoolCommissionClaimed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Topped up deficit in frozen ED of the reward pool."] + pub struct MinBalanceDeficitAdjusted { + pub pool_id: min_balance_deficit_adjusted::PoolId, + pub amount: min_balance_deficit_adjusted::Amount, + } + pub mod min_balance_deficit_adjusted { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for MinBalanceDeficitAdjusted { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "MinBalanceDeficitAdjusted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claimed excess frozen ED of af the reward pool."] + pub struct MinBalanceExcessAdjusted { + pub pool_id: min_balance_excess_adjusted::PoolId, + pub amount: min_balance_excess_adjusted::Amount, + } + pub mod min_balance_excess_adjusted { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for MinBalanceExcessAdjusted { + const PALLET: &'static str = "NominationPools"; + const EVENT: &'static str = "MinBalanceExcessAdjusted"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod total_value_locked { + use super::runtime_types; + pub type TotalValueLocked = ::core::primitive::u128; + } + pub mod min_join_bond { + use super::runtime_types; + pub type MinJoinBond = ::core::primitive::u128; + } + pub mod min_create_bond { + use super::runtime_types; + pub type MinCreateBond = ::core::primitive::u128; + } + pub mod max_pools { + use super::runtime_types; + pub type MaxPools = ::core::primitive::u32; + } + pub mod max_pool_members { + use super::runtime_types; + pub type MaxPoolMembers = ::core::primitive::u32; + } + pub mod max_pool_members_per_pool { + use super::runtime_types; + pub type MaxPoolMembersPerPool = ::core::primitive::u32; + } + pub mod global_max_commission { + use super::runtime_types; + pub type GlobalMaxCommission = + runtime_types::sp_arithmetic::per_things::Perbill; + } + pub mod pool_members { + use super::runtime_types; + pub type PoolMembers = runtime_types::pallet_nomination_pools::PoolMember; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_pool_members { + use super::runtime_types; + pub type CounterForPoolMembers = ::core::primitive::u32; + } + pub mod bonded_pools { + use super::runtime_types; + pub type BondedPools = runtime_types::pallet_nomination_pools::BondedPoolInner; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_bonded_pools { + use super::runtime_types; + pub type CounterForBondedPools = ::core::primitive::u32; + } + pub mod reward_pools { + use super::runtime_types; + pub type RewardPools = runtime_types::pallet_nomination_pools::RewardPool; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_reward_pools { + use super::runtime_types; + pub type CounterForRewardPools = ::core::primitive::u32; + } + pub mod sub_pools_storage { + use super::runtime_types; + pub type SubPoolsStorage = runtime_types::pallet_nomination_pools::SubPools; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_sub_pools_storage { + use super::runtime_types; + pub type CounterForSubPoolsStorage = ::core::primitive::u32; + } + pub mod metadata { + use super::runtime_types; + pub type Metadata = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_metadata { + use super::runtime_types; + pub type CounterForMetadata = ::core::primitive::u32; + } + pub mod last_pool_id { + use super::runtime_types; + pub type LastPoolId = ::core::primitive::u32; + } + pub mod reverse_pool_id_lookup { + use super::runtime_types; + pub type ReversePoolIdLookup = ::core::primitive::u32; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_reverse_pool_id_lookup { + use super::runtime_types; + pub type CounterForReversePoolIdLookup = ::core::primitive::u32; + } + pub mod claim_permissions { + use super::runtime_types; + pub type ClaimPermissions = + runtime_types::pallet_nomination_pools::ClaimPermission; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The sum of funds across all pools."] + #[doc = ""] + #[doc = " This might be lower but never higher than the sum of `total_balance` of all [`PoolMembers`]"] + #[doc = " because calling `pool_withdraw_unbonded` might decrease the total stake of the pool's"] + #[doc = " `bonded_account` without adjusting the pallet-internal `UnbondingPool`'s."] + pub fn total_value_locked( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::total_value_locked::TotalValueLocked, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "TotalValueLocked", + (), + [ + 141u8, 23u8, 101u8, 59u8, 165u8, 8u8, 41u8, 252u8, 239u8, 72u8, 142u8, + 19u8, 186u8, 29u8, 131u8, 8u8, 113u8, 64u8, 82u8, 158u8, 26u8, 87u8, + 142u8, 39u8, 80u8, 231u8, 46u8, 40u8, 71u8, 186u8, 35u8, 104u8, + ], + ) + } + #[doc = " Minimum amount to bond to join a pool."] + pub fn min_join_bond( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_join_bond::MinJoinBond, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "MinJoinBond", + (), + [ + 64u8, 180u8, 71u8, 185u8, 81u8, 46u8, 155u8, 26u8, 251u8, 84u8, 108u8, + 80u8, 128u8, 44u8, 163u8, 118u8, 107u8, 79u8, 250u8, 211u8, 194u8, + 71u8, 87u8, 16u8, 247u8, 9u8, 76u8, 95u8, 103u8, 227u8, 180u8, 231u8, + ], + ) + } + #[doc = " Minimum bond required to create a pool."] + #[doc = ""] + #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] + #[doc = " indication of \"skin in the game\"."] + #[doc = ""] + #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] + #[doc = " while all other accounts leave."] + pub fn min_create_bond( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_create_bond::MinCreateBond, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "MinCreateBond", + (), + [ + 210u8, 67u8, 92u8, 230u8, 231u8, 105u8, 54u8, 249u8, 154u8, 192u8, + 29u8, 217u8, 233u8, 79u8, 170u8, 126u8, 133u8, 98u8, 253u8, 153u8, + 248u8, 189u8, 63u8, 107u8, 170u8, 224u8, 12u8, 42u8, 198u8, 185u8, + 85u8, 46u8, + ], + ) + } + #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] + #[doc = " pools can exist."] + pub fn max_pools( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_pools::MaxPools, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "MaxPools", + (), + [ + 230u8, 184u8, 242u8, 91u8, 118u8, 111u8, 90u8, 204u8, 136u8, 61u8, + 228u8, 50u8, 212u8, 40u8, 83u8, 49u8, 121u8, 161u8, 245u8, 80u8, 46u8, + 184u8, 105u8, 134u8, 249u8, 225u8, 39u8, 3u8, 123u8, 137u8, 156u8, + 240u8, + ], + ) + } + #[doc = " Maximum number of members that can exist in the system. If `None`, then the count"] + #[doc = " members are not bound on a system wide basis."] + pub fn max_pool_members( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_pool_members::MaxPoolMembers, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "MaxPoolMembers", + (), + [ + 210u8, 222u8, 181u8, 146u8, 137u8, 200u8, 71u8, 196u8, 74u8, 38u8, + 36u8, 122u8, 187u8, 164u8, 218u8, 116u8, 216u8, 143u8, 182u8, 15u8, + 23u8, 124u8, 57u8, 121u8, 81u8, 151u8, 8u8, 247u8, 80u8, 136u8, 115u8, + 2u8, + ], + ) + } + #[doc = " Maximum number of members that may belong to pool. If `None`, then the count of"] + #[doc = " members is not bound on a per pool basis."] + pub fn max_pool_members_per_pool( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_pool_members_per_pool::MaxPoolMembersPerPool, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "MaxPoolMembersPerPool", + (), + [ + 250u8, 255u8, 136u8, 223u8, 61u8, 119u8, 117u8, 240u8, 68u8, 114u8, + 55u8, 1u8, 176u8, 120u8, 143u8, 48u8, 232u8, 125u8, 218u8, 105u8, 28u8, + 230u8, 253u8, 36u8, 9u8, 44u8, 129u8, 225u8, 147u8, 33u8, 181u8, 68u8, + ], + ) + } + #[doc = " The maximum commission that can be charged by a pool. Used on commission payouts to bound"] + #[doc = " pool commissions that are > `GlobalMaxCommission`, necessary if a future"] + #[doc = " `GlobalMaxCommission` is lower than some current pool commissions."] + pub fn global_max_commission( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::global_max_commission::GlobalMaxCommission, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "GlobalMaxCommission", + (), + [ + 2u8, 112u8, 8u8, 116u8, 114u8, 97u8, 250u8, 106u8, 170u8, 215u8, 218u8, + 217u8, 80u8, 235u8, 149u8, 81u8, 85u8, 185u8, 201u8, 127u8, 107u8, + 251u8, 191u8, 231u8, 142u8, 74u8, 8u8, 70u8, 151u8, 238u8, 117u8, + 173u8, + ], + ) + } + #[doc = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::pool_members::PoolMembers, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "PoolMembers", + (), + [ + 71u8, 14u8, 198u8, 220u8, 13u8, 117u8, 189u8, 187u8, 123u8, 105u8, + 247u8, 41u8, 154u8, 176u8, 134u8, 226u8, 195u8, 136u8, 193u8, 6u8, + 134u8, 131u8, 105u8, 80u8, 140u8, 160u8, 20u8, 80u8, 179u8, 187u8, + 151u8, 47u8, + ], + ) + } + #[doc = " Active members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn pool_members( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::pool_members::PoolMembers, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "PoolMembers", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 71u8, 14u8, 198u8, 220u8, 13u8, 117u8, 189u8, 187u8, 123u8, 105u8, + 247u8, 41u8, 154u8, 176u8, 134u8, 226u8, 195u8, 136u8, 193u8, 6u8, + 134u8, 131u8, 105u8, 80u8, 140u8, 160u8, 20u8, 80u8, 179u8, 187u8, + 151u8, 47u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_pool_members( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_pool_members::CounterForPoolMembers, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "CounterForPoolMembers", + (), + [ + 165u8, 158u8, 130u8, 19u8, 106u8, 227u8, 134u8, 73u8, 36u8, 237u8, + 103u8, 146u8, 198u8, 68u8, 219u8, 186u8, 134u8, 224u8, 89u8, 251u8, + 200u8, 46u8, 87u8, 232u8, 53u8, 152u8, 13u8, 10u8, 105u8, 49u8, 150u8, + 212u8, + ], + ) + } + #[doc = " Storage for bonded pools."] + pub fn bonded_pools_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bonded_pools::BondedPools, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "BondedPools", + (), + [ + 237u8, 73u8, 210u8, 142u8, 175u8, 108u8, 4u8, 196u8, 31u8, 179u8, + 149u8, 14u8, 4u8, 10u8, 103u8, 135u8, 221u8, 118u8, 124u8, 94u8, 106u8, + 125u8, 138u8, 247u8, 190u8, 71u8, 16u8, 133u8, 33u8, 171u8, 160u8, + 60u8, + ], + ) + } + #[doc = " Storage for bonded pools."] + pub fn bonded_pools( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::bonded_pools::BondedPools, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "BondedPools", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 237u8, 73u8, 210u8, 142u8, 175u8, 108u8, 4u8, 196u8, 31u8, 179u8, + 149u8, 14u8, 4u8, 10u8, 103u8, 135u8, 221u8, 118u8, 124u8, 94u8, 106u8, + 125u8, 138u8, 247u8, 190u8, 71u8, 16u8, 133u8, 33u8, 171u8, 160u8, + 60u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_bonded_pools( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_bonded_pools::CounterForBondedPools, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "CounterForBondedPools", + (), + [ + 198u8, 6u8, 213u8, 92u8, 4u8, 114u8, 164u8, 244u8, 51u8, 55u8, 157u8, + 20u8, 224u8, 183u8, 40u8, 236u8, 115u8, 86u8, 171u8, 207u8, 31u8, + 111u8, 0u8, 210u8, 48u8, 198u8, 243u8, 153u8, 5u8, 216u8, 107u8, 113u8, + ], + ) + } + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout is"] + #[doc = " claimed, the balance comes out of the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reward_pools::RewardPools, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "RewardPools", + (), + [ + 9u8, 12u8, 53u8, 236u8, 133u8, 154u8, 71u8, 150u8, 220u8, 31u8, 130u8, + 126u8, 208u8, 240u8, 214u8, 66u8, 16u8, 43u8, 202u8, 222u8, 94u8, + 136u8, 76u8, 60u8, 174u8, 197u8, 130u8, 138u8, 253u8, 239u8, 89u8, + 46u8, + ], + ) + } + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout is"] + #[doc = " claimed, the balance comes out of the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::reward_pools::RewardPools, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "RewardPools", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 9u8, 12u8, 53u8, 236u8, 133u8, 154u8, 71u8, 150u8, 220u8, 31u8, 130u8, + 126u8, 208u8, 240u8, 214u8, 66u8, 16u8, 43u8, 202u8, 222u8, 94u8, + 136u8, 76u8, 60u8, 174u8, 197u8, 130u8, 138u8, 253u8, 239u8, 89u8, + 46u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reward_pools( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_reward_pools::CounterForRewardPools, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "CounterForRewardPools", + (), + [ + 218u8, 186u8, 28u8, 97u8, 205u8, 249u8, 187u8, 10u8, 127u8, 190u8, + 213u8, 152u8, 103u8, 20u8, 157u8, 183u8, 86u8, 104u8, 186u8, 236u8, + 84u8, 159u8, 117u8, 78u8, 5u8, 242u8, 193u8, 59u8, 112u8, 200u8, 34u8, + 166u8, + ], + ) + } + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a"] + #[doc = " bonded pool, hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::sub_pools_storage::SubPoolsStorage, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "SubPoolsStorage", + (), + [ + 43u8, 35u8, 94u8, 197u8, 201u8, 86u8, 21u8, 118u8, 230u8, 10u8, 66u8, + 180u8, 104u8, 146u8, 250u8, 207u8, 159u8, 153u8, 203u8, 58u8, 20u8, + 247u8, 102u8, 155u8, 47u8, 58u8, 136u8, 150u8, 167u8, 83u8, 81u8, 44u8, + ], + ) + } + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a"] + #[doc = " bonded pool, hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::sub_pools_storage::Param0, + >, + types::sub_pools_storage::SubPoolsStorage, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "SubPoolsStorage", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 43u8, 35u8, 94u8, 197u8, 201u8, 86u8, 21u8, 118u8, 230u8, 10u8, 66u8, + 180u8, 104u8, 146u8, 250u8, 207u8, 159u8, 153u8, 203u8, 58u8, 20u8, + 247u8, 102u8, 155u8, 47u8, 58u8, 136u8, 150u8, 167u8, 83u8, 81u8, 44u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_sub_pools_storage( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_sub_pools_storage::CounterForSubPoolsStorage, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "CounterForSubPoolsStorage", + (), + [ + 137u8, 162u8, 32u8, 44u8, 163u8, 30u8, 54u8, 158u8, 169u8, 118u8, + 196u8, 101u8, 78u8, 28u8, 184u8, 78u8, 185u8, 225u8, 226u8, 207u8, + 14u8, 119u8, 0u8, 116u8, 140u8, 141u8, 116u8, 106u8, 71u8, 161u8, + 200u8, 228u8, + ], + ) + } + #[doc = " Metadata for the pool."] + pub fn metadata_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::metadata::Metadata, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "Metadata", + (), + [ + 10u8, 171u8, 251u8, 5u8, 72u8, 74u8, 86u8, 144u8, 59u8, 67u8, 92u8, + 111u8, 217u8, 111u8, 175u8, 107u8, 119u8, 206u8, 199u8, 78u8, 182u8, + 84u8, 12u8, 102u8, 10u8, 124u8, 103u8, 9u8, 86u8, 199u8, 233u8, 54u8, + ], + ) + } + #[doc = " Metadata for the pool."] + pub fn metadata( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::metadata::Metadata, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "Metadata", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 10u8, 171u8, 251u8, 5u8, 72u8, 74u8, 86u8, 144u8, 59u8, 67u8, 92u8, + 111u8, 217u8, 111u8, 175u8, 107u8, 119u8, 206u8, 199u8, 78u8, 182u8, + 84u8, 12u8, 102u8, 10u8, 124u8, 103u8, 9u8, 86u8, 199u8, 233u8, 54u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_metadata( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_metadata::CounterForMetadata, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "CounterForMetadata", + (), + [ + 49u8, 76u8, 175u8, 236u8, 99u8, 120u8, 156u8, 116u8, 153u8, 173u8, + 10u8, 102u8, 194u8, 139u8, 25u8, 149u8, 109u8, 195u8, 150u8, 21u8, + 43u8, 24u8, 196u8, 180u8, 231u8, 101u8, 69u8, 98u8, 82u8, 159u8, 183u8, + 174u8, + ], + ) + } + #[doc = " Ever increasing number of all pools created so far."] + pub fn last_pool_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::last_pool_id::LastPoolId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "LastPoolId", + (), + [ + 178u8, 198u8, 245u8, 157u8, 176u8, 45u8, 214u8, 86u8, 73u8, 154u8, + 217u8, 39u8, 191u8, 53u8, 233u8, 145u8, 57u8, 100u8, 31u8, 13u8, 202u8, + 122u8, 115u8, 16u8, 205u8, 69u8, 157u8, 250u8, 216u8, 180u8, 113u8, + 30u8, + ], + ) + } + #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = ""] + #[doc = " This is only used for slashing and on automatic withdraw update. In all other instances, the"] + #[doc = " pool id is used, and the accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reverse_pool_id_lookup::ReversePoolIdLookup, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "ReversePoolIdLookup", + (), + [ + 76u8, 76u8, 150u8, 33u8, 64u8, 81u8, 90u8, 75u8, 212u8, 221u8, 59u8, + 83u8, 178u8, 45u8, 86u8, 206u8, 196u8, 221u8, 117u8, 94u8, 229u8, + 160u8, 52u8, 54u8, 11u8, 64u8, 0u8, 103u8, 85u8, 86u8, 5u8, 71u8, + ], + ) + } + #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = ""] + #[doc = " This is only used for slashing and on automatic withdraw update. In all other instances, the"] + #[doc = " pool id is used, and the accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::reverse_pool_id_lookup::Param0, + >, + types::reverse_pool_id_lookup::ReversePoolIdLookup, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "ReversePoolIdLookup", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 76u8, 76u8, 150u8, 33u8, 64u8, 81u8, 90u8, 75u8, 212u8, 221u8, 59u8, + 83u8, 178u8, 45u8, 86u8, 206u8, 196u8, 221u8, 117u8, 94u8, 229u8, + 160u8, 52u8, 54u8, 11u8, 64u8, 0u8, 103u8, 85u8, 86u8, 5u8, 71u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reverse_pool_id_lookup( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_reverse_pool_id_lookup::CounterForReversePoolIdLookup, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "CounterForReversePoolIdLookup", + (), + [ + 135u8, 72u8, 203u8, 197u8, 101u8, 135u8, 114u8, 202u8, 122u8, 231u8, + 128u8, 17u8, 81u8, 70u8, 22u8, 146u8, 100u8, 138u8, 16u8, 74u8, 31u8, + 250u8, 110u8, 184u8, 250u8, 75u8, 249u8, 71u8, 171u8, 77u8, 95u8, + 251u8, + ], + ) + } + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::claim_permissions::ClaimPermissions, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "ClaimPermissions", + (), + [ + 127u8, 58u8, 154u8, 103u8, 97u8, 80u8, 68u8, 18u8, 167u8, 41u8, 93u8, + 100u8, 94u8, 81u8, 82u8, 98u8, 13u8, 162u8, 122u8, 199u8, 216u8, 139u8, + 238u8, 97u8, 174u8, 102u8, 11u8, 250u8, 247u8, 174u8, 185u8, 134u8, + ], + ) + } + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::claim_permissions::Param0, + >, + types::claim_permissions::ClaimPermissions, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "NominationPools", + "ClaimPermissions", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 127u8, 58u8, 154u8, 103u8, 97u8, 80u8, 68u8, 18u8, 167u8, 41u8, 93u8, + 100u8, 94u8, 81u8, 82u8, 98u8, 13u8, 162u8, 122u8, 199u8, 216u8, 139u8, + 238u8, 97u8, 174u8, 102u8, 11u8, 250u8, 247u8, 174u8, 185u8, 134u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The nomination pool's pallet id."] + pub fn pallet_id( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "NominationPools", + "PalletId", + [ + 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, + 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, + 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, + ], + ) + } + #[doc = " The maximum pool points-to-balance ratio that an `open` pool can have."] + #[doc = ""] + #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] + #[doc = " ratio becomes disproportional."] + #[doc = ""] + #[doc = " Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations"] + #[doc = " are a function of number of points, and by setting this value to e.g. 10, you ensure"] + #[doc = " that the total number of points in the system are at most 10 times the total_issuance of"] + #[doc = " the chain, in the absolute worse case."] + #[doc = ""] + #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] + #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] + pub fn max_points_to_balance( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u8> { + ::subxt_core::constants::address::StaticAddress::new_static( + "NominationPools", + "MaxPointsToBalance", + [ + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, + ], + ) + } + #[doc = " The maximum number of simultaneous unbonding chunks that can exist per member."] + pub fn max_unbonding( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "NominationPools", + "MaxUnbonding", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod scheduler { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_scheduler::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_scheduler::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Anonymously schedule a task."] + pub struct Schedule { + pub when: schedule::When, + pub maybe_periodic: schedule::MaybePeriodic, + pub priority: schedule::Priority, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod schedule { + use super::runtime_types; + pub type When = ::core::primitive::u64; + pub type MaybePeriodic = + ::core::option::Option<(::core::primitive::u64, ::core::primitive::u32)>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for Schedule { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel an anonymously scheduled task."] + pub struct Cancel { + pub when: cancel::When, + pub index: cancel::Index, + } + pub mod cancel { + use super::runtime_types; + pub type When = ::core::primitive::u64; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Cancel { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule a named task."] + pub struct ScheduleNamed { + pub id: schedule_named::Id, + pub when: schedule_named::When, + pub maybe_periodic: schedule_named::MaybePeriodic, + pub priority: schedule_named::Priority, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod schedule_named { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + pub type When = ::core::primitive::u64; + pub type MaybePeriodic = + ::core::option::Option<(::core::primitive::u64, ::core::primitive::u32)>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule_named"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a named scheduled task."] + pub struct CancelNamed { + pub id: cancel_named::Id, + } + pub mod cancel_named { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel_named"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Anonymously schedule a task after a delay."] + pub struct ScheduleAfter { + pub after: schedule_after::After, + pub maybe_periodic: schedule_after::MaybePeriodic, + pub priority: schedule_after::Priority, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod schedule_after { + use super::runtime_types; + pub type After = ::core::primitive::u64; + pub type MaybePeriodic = + ::core::option::Option<(::core::primitive::u64, ::core::primitive::u32)>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleAfter { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule_after"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedule a named task after a delay."] + pub struct ScheduleNamedAfter { + pub id: schedule_named_after::Id, + pub after: schedule_named_after::After, + pub maybe_periodic: schedule_named_after::MaybePeriodic, + pub priority: schedule_named_after::Priority, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod schedule_named_after { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + pub type After = ::core::primitive::u64; + pub type MaybePeriodic = + ::core::option::Option<(::core::primitive::u64, ::core::primitive::u32)>; + pub type Priority = ::core::primitive::u8; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleNamedAfter { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "schedule_named_after"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] + #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] + #[doc = "succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub struct SetRetry { + pub task: set_retry::Task, + pub retries: set_retry::Retries, + pub period: set_retry::Period, + } + pub mod set_retry { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Retries = ::core::primitive::u8; + pub type Period = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetRetry { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "set_retry"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] + #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] + #[doc = "it succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub struct SetRetryNamed { + pub id: set_retry_named::Id, + pub retries: set_retry_named::Retries, + pub period: set_retry_named::Period, + } + pub mod set_retry_named { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + pub type Retries = ::core::primitive::u8; + pub type Period = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetRetryNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "set_retry_named"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Removes the retry configuration of a task."] + pub struct CancelRetry { + pub task: cancel_retry::Task, + } + pub mod cancel_retry { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelRetry { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel_retry"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel the retry configuration of a named task."] + pub struct CancelRetryNamed { + pub id: cancel_retry_named::Id, + } + pub mod cancel_retry_named { + use super::runtime_types; + pub type Id = [::core::primitive::u8; 32usize]; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelRetryNamed { + const PALLET: &'static str = "Scheduler"; + const CALL: &'static str = "cancel_retry_named"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Anonymously schedule a task."] + pub fn schedule( + &self, + when: types::schedule::When, + maybe_periodic: types::schedule::MaybePeriodic, + priority: types::schedule::Priority, + call: types::schedule::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "schedule", + types::Schedule { + when, + maybe_periodic, + priority, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 182u8, 29u8, 121u8, 91u8, 228u8, 198u8, 65u8, 61u8, 226u8, 108u8, 5u8, + 101u8, 170u8, 21u8, 20u8, 236u8, 61u8, 219u8, 70u8, 41u8, 76u8, 126u8, + 41u8, 217u8, 204u8, 139u8, 7u8, 166u8, 142u8, 133u8, 84u8, 136u8, + ], + ) + } + #[doc = "Cancel an anonymously scheduled task."] + pub fn cancel( + &self, + when: types::cancel::When, + index: types::cancel::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "cancel", + types::Cancel { when, index }, + [ + 162u8, 37u8, 210u8, 217u8, 171u8, 208u8, 224u8, 159u8, 153u8, 51u8, + 217u8, 80u8, 202u8, 244u8, 51u8, 32u8, 117u8, 141u8, 231u8, 215u8, + 212u8, 30u8, 93u8, 8u8, 226u8, 199u8, 216u8, 217u8, 100u8, 99u8, 169u8, + 73u8, + ], + ) + } + #[doc = "Schedule a named task."] + pub fn schedule_named( + &self, + id: types::schedule_named::Id, + when: types::schedule_named::When, + maybe_periodic: types::schedule_named::MaybePeriodic, + priority: types::schedule_named::Priority, + call: types::schedule_named::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "schedule_named", + types::ScheduleNamed { + id, + when, + maybe_periodic, + priority, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 208u8, 171u8, 97u8, 226u8, 98u8, 215u8, 158u8, 70u8, 91u8, 32u8, 238u8, + 83u8, 17u8, 47u8, 110u8, 71u8, 36u8, 109u8, 37u8, 222u8, 39u8, 198u8, + 92u8, 60u8, 43u8, 151u8, 134u8, 156u8, 199u8, 254u8, 27u8, 63u8, + ], + ) + } + #[doc = "Cancel a named scheduled task."] + pub fn cancel_named( + &self, + id: types::cancel_named::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "cancel_named", + types::CancelNamed { id }, + [ + 205u8, 35u8, 28u8, 57u8, 224u8, 7u8, 49u8, 233u8, 236u8, 163u8, 93u8, + 236u8, 103u8, 69u8, 65u8, 51u8, 121u8, 84u8, 9u8, 196u8, 147u8, 122u8, + 227u8, 200u8, 181u8, 233u8, 62u8, 240u8, 174u8, 83u8, 129u8, 193u8, + ], + ) + } + #[doc = "Anonymously schedule a task after a delay."] + pub fn schedule_after( + &self, + after: types::schedule_after::After, + maybe_periodic: types::schedule_after::MaybePeriodic, + priority: types::schedule_after::Priority, + call: types::schedule_after::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "schedule_after", + types::ScheduleAfter { + after, + maybe_periodic, + priority, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 238u8, 160u8, 7u8, 38u8, 103u8, 96u8, 154u8, 202u8, 35u8, 32u8, 30u8, + 104u8, 119u8, 184u8, 71u8, 16u8, 117u8, 169u8, 27u8, 144u8, 249u8, + 38u8, 65u8, 242u8, 238u8, 48u8, 12u8, 201u8, 123u8, 25u8, 169u8, 124u8, + ], + ) + } + #[doc = "Schedule a named task after a delay."] + pub fn schedule_named_after( + &self, + id: types::schedule_named_after::Id, + after: types::schedule_named_after::After, + maybe_periodic: types::schedule_named_after::MaybePeriodic, + priority: types::schedule_named_after::Priority, + call: types::schedule_named_after::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "schedule_named_after", + types::ScheduleNamedAfter { + id, + after, + maybe_periodic, + priority, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 209u8, 199u8, 11u8, 97u8, 242u8, 161u8, 238u8, 230u8, 90u8, 157u8, 5u8, + 58u8, 148u8, 213u8, 248u8, 72u8, 133u8, 138u8, 178u8, 11u8, 56u8, 69u8, + 250u8, 161u8, 71u8, 11u8, 143u8, 107u8, 7u8, 62u8, 8u8, 77u8, + ], + ) + } + #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] + #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] + #[doc = "succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub fn set_retry( + &self, + task: types::set_retry::Task, + retries: types::set_retry::Retries, + period: types::set_retry::Period, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "set_retry", + types::SetRetry { task, retries, period }, + [ + 141u8, 127u8, 140u8, 59u8, 49u8, 27u8, 68u8, 94u8, 172u8, 128u8, 117u8, + 109u8, 133u8, 232u8, 217u8, 191u8, 243u8, 61u8, 123u8, 98u8, 72u8, + 28u8, 28u8, 248u8, 51u8, 153u8, 34u8, 199u8, 101u8, 81u8, 114u8, 197u8, + ], + ) + } + #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] + #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] + #[doc = "it succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + pub fn set_retry_named( + &self, + id: types::set_retry_named::Id, + retries: types::set_retry_named::Retries, + period: types::set_retry_named::Period, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "set_retry_named", + types::SetRetryNamed { id, retries, period }, + [ + 212u8, 211u8, 252u8, 200u8, 203u8, 195u8, 137u8, 109u8, 94u8, 157u8, + 179u8, 143u8, 214u8, 195u8, 220u8, 154u8, 97u8, 125u8, 99u8, 146u8, + 70u8, 80u8, 81u8, 243u8, 99u8, 68u8, 0u8, 31u8, 252u8, 117u8, 107u8, + 125u8, + ], + ) + } + #[doc = "Removes the retry configuration of a task."] + pub fn cancel_retry( + &self, + task: types::cancel_retry::Task, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "cancel_retry", + types::CancelRetry { task }, + [ + 117u8, 113u8, 9u8, 5u8, 1u8, 107u8, 63u8, 82u8, 139u8, 110u8, 230u8, + 112u8, 64u8, 158u8, 224u8, 56u8, 183u8, 39u8, 82u8, 0u8, 204u8, 220u8, + 139u8, 182u8, 37u8, 156u8, 180u8, 120u8, 143u8, 252u8, 3u8, 236u8, + ], + ) + } + #[doc = "Cancel the retry configuration of a named task."] + pub fn cancel_retry_named( + &self, + id: types::cancel_retry_named::Id, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Scheduler", + "cancel_retry_named", + types::CancelRetryNamed { id }, + [ + 76u8, 157u8, 253u8, 113u8, 162u8, 54u8, 98u8, 21u8, 62u8, 44u8, 155u8, + 202u8, 2u8, 28u8, 153u8, 219u8, 67u8, 166u8, 206u8, 79u8, 139u8, 3u8, + 119u8, 182u8, 254u8, 134u8, 143u8, 121u8, 155u8, 220u8, 192u8, 209u8, + ], + ) + } + } + } + #[doc = "Events type."] + pub type Event = runtime_types::pallet_scheduler::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Scheduled some task."] + pub struct Scheduled { + pub when: scheduled::When, + pub index: scheduled::Index, + } + pub mod scheduled { + use super::runtime_types; + pub type When = ::core::primitive::u64; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Scheduled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Scheduled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Canceled some task."] + pub struct Canceled { + pub when: canceled::When, + pub index: canceled::Index, + } + pub mod canceled { + use super::runtime_types; + pub type When = ::core::primitive::u64; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Canceled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Canceled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispatched some task."] + pub struct Dispatched { + pub task: dispatched::Task, + pub id: dispatched::Id, + pub result: dispatched::Result, + } + pub mod dispatched { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for Dispatched { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "Dispatched"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a retry configuration for some task."] + pub struct RetrySet { + pub task: retry_set::Task, + pub id: retry_set::Id, + pub period: retry_set::Period, + pub retries: retry_set::Retries, + } + pub mod retry_set { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + pub type Period = ::core::primitive::u64; + pub type Retries = ::core::primitive::u8; + } + impl ::subxt_core::events::StaticEvent for RetrySet { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "RetrySet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a retry configuration for some task."] + pub struct RetryCancelled { + pub task: retry_cancelled::Task, + pub id: retry_cancelled::Id, + } + pub mod retry_cancelled { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt_core::events::StaticEvent for RetryCancelled { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "RetryCancelled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The call for the provided hash was not found so the task has been aborted."] + pub struct CallUnavailable { + pub task: call_unavailable::Task, + pub id: call_unavailable::Id, + } + pub mod call_unavailable { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt_core::events::StaticEvent for CallUnavailable { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "CallUnavailable"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The given task was unable to be renewed since the agenda is full at that block."] + pub struct PeriodicFailed { + pub task: periodic_failed::Task, + pub id: periodic_failed::Id, + } + pub mod periodic_failed { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt_core::events::StaticEvent for PeriodicFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PeriodicFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The given task was unable to be retried since the agenda is full at that block or there"] + #[doc = "was not enough weight to reschedule it."] + pub struct RetryFailed { + pub task: retry_failed::Task, + pub id: retry_failed::Id, + } + pub mod retry_failed { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt_core::events::StaticEvent for RetryFailed { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "RetryFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The given task can never be executed since it is overweight."] + pub struct PermanentlyOverweight { + pub task: permanently_overweight::Task, + pub id: permanently_overweight::Id, + } + pub mod permanently_overweight { + use super::runtime_types; + pub type Task = (::core::primitive::u64, ::core::primitive::u32); + pub type Id = ::core::option::Option<[::core::primitive::u8; 32usize]>; + } + impl ::subxt_core::events::StaticEvent for PermanentlyOverweight { + const PALLET: &'static str = "Scheduler"; + const EVENT: &'static str = "PermanentlyOverweight"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod incomplete_since { + use super::runtime_types; + pub type IncompleteSince = ::core::primitive::u64; + } + pub mod agenda { + use super::runtime_types; + pub type Agenda = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_scheduler::Scheduled< + [::core::primitive::u8; 32usize], + runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + ::core::primitive::u64, + runtime_types::tangle_testnet_runtime::OriginCaller, + ::subxt_core::utils::AccountId32, + >, + >, + >; + pub type Param0 = ::core::primitive::u64; + } + pub mod retries { + use super::runtime_types; + pub type Retries = + runtime_types::pallet_scheduler::RetryConfig<::core::primitive::u64>; + pub type Param0 = ::core::primitive::u64; + pub type Param1 = ::core::primitive::u32; + } + pub mod lookup { + use super::runtime_types; + pub type Lookup = (::core::primitive::u64, ::core::primitive::u32); + pub type Param0 = [::core::primitive::u8; 32usize]; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn incomplete_since( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::incomplete_since::IncompleteSince, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "IncompleteSince", + (), + [ + 185u8, 100u8, 100u8, 209u8, 239u8, 6u8, 107u8, 78u8, 195u8, 194u8, + 227u8, 80u8, 234u8, 161u8, 95u8, 15u8, 81u8, 192u8, 231u8, 245u8, 94u8, + 199u8, 129u8, 171u8, 124u8, 118u8, 13u8, 66u8, 50u8, 193u8, 74u8, + 229u8, + ], + ) + } + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::agenda::Agenda, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Agenda", + (), + [ + 207u8, 229u8, 12u8, 111u8, 82u8, 163u8, 230u8, 234u8, 172u8, 240u8, + 41u8, 179u8, 64u8, 235u8, 253u8, 139u8, 75u8, 150u8, 218u8, 97u8, + 123u8, 252u8, 91u8, 74u8, 17u8, 60u8, 66u8, 229u8, 84u8, 153u8, 164u8, + 160u8, + ], + ) + } + #[doc = " Items to be executed, indexed by the block number that they should be executed on."] + pub fn agenda( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::agenda::Agenda, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Agenda", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 207u8, 229u8, 12u8, 111u8, 82u8, 163u8, 230u8, 234u8, 172u8, 240u8, + 41u8, 179u8, 64u8, 235u8, 253u8, 139u8, 75u8, 150u8, 218u8, 97u8, + 123u8, 252u8, 91u8, 74u8, 17u8, 60u8, 66u8, 229u8, 84u8, 153u8, 164u8, + 160u8, + ], + ) + } + #[doc = " Retry configurations for items to be executed, indexed by task address."] + pub fn retries_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::retries::Retries, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Retries", + (), + [ + 226u8, 140u8, 93u8, 197u8, 220u8, 2u8, 34u8, 112u8, 64u8, 9u8, 110u8, + 98u8, 192u8, 87u8, 138u8, 168u8, 186u8, 72u8, 27u8, 14u8, 187u8, 75u8, + 219u8, 119u8, 211u8, 224u8, 212u8, 196u8, 127u8, 117u8, 69u8, 82u8, + ], + ) + } + #[doc = " Retry configurations for items to be executed, indexed by task address."] + pub fn retries_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::retries::Retries, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Retries", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 226u8, 140u8, 93u8, 197u8, 220u8, 2u8, 34u8, 112u8, 64u8, 9u8, 110u8, + 98u8, 192u8, 87u8, 138u8, 168u8, 186u8, 72u8, 27u8, 14u8, 187u8, 75u8, + 219u8, 119u8, 211u8, 224u8, 212u8, 196u8, 127u8, 117u8, 69u8, 82u8, + ], + ) + } + #[doc = " Retry configurations for items to be executed, indexed by task address."] + pub fn retries( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::retries::Retries, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Retries", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 226u8, 140u8, 93u8, 197u8, 220u8, 2u8, 34u8, 112u8, 64u8, 9u8, 110u8, + 98u8, 192u8, 87u8, 138u8, 168u8, 186u8, 72u8, 27u8, 14u8, 187u8, 75u8, + 219u8, 119u8, 211u8, 224u8, 212u8, 196u8, 127u8, 117u8, 69u8, 82u8, + ], + ) + } + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::lookup::Lookup, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Lookup", + (), + [ + 43u8, 113u8, 203u8, 163u8, 123u8, 137u8, 242u8, 150u8, 151u8, 218u8, + 249u8, 222u8, 109u8, 245u8, 242u8, 112u8, 45u8, 96u8, 67u8, 162u8, + 205u8, 33u8, 159u8, 36u8, 115u8, 212u8, 213u8, 189u8, 237u8, 54u8, + 139u8, 56u8, + ], + ) + } + #[doc = " Lookup from a name to the block number and index of the task."] + #[doc = ""] + #[doc = " For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4"] + #[doc = " identities."] + pub fn lookup( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::lookup::Lookup, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Scheduler", + "Lookup", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 43u8, 113u8, 203u8, 163u8, 123u8, 137u8, 242u8, 150u8, 151u8, 218u8, + 249u8, 222u8, 109u8, 245u8, 242u8, 112u8, 45u8, 96u8, 67u8, 162u8, + 205u8, 33u8, 159u8, 36u8, 115u8, 212u8, 213u8, 189u8, 237u8, 54u8, + 139u8, 56u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum weight that may be scheduled per block for any dispatchables."] + pub fn maximum_weight( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::sp_weights::weight_v2::Weight, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Scheduler", + "MaximumWeight", + [ + 149u8, 252u8, 129u8, 80u8, 169u8, 36u8, 79u8, 127u8, 240u8, 156u8, + 56u8, 202u8, 219u8, 86u8, 5u8, 65u8, 245u8, 148u8, 138u8, 243u8, 210u8, + 128u8, 234u8, 216u8, 240u8, 219u8, 123u8, 235u8, 21u8, 158u8, 237u8, + 112u8, + ], + ) + } + #[doc = " The maximum number of scheduled calls in the queue for a single block."] + #[doc = ""] + #[doc = " NOTE:"] + #[doc = " + Dependent pallets' benchmarks might require a higher limit for the setting. Set a"] + #[doc = " higher limit under `runtime-benchmarks` feature."] + pub fn max_scheduled_per_block( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Scheduler", + "MaxScheduledPerBlock", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod preimage { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_preimage::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_preimage::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub struct NotePreimage { + pub bytes: note_preimage::Bytes, + } + pub mod note_preimage { + use super::runtime_types; + pub type Bytes = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for NotePreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "note_preimage"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub struct UnnotePreimage { + pub hash: unnote_preimage::Hash, + } + pub mod unnote_preimage { + use super::runtime_types; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for UnnotePreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "unnote_preimage"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub struct RequestPreimage { + pub hash: request_preimage::Hash, + } + pub mod request_preimage { + use super::runtime_types; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for RequestPreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "request_preimage"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub struct UnrequestPreimage { + pub hash: unrequest_preimage::Hash, + } + pub mod unrequest_preimage { + use super::runtime_types; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for UnrequestPreimage { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "unrequest_preimage"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Ensure that the a bulk of pre-images is upgraded."] + #[doc = ""] + #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] + pub struct EnsureUpdated { + pub hashes: ensure_updated::Hashes, + } + pub mod ensure_updated { + use super::runtime_types; + pub type Hashes = ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>; + } + impl ::subxt_core::blocks::StaticExtrinsic for EnsureUpdated { + const PALLET: &'static str = "Preimage"; + const CALL: &'static str = "ensure_updated"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + pub fn note_preimage( + &self, + bytes: types::note_preimage::Bytes, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "note_preimage", + types::NotePreimage { bytes }, + [ + 121u8, 88u8, 18u8, 92u8, 176u8, 15u8, 192u8, 198u8, 146u8, 198u8, 38u8, + 242u8, 213u8, 83u8, 7u8, 230u8, 14u8, 110u8, 235u8, 32u8, 215u8, 26u8, + 192u8, 217u8, 113u8, 224u8, 206u8, 96u8, 177u8, 198u8, 246u8, 33u8, + ], + ) + } + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + pub fn unnote_preimage( + &self, + hash: types::unnote_preimage::Hash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "unnote_preimage", + types::UnnotePreimage { hash }, + [ + 188u8, 116u8, 222u8, 22u8, 127u8, 215u8, 2u8, 133u8, 96u8, 202u8, + 190u8, 123u8, 203u8, 43u8, 200u8, 161u8, 226u8, 24u8, 49u8, 36u8, + 221u8, 160u8, 130u8, 119u8, 30u8, 138u8, 144u8, 85u8, 5u8, 164u8, + 252u8, 222u8, + ], + ) + } + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + pub fn request_preimage( + &self, + hash: types::request_preimage::Hash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "request_preimage", + types::RequestPreimage { hash }, + [ + 87u8, 0u8, 204u8, 111u8, 43u8, 115u8, 64u8, 209u8, 133u8, 13u8, 83u8, + 45u8, 164u8, 166u8, 233u8, 105u8, 242u8, 238u8, 235u8, 208u8, 113u8, + 134u8, 93u8, 242u8, 86u8, 32u8, 7u8, 152u8, 107u8, 208u8, 79u8, 59u8, + ], + ) + } + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + pub fn unrequest_preimage( + &self, + hash: types::unrequest_preimage::Hash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "unrequest_preimage", + types::UnrequestPreimage { hash }, + [ + 55u8, 37u8, 224u8, 149u8, 142u8, 120u8, 8u8, 68u8, 183u8, 225u8, 255u8, + 240u8, 254u8, 111u8, 58u8, 200u8, 113u8, 217u8, 177u8, 203u8, 107u8, + 104u8, 233u8, 87u8, 252u8, 53u8, 33u8, 112u8, 116u8, 254u8, 117u8, + 134u8, + ], + ) + } + #[doc = "Ensure that the a bulk of pre-images is upgraded."] + #[doc = ""] + #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] + pub fn ensure_updated( + &self, + hashes: types::ensure_updated::Hashes, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Preimage", + "ensure_updated", + types::EnsureUpdated { hashes }, + [ + 254u8, 228u8, 88u8, 44u8, 126u8, 235u8, 188u8, 153u8, 61u8, 27u8, + 103u8, 253u8, 163u8, 161u8, 113u8, 243u8, 87u8, 136u8, 2u8, 231u8, + 209u8, 188u8, 215u8, 106u8, 192u8, 225u8, 75u8, 125u8, 224u8, 96u8, + 221u8, 90u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_preimage::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A preimage has been noted."] + pub struct Noted { + pub hash: noted::Hash, + } + pub mod noted { + use super::runtime_types; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Noted { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Noted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A preimage has been requested."] + pub struct Requested { + pub hash: requested::Hash, + } + pub mod requested { + use super::runtime_types; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Requested { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Requested"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A preimage has ben cleared."] + pub struct Cleared { + pub hash: cleared::Hash, + } + pub mod cleared { + use super::runtime_types; + pub type Hash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Cleared { + const PALLET: &'static str = "Preimage"; + const EVENT: &'static str = "Cleared"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod status_for { + use super::runtime_types; + pub type StatusFor = runtime_types::pallet_preimage::OldRequestStatus< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod request_status_for { + use super::runtime_types; + pub type RequestStatusFor = runtime_types::pallet_preimage::RequestStatus< + ::subxt_core::utils::AccountId32, + (), + >; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod preimage_for { + use super::runtime_types; + pub type PreimageFor = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = ::subxt_core::utils::H256; + pub type Param1 = ::core::primitive::u32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The request status of a given hash."] + pub fn status_for_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::status_for::StatusFor, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "StatusFor", + (), + [ + 187u8, 100u8, 54u8, 112u8, 96u8, 129u8, 36u8, 149u8, 127u8, 226u8, + 126u8, 171u8, 72u8, 189u8, 59u8, 126u8, 204u8, 125u8, 67u8, 204u8, + 231u8, 6u8, 212u8, 135u8, 166u8, 252u8, 5u8, 46u8, 111u8, 120u8, 54u8, + 209u8, + ], + ) + } + #[doc = " The request status of a given hash."] + pub fn status_for( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::status_for::StatusFor, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "StatusFor", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 187u8, 100u8, 54u8, 112u8, 96u8, 129u8, 36u8, 149u8, 127u8, 226u8, + 126u8, 171u8, 72u8, 189u8, 59u8, 126u8, 204u8, 125u8, 67u8, 204u8, + 231u8, 6u8, 212u8, 135u8, 166u8, 252u8, 5u8, 46u8, 111u8, 120u8, 54u8, + 209u8, + ], + ) + } + #[doc = " The request status of a given hash."] + pub fn request_status_for_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::request_status_for::RequestStatusFor, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "RequestStatusFor", + (), + [ + 60u8, 36u8, 88u8, 121u8, 15u8, 71u8, 245u8, 91u8, 235u8, 58u8, 109u8, + 17u8, 249u8, 135u8, 4u8, 132u8, 170u8, 173u8, 142u8, 101u8, 167u8, + 86u8, 125u8, 175u8, 4u8, 54u8, 226u8, 173u8, 20u8, 39u8, 242u8, 96u8, + ], + ) + } + #[doc = " The request status of a given hash."] + pub fn request_status_for( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::request_status_for::Param0, + >, + types::request_status_for::RequestStatusFor, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "RequestStatusFor", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 60u8, 36u8, 88u8, 121u8, 15u8, 71u8, 245u8, 91u8, 235u8, 58u8, 109u8, + 17u8, 249u8, 135u8, 4u8, 132u8, 170u8, 173u8, 142u8, 101u8, 167u8, + 86u8, 125u8, 175u8, 4u8, 54u8, 226u8, 173u8, 20u8, 39u8, 242u8, 96u8, + ], + ) + } + pub fn preimage_for_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::preimage_for::PreimageFor, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "PreimageFor", + (), + [ + 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, + 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, + 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, + 139u8, + ], + ) + } + pub fn preimage_for_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::preimage_for::PreimageFor, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "PreimageFor", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, + 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, + 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, + 139u8, + ], + ) + } + pub fn preimage_for( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::preimage_for::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::preimage_for::Param1, + >, + ), + types::preimage_for::PreimageFor, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Preimage", + "PreimageFor", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 106u8, 5u8, 17u8, 46u8, 6u8, 184u8, 177u8, 113u8, 169u8, 34u8, 119u8, + 141u8, 117u8, 40u8, 30u8, 94u8, 187u8, 35u8, 206u8, 216u8, 143u8, + 208u8, 49u8, 156u8, 200u8, 255u8, 109u8, 200u8, 210u8, 134u8, 24u8, + 139u8, + ], + ) + } + } + } + } + pub mod offences { + use super::root_mod; + use super::runtime_types; + #[doc = "Events type."] + pub type Event = runtime_types::pallet_offences::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] + #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] + #[doc = "\\[kind, timeslot\\]."] + pub struct Offence { + pub kind: offence::Kind, + pub timeslot: offence::Timeslot, + } + pub mod offence { + use super::runtime_types; + pub type Kind = [::core::primitive::u8; 16usize]; + pub type Timeslot = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::events::StaticEvent for Offence { + const PALLET: &'static str = "Offences"; + const EVENT: &'static str = "Offence"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod reports { + use super::runtime_types; + pub type Reports = runtime_types::sp_staking::offence::OffenceDetails< + ::subxt_core::utils::AccountId32, + ( + ::subxt_core::utils::AccountId32, + runtime_types::sp_staking::Exposure< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >, + ), + >; + pub type Param0 = ::subxt_core::utils::H256; + } + pub mod concurrent_reports_index { + use super::runtime_types; + pub type ConcurrentReportsIndex = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>; + pub type Param0 = [::core::primitive::u8; 16usize]; + pub type Param1 = [::core::primitive::u8]; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The primary structure that holds all offence records keyed by report identifiers."] + pub fn reports_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reports::Reports, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Offences", + "Reports", + (), + [ + 140u8, 14u8, 199u8, 180u8, 83u8, 5u8, 23u8, 57u8, 241u8, 41u8, 240u8, + 35u8, 80u8, 12u8, 115u8, 16u8, 2u8, 15u8, 22u8, 77u8, 25u8, 92u8, + 100u8, 39u8, 226u8, 55u8, 240u8, 80u8, 190u8, 196u8, 234u8, 177u8, + ], + ) + } + #[doc = " The primary structure that holds all offence records keyed by report identifiers."] + pub fn reports( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::reports::Reports, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Offences", + "Reports", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 140u8, 14u8, 199u8, 180u8, 83u8, 5u8, 23u8, 57u8, 241u8, 41u8, 240u8, + 35u8, 80u8, 12u8, 115u8, 16u8, 2u8, 15u8, 22u8, 77u8, 25u8, 92u8, + 100u8, 39u8, 226u8, 55u8, 240u8, 80u8, 190u8, 196u8, 234u8, 177u8, + ], + ) + } + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::concurrent_reports_index::ConcurrentReportsIndex, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Offences", + "ConcurrentReportsIndex", + (), + [ + 170u8, 186u8, 72u8, 29u8, 251u8, 38u8, 193u8, 195u8, 109u8, 86u8, 0u8, + 241u8, 20u8, 235u8, 108u8, 126u8, 215u8, 82u8, 73u8, 113u8, 199u8, + 138u8, 24u8, 58u8, 216u8, 72u8, 221u8, 232u8, 252u8, 244u8, 96u8, + 247u8, + ], + ) + } + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::concurrent_reports_index::Param0, + >, + types::concurrent_reports_index::ConcurrentReportsIndex, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Offences", + "ConcurrentReportsIndex", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 170u8, 186u8, 72u8, 29u8, 251u8, 38u8, 193u8, 195u8, 109u8, 86u8, 0u8, + 241u8, 20u8, 235u8, 108u8, 126u8, 215u8, 82u8, 73u8, 113u8, 199u8, + 138u8, 24u8, 58u8, 216u8, 72u8, 221u8, 232u8, 252u8, 244u8, 96u8, + 247u8, + ], + ) + } + #[doc = " A vector of reports of the same kind that happened at the same time slot."] + pub fn concurrent_reports_index( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::concurrent_reports_index::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::concurrent_reports_index::Param1, + >, + ), + types::concurrent_reports_index::ConcurrentReportsIndex, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Offences", + "ConcurrentReportsIndex", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 170u8, 186u8, 72u8, 29u8, 251u8, 38u8, 193u8, 195u8, 109u8, 86u8, 0u8, + 241u8, 20u8, 235u8, 108u8, 126u8, 215u8, 82u8, 73u8, 113u8, 199u8, + 138u8, 24u8, 58u8, 216u8, 72u8, 221u8, 232u8, 252u8, 244u8, 96u8, + 247u8, + ], + ) + } + } + } + } + pub mod tx_pause { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_tx_pause::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_tx_pause::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pause a call."] + #[doc = ""] + #[doc = "Can only be called by [`Config::PauseOrigin`]."] + #[doc = "Emits an [`Event::CallPaused`] event on success."] + pub struct Pause { + pub full_name: pause::FullName, + } + pub mod pause { + use super::runtime_types; + pub type FullName = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ); + } + impl ::subxt_core::blocks::StaticExtrinsic for Pause { + const PALLET: &'static str = "TxPause"; + const CALL: &'static str = "pause"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Un-pause a call."] + #[doc = ""] + #[doc = "Can only be called by [`Config::UnpauseOrigin`]."] + #[doc = "Emits an [`Event::CallUnpaused`] event on success."] + pub struct Unpause { + pub ident: unpause::Ident, + } + pub mod unpause { + use super::runtime_types; + pub type Ident = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ); + } + impl ::subxt_core::blocks::StaticExtrinsic for Unpause { + const PALLET: &'static str = "TxPause"; + const CALL: &'static str = "unpause"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Pause a call."] + #[doc = ""] + #[doc = "Can only be called by [`Config::PauseOrigin`]."] + #[doc = "Emits an [`Event::CallPaused`] event on success."] + pub fn pause( + &self, + full_name: types::pause::FullName, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "TxPause", + "pause", + types::Pause { full_name }, + [ + 244u8, 112u8, 104u8, 148u8, 17u8, 164u8, 228u8, 229u8, 103u8, 212u8, + 137u8, 16u8, 194u8, 167u8, 150u8, 148u8, 151u8, 233u8, 15u8, 2u8, 54u8, + 96u8, 158u8, 43u8, 222u8, 128u8, 199u8, 87u8, 74u8, 38u8, 6u8, 215u8, + ], + ) + } + #[doc = "Un-pause a call."] + #[doc = ""] + #[doc = "Can only be called by [`Config::UnpauseOrigin`]."] + #[doc = "Emits an [`Event::CallUnpaused`] event on success."] + pub fn unpause( + &self, + ident: types::unpause::Ident, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "TxPause", + "unpause", + types::Unpause { ident }, + [ + 213u8, 245u8, 75u8, 131u8, 24u8, 188u8, 101u8, 168u8, 39u8, 246u8, + 228u8, 155u8, 255u8, 146u8, 245u8, 218u8, 68u8, 102u8, 75u8, 133u8, + 54u8, 142u8, 191u8, 87u8, 148u8, 59u8, 99u8, 11u8, 33u8, 184u8, 24u8, + 179u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_tx_pause::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "This pallet, or a specific call is now paused."] + pub struct CallPaused { + pub full_name: call_paused::FullName, + } + pub mod call_paused { + use super::runtime_types; + pub type FullName = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ); + } + impl ::subxt_core::events::StaticEvent for CallPaused { + const PALLET: &'static str = "TxPause"; + const EVENT: &'static str = "CallPaused"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "This pallet, or a specific call is now unpaused."] + pub struct CallUnpaused { + pub full_name: call_unpaused::FullName, + } + pub mod call_unpaused { + use super::runtime_types; + pub type FullName = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ); + } + impl ::subxt_core::events::StaticEvent for CallUnpaused { + const PALLET: &'static str = "TxPause"; + const EVENT: &'static str = "CallUnpaused"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod paused_calls { + use super::runtime_types; + pub type PausedCalls = (); + pub type Param0 = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param1 = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of calls that are explicitly paused."] + pub fn paused_calls_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::paused_calls::PausedCalls, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "TxPause", + "PausedCalls", + (), + [ + 36u8, 9u8, 29u8, 154u8, 39u8, 47u8, 237u8, 97u8, 176u8, 241u8, 153u8, + 131u8, 20u8, 16u8, 73u8, 63u8, 27u8, 21u8, 107u8, 5u8, 147u8, 198u8, + 82u8, 212u8, 38u8, 162u8, 1u8, 203u8, 57u8, 187u8, 53u8, 132u8, + ], + ) + } + #[doc = " The set of calls that are explicitly paused."] + pub fn paused_calls_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::paused_calls::PausedCalls, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "TxPause", + "PausedCalls", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 36u8, 9u8, 29u8, 154u8, 39u8, 47u8, 237u8, 97u8, 176u8, 241u8, 153u8, + 131u8, 20u8, 16u8, 73u8, 63u8, 27u8, 21u8, 107u8, 5u8, 147u8, 198u8, + 82u8, 212u8, 38u8, 162u8, 1u8, 203u8, 57u8, 187u8, 53u8, 132u8, + ], + ) + } + #[doc = " The set of calls that are explicitly paused."] + pub fn paused_calls( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::paused_calls::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::paused_calls::Param1, + >, + ), + types::paused_calls::PausedCalls, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "TxPause", + "PausedCalls", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 36u8, 9u8, 29u8, 154u8, 39u8, 47u8, 237u8, 97u8, 176u8, 241u8, 153u8, + 131u8, 20u8, 16u8, 73u8, 63u8, 27u8, 21u8, 107u8, 5u8, 147u8, 198u8, + 82u8, 212u8, 38u8, 162u8, 1u8, 203u8, 57u8, 187u8, 53u8, 132u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " Maximum length for pallet name and call name SCALE encoded string names."] + #[doc = ""] + #[doc = " TOO LONG NAMES WILL BE TREATED AS PAUSED."] + pub fn max_name_len( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "TxPause", + "MaxNameLen", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod im_online { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_im_online::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_im_online::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "## Complexity:"] + #[doc = "- `O(K)` where K is length of `Keys` (heartbeat.validators_len)"] + #[doc = " - `O(K)`: decoding of length `K`"] + pub struct Heartbeat { + pub heartbeat: heartbeat::Heartbeat, + pub signature: heartbeat::Signature, + } + pub mod heartbeat { + use super::runtime_types; + pub type Heartbeat = + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u64>; + pub type Signature = + runtime_types::pallet_im_online::sr25519::app_sr25519::Signature; + } + impl ::subxt_core::blocks::StaticExtrinsic for Heartbeat { + const PALLET: &'static str = "ImOnline"; + const CALL: &'static str = "heartbeat"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "## Complexity:"] + #[doc = "- `O(K)` where K is length of `Keys` (heartbeat.validators_len)"] + #[doc = " - `O(K)`: decoding of length `K`"] + pub fn heartbeat( + &self, + heartbeat: types::heartbeat::Heartbeat, + signature: types::heartbeat::Signature, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "ImOnline", + "heartbeat", + types::Heartbeat { heartbeat, signature }, + [ + 86u8, 12u8, 154u8, 158u8, 95u8, 229u8, 80u8, 51u8, 84u8, 204u8, 197u8, + 113u8, 87u8, 57u8, 93u8, 200u8, 154u8, 111u8, 147u8, 246u8, 193u8, + 192u8, 4u8, 178u8, 115u8, 104u8, 42u8, 251u8, 104u8, 152u8, 17u8, 41u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_im_online::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new heartbeat was received from `AuthorityId`."] + pub struct HeartbeatReceived { + pub authority_id: heartbeat_received::AuthorityId, + } + pub mod heartbeat_received { + use super::runtime_types; + pub type AuthorityId = + runtime_types::pallet_im_online::sr25519::app_sr25519::Public; + } + impl ::subxt_core::events::StaticEvent for HeartbeatReceived { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "HeartbeatReceived"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "At the end of the session, no offence was committed."] + pub struct AllGood; + impl ::subxt_core::events::StaticEvent for AllGood { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "AllGood"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "At the end of the session, at least one validator was found to be offline."] + pub struct SomeOffline { + pub offline: some_offline::Offline, + } + pub mod some_offline { + use super::runtime_types; + pub type Offline = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + runtime_types::sp_staking::Exposure< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >, + )>; + } + impl ::subxt_core::events::StaticEvent for SomeOffline { + const PALLET: &'static str = "ImOnline"; + const EVENT: &'static str = "SomeOffline"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod heartbeat_after { + use super::runtime_types; + pub type HeartbeatAfter = ::core::primitive::u64; + } + pub mod keys { + use super::runtime_types; + pub type Keys = + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + >; + } + pub mod received_heartbeats { + use super::runtime_types; + pub type ReceivedHeartbeats = ::core::primitive::bool; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::core::primitive::u32; + } + pub mod authored_blocks { + use super::runtime_types; + pub type AuthoredBlocks = ::core::primitive::u32; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The block number after which it's ok to send heartbeats in the current"] + #[doc = " session."] + #[doc = ""] + #[doc = " At the beginning of each session we set this to a value that should fall"] + #[doc = " roughly in the middle of the session duration. The idea is to first wait for"] + #[doc = " the validators to produce a block in the current session, so that the"] + #[doc = " heartbeat later on will not be necessary."] + #[doc = ""] + #[doc = " This value will only be used as a fallback if we fail to get a proper session"] + #[doc = " progress estimate from `NextSessionRotation`, as those estimates should be"] + #[doc = " more accurate then the value we calculate for `HeartbeatAfter`."] + pub fn heartbeat_after( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::heartbeat_after::HeartbeatAfter, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "HeartbeatAfter", + (), + [ + 68u8, 123u8, 210u8, 22u8, 2u8, 3u8, 102u8, 109u8, 229u8, 105u8, 224u8, + 81u8, 50u8, 191u8, 34u8, 195u8, 50u8, 33u8, 173u8, 218u8, 124u8, 235u8, + 235u8, 206u8, 233u8, 66u8, 254u8, 225u8, 149u8, 96u8, 107u8, 242u8, + ], + ) + } + #[doc = " The current set of keys that may issue a heartbeat."] + pub fn keys( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::keys::Keys, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "Keys", + (), + [ + 35u8, 71u8, 73u8, 255u8, 160u8, 250u8, 38u8, 205u8, 32u8, 139u8, 236u8, + 83u8, 194u8, 12u8, 20u8, 221u8, 114u8, 94u8, 196u8, 246u8, 136u8, + 175u8, 70u8, 98u8, 91u8, 50u8, 236u8, 131u8, 131u8, 146u8, 150u8, + 192u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`."] + pub fn received_heartbeats_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::received_heartbeats::ReceivedHeartbeats, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "ReceivedHeartbeats", + (), + [ + 30u8, 155u8, 42u8, 200u8, 223u8, 48u8, 127u8, 31u8, 253u8, 195u8, + 234u8, 108u8, 64u8, 27u8, 247u8, 17u8, 187u8, 199u8, 41u8, 138u8, 55u8, + 163u8, 94u8, 226u8, 10u8, 3u8, 132u8, 129u8, 8u8, 138u8, 137u8, 171u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`."] + pub fn received_heartbeats_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::received_heartbeats::Param0, + >, + types::received_heartbeats::ReceivedHeartbeats, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "ReceivedHeartbeats", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 30u8, 155u8, 42u8, 200u8, 223u8, 48u8, 127u8, 31u8, 253u8, 195u8, + 234u8, 108u8, 64u8, 27u8, 247u8, 17u8, 187u8, 199u8, 41u8, 138u8, 55u8, + 163u8, 94u8, 226u8, 10u8, 3u8, 132u8, 129u8, 8u8, 138u8, 137u8, 171u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`."] + pub fn received_heartbeats( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::received_heartbeats::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::received_heartbeats::Param1, + >, + ), + types::received_heartbeats::ReceivedHeartbeats, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "ReceivedHeartbeats", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 30u8, 155u8, 42u8, 200u8, 223u8, 48u8, 127u8, 31u8, 253u8, 195u8, + 234u8, 108u8, 64u8, 27u8, 247u8, 17u8, 187u8, 199u8, 41u8, 138u8, 55u8, + 163u8, 94u8, 226u8, 10u8, 3u8, 132u8, 129u8, 8u8, 138u8, 137u8, 171u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::authored_blocks::AuthoredBlocks, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "AuthoredBlocks", + (), + [ + 123u8, 76u8, 230u8, 113u8, 65u8, 255u8, 99u8, 79u8, 131u8, 139u8, + 218u8, 20u8, 174u8, 191u8, 224u8, 67u8, 137u8, 48u8, 146u8, 209u8, + 148u8, 69u8, 130u8, 9u8, 173u8, 253u8, 206u8, 196u8, 68u8, 160u8, + 233u8, 126u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::authored_blocks::Param0, + >, + types::authored_blocks::AuthoredBlocks, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "AuthoredBlocks", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 123u8, 76u8, 230u8, 113u8, 65u8, 255u8, 99u8, 79u8, 131u8, 139u8, + 218u8, 20u8, 174u8, 191u8, 224u8, 67u8, 137u8, 48u8, 146u8, 209u8, + 148u8, 69u8, 130u8, 9u8, 173u8, 253u8, 206u8, 196u8, 68u8, 160u8, + 233u8, 126u8, + ], + ) + } + #[doc = " For each session index, we keep a mapping of `ValidatorId` to the"] + #[doc = " number of blocks authored by the given authority."] + pub fn authored_blocks( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::authored_blocks::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::authored_blocks::Param1, + >, + ), + types::authored_blocks::AuthoredBlocks, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "ImOnline", + "AuthoredBlocks", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 123u8, 76u8, 230u8, 113u8, 65u8, 255u8, 99u8, 79u8, 131u8, 139u8, + 218u8, 20u8, 174u8, 191u8, 224u8, 67u8, 137u8, 48u8, 146u8, 209u8, + 148u8, 69u8, 130u8, 9u8, 173u8, 253u8, 206u8, 196u8, 68u8, 160u8, + 233u8, 126u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " A configuration for base priority of unsigned transactions."] + #[doc = ""] + #[doc = " This is exposed so that it can be tuned for particular runtime, when"] + #[doc = " multiple pallets send unsigned transactions."] + pub fn unsigned_priority( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "ImOnline", + "UnsignedPriority", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + } + } + } + pub mod identity { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_identity::pallet::Error; + #[doc = "Identity pallet declaration."] + pub type Call = runtime_types::pallet_identity::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add a registrar to the system."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] + #[doc = ""] + #[doc = "- `account`: the account of the registrar."] + #[doc = ""] + #[doc = "Emits `RegistrarAdded` if successful."] + pub struct AddRegistrar { + pub account: add_registrar::Account, + } + pub mod add_registrar { + use super::runtime_types; + pub type Account = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for AddRegistrar { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "add_registrar"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set an account's identity information and reserve the appropriate deposit."] + #[doc = ""] + #[doc = "If the account already has identity information, the deposit is taken as part payment"] + #[doc = "for the new deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `info`: The identity information."] + #[doc = ""] + #[doc = "Emits `IdentitySet` if successful."] + pub struct SetIdentity { + pub info: ::subxt_core::alloc::boxed::Box, + } + pub mod set_identity { + use super::runtime_types; + pub type Info = runtime_types::pallet_identity::legacy::IdentityInfo; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetIdentity { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_identity"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the sub-accounts of the sender."] + #[doc = ""] + #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] + #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "- `subs`: The identity's (new) sub-accounts."] + pub struct SetSubs { + pub subs: set_subs::Subs, + } + pub mod set_subs { + use super::runtime_types; + pub type Subs = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetSubs { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_subs"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] + #[doc = ""] + #[doc = "Payment: All reserved balances on the account are returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "Emits `IdentityCleared` if successful."] + pub struct ClearIdentity; + impl ::subxt_core::blocks::StaticExtrinsic for ClearIdentity { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "clear_identity"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Request a judgement from a registrar."] + #[doc = ""] + #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] + #[doc = "given."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] + #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] + #[doc = ""] + #[doc = "```nocompile"] + #[doc = "Self::registrars().get(reg_index).unwrap().fee"] + #[doc = "```"] + #[doc = ""] + #[doc = "Emits `JudgementRequested` if successful."] + pub struct RequestJudgement { + #[codec(compact)] + pub reg_index: request_judgement::RegIndex, + #[codec(compact)] + pub max_fee: request_judgement::MaxFee, + } + pub mod request_judgement { + use super::runtime_types; + pub type RegIndex = ::core::primitive::u32; + pub type MaxFee = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for RequestJudgement { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "request_judgement"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a previous request."] + #[doc = ""] + #[doc = "Payment: A previously reserved deposit is returned on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] + #[doc = ""] + #[doc = "Emits `JudgementUnrequested` if successful."] + pub struct CancelRequest { + pub reg_index: cancel_request::RegIndex, + } + pub mod cancel_request { + use super::runtime_types; + pub type RegIndex = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelRequest { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "cancel_request"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the fee required for a judgement to be requested from a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fee`: the new fee."] + pub struct SetFee { + #[codec(compact)] + pub index: set_fee::Index, + #[codec(compact)] + pub fee: set_fee::Fee, + } + pub mod set_fee { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Fee = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetFee { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_fee"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Change the account associated with a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `new`: the new account ID."] + pub struct SetAccountId { + #[codec(compact)] + pub index: set_account_id::Index, + pub new: set_account_id::New, + } + pub mod set_account_id { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type New = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetAccountId { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_account_id"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the field information for a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fields`: the fields that the registrar concerns themselves with."] + pub struct SetFields { + #[codec(compact)] + pub index: set_fields::Index, + pub fields: set_fields::Fields, + } + pub mod set_fields { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Fields = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetFields { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_fields"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Provide a judgement for an account's identity."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `reg_index`."] + #[doc = ""] + #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] + #[doc = "- `identity`: The hash of the [`IdentityInformationProvider`] for that the judgement is"] + #[doc = " provided."] + #[doc = ""] + #[doc = "Note: Judgements do not apply to a username."] + #[doc = ""] + #[doc = "Emits `JudgementGiven` if successful."] + pub struct ProvideJudgement { + #[codec(compact)] + pub reg_index: provide_judgement::RegIndex, + pub target: provide_judgement::Target, + pub judgement: provide_judgement::Judgement, + pub identity: provide_judgement::Identity, + } + pub mod provide_judgement { + use super::runtime_types; + pub type RegIndex = ::core::primitive::u32; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Judgement = + runtime_types::pallet_identity::types::Judgement<::core::primitive::u128>; + pub type Identity = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for ProvideJudgement { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "provide_judgement"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove an account's identity and sub-account information and slash the deposits."] + #[doc = ""] + #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] + #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] + #[doc = "manually using `cancel_request`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + #[doc = ""] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = ""] + #[doc = "Emits `IdentityKilled` if successful."] + pub struct KillIdentity { + pub target: kill_identity::Target, + } + pub mod kill_identity { + use super::runtime_types; + pub type Target = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for KillIdentity { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "kill_identity"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add the given account to the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub struct AddSub { + pub sub: add_sub::Sub, + pub data: add_sub::Data, + } + pub mod add_sub { + use super::runtime_types; + pub type Sub = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Data = runtime_types::pallet_identity::types::Data; + } + impl ::subxt_core::blocks::StaticExtrinsic for AddSub { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "add_sub"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Alter the associated name of the given sub-account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub struct RenameSub { + pub sub: rename_sub::Sub, + pub data: rename_sub::Data, + } + pub mod rename_sub { + use super::runtime_types; + pub type Sub = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Data = runtime_types::pallet_identity::types::Data; + } + impl ::subxt_core::blocks::StaticExtrinsic for RenameSub { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "rename_sub"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove the given account from the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub struct RemoveSub { + pub sub: remove_sub::Sub, + } + pub mod remove_sub { + use super::runtime_types; + pub type Sub = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveSub { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "remove_sub"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove the sender as a sub-account."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender (*not* the original depositor)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "super-identity."] + #[doc = ""] + #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] + #[doc = "controller of an account is maliciously registered as a sub-account."] + pub struct QuitSub; + impl ::subxt_core::blocks::StaticExtrinsic for QuitSub { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "quit_sub"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Add an `AccountId` with permission to grant usernames with a given `suffix` appended."] + #[doc = ""] + #[doc = "The authority can grant up to `allocation` usernames. To top up their allocation, they"] + #[doc = "should just issue (or request via governance) a new `add_username_authority` call."] + pub struct AddUsernameAuthority { + pub authority: add_username_authority::Authority, + pub suffix: add_username_authority::Suffix, + pub allocation: add_username_authority::Allocation, + } + pub mod add_username_authority { + use super::runtime_types; + pub type Authority = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Suffix = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Allocation = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for AddUsernameAuthority { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "add_username_authority"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove `authority` from the username authorities."] + pub struct RemoveUsernameAuthority { + pub authority: remove_username_authority::Authority, + } + pub mod remove_username_authority { + use super::runtime_types; + pub type Authority = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveUsernameAuthority { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "remove_username_authority"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the username for `who`. Must be called by a username authority."] + #[doc = ""] + #[doc = "The authority must have an `allocation`. Users can either pre-sign their usernames or"] + #[doc = "accept them later."] + #[doc = ""] + #[doc = "Usernames must:"] + #[doc = " - Only contain lowercase ASCII characters or digits."] + #[doc = " - When combined with the suffix of the issuing authority be _less than_ the"] + #[doc = " `MaxUsernameLength`."] + pub struct SetUsernameFor { + pub who: set_username_for::Who, + pub username: set_username_for::Username, + pub signature: set_username_for::Signature, + } + pub mod set_username_for { + use super::runtime_types; + pub type Who = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Username = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Signature = + ::core::option::Option; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetUsernameFor { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_username_for"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Accept a given username that an `authority` granted. The call must include the full"] + #[doc = "username, as in `username.suffix`."] + pub struct AcceptUsername { + pub username: accept_username::Username, + } + pub mod accept_username { + use super::runtime_types; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for AcceptUsername { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "accept_username"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove an expired username approval. The username was approved by an authority but never"] + #[doc = "accepted by the user and must now be beyond its expiration. The call must include the"] + #[doc = "full username, as in `username.suffix`."] + pub struct RemoveExpiredApproval { + pub username: remove_expired_approval::Username, + } + pub mod remove_expired_approval { + use super::runtime_types; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveExpiredApproval { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "remove_expired_approval"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a given username as the primary. The username should include the suffix."] + pub struct SetPrimaryUsername { + pub username: set_primary_username::Username, + } + pub mod set_primary_username { + use super::runtime_types; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetPrimaryUsername { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "set_primary_username"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a username that corresponds to an account with no identity. Exists when a user"] + #[doc = "gets a username but then calls `clear_identity`."] + pub struct RemoveDanglingUsername { + pub username: remove_dangling_username::Username, + } + pub mod remove_dangling_username { + use super::runtime_types; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveDanglingUsername { + const PALLET: &'static str = "Identity"; + const CALL: &'static str = "remove_dangling_username"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Add a registrar to the system."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] + #[doc = ""] + #[doc = "- `account`: the account of the registrar."] + #[doc = ""] + #[doc = "Emits `RegistrarAdded` if successful."] + pub fn add_registrar( + &self, + account: types::add_registrar::Account, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "add_registrar", + types::AddRegistrar { account }, + [ + 206u8, 30u8, 240u8, 168u8, 67u8, 228u8, 17u8, 74u8, 26u8, 222u8, 61u8, + 15u8, 100u8, 25u8, 162u8, 159u8, 83u8, 110u8, 30u8, 52u8, 201u8, 49u8, + 115u8, 152u8, 142u8, 76u8, 14u8, 239u8, 184u8, 136u8, 195u8, 39u8, + ], + ) + } + #[doc = "Set an account's identity information and reserve the appropriate deposit."] + #[doc = ""] + #[doc = "If the account already has identity information, the deposit is taken as part payment"] + #[doc = "for the new deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `info`: The identity information."] + #[doc = ""] + #[doc = "Emits `IdentitySet` if successful."] + pub fn set_identity( + &self, + info: types::set_identity::Info, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_identity", + types::SetIdentity { info: ::subxt_core::alloc::boxed::Box::new(info) }, + [ + 18u8, 86u8, 67u8, 10u8, 116u8, 254u8, 94u8, 95u8, 166u8, 30u8, 204u8, + 189u8, 174u8, 70u8, 191u8, 255u8, 149u8, 93u8, 156u8, 120u8, 105u8, + 138u8, 199u8, 181u8, 43u8, 150u8, 143u8, 254u8, 182u8, 81u8, 86u8, + 45u8, + ], + ) + } + #[doc = "Set the sub-accounts of the sender."] + #[doc = ""] + #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] + #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "- `subs`: The identity's (new) sub-accounts."] + pub fn set_subs( + &self, + subs: types::set_subs::Subs, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_subs", + types::SetSubs { subs }, + [ + 34u8, 184u8, 18u8, 155u8, 112u8, 247u8, 235u8, 75u8, 209u8, 236u8, + 21u8, 238u8, 43u8, 237u8, 223u8, 147u8, 48u8, 6u8, 39u8, 231u8, 174u8, + 164u8, 243u8, 184u8, 220u8, 151u8, 165u8, 69u8, 219u8, 122u8, 234u8, + 100u8, + ], + ) + } + #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] + #[doc = ""] + #[doc = "Payment: All reserved balances on the account are returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "Emits `IdentityCleared` if successful."] + pub fn clear_identity( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "clear_identity", + types::ClearIdentity {}, + [ + 43u8, 115u8, 205u8, 44u8, 24u8, 130u8, 220u8, 69u8, 247u8, 176u8, + 200u8, 175u8, 67u8, 183u8, 36u8, 200u8, 162u8, 132u8, 242u8, 25u8, + 21u8, 106u8, 197u8, 219u8, 141u8, 51u8, 204u8, 13u8, 191u8, 201u8, + 31u8, 31u8, + ], + ) + } + #[doc = "Request a judgement from a registrar."] + #[doc = ""] + #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] + #[doc = "given."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] + #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] + #[doc = ""] + #[doc = "```nocompile"] + #[doc = "Self::registrars().get(reg_index).unwrap().fee"] + #[doc = "```"] + #[doc = ""] + #[doc = "Emits `JudgementRequested` if successful."] + pub fn request_judgement( + &self, + reg_index: types::request_judgement::RegIndex, + max_fee: types::request_judgement::MaxFee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "request_judgement", + types::RequestJudgement { reg_index, max_fee }, + [ + 83u8, 85u8, 55u8, 184u8, 14u8, 54u8, 49u8, 212u8, 26u8, 148u8, 33u8, + 147u8, 182u8, 54u8, 180u8, 12u8, 61u8, 179u8, 216u8, 157u8, 103u8, + 52u8, 120u8, 252u8, 83u8, 203u8, 144u8, 65u8, 15u8, 3u8, 21u8, 33u8, + ], + ) + } + #[doc = "Cancel a previous request."] + #[doc = ""] + #[doc = "Payment: A previously reserved deposit is returned on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] + #[doc = ""] + #[doc = "Emits `JudgementUnrequested` if successful."] + pub fn cancel_request( + &self, + reg_index: types::cancel_request::RegIndex, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "cancel_request", + types::CancelRequest { reg_index }, + [ + 81u8, 14u8, 133u8, 219u8, 43u8, 84u8, 163u8, 208u8, 21u8, 185u8, 75u8, + 117u8, 126u8, 33u8, 210u8, 106u8, 122u8, 210u8, 35u8, 207u8, 104u8, + 206u8, 41u8, 117u8, 247u8, 108u8, 56u8, 23u8, 123u8, 169u8, 169u8, + 61u8, + ], + ) + } + #[doc = "Set the fee required for a judgement to be requested from a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fee`: the new fee."] + pub fn set_fee( + &self, + index: types::set_fee::Index, + fee: types::set_fee::Fee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_fee", + types::SetFee { index, fee }, + [ + 131u8, 20u8, 17u8, 127u8, 180u8, 65u8, 225u8, 144u8, 193u8, 60u8, + 131u8, 241u8, 30u8, 149u8, 8u8, 76u8, 29u8, 52u8, 102u8, 108u8, 127u8, + 130u8, 70u8, 18u8, 94u8, 145u8, 179u8, 109u8, 252u8, 219u8, 58u8, + 163u8, + ], + ) + } + #[doc = "Change the account associated with a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `new`: the new account ID."] + pub fn set_account_id( + &self, + index: types::set_account_id::Index, + new: types::set_account_id::New, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_account_id", + types::SetAccountId { index, new }, + [ + 40u8, 151u8, 216u8, 253u8, 241u8, 117u8, 210u8, 208u8, 98u8, 94u8, + 228u8, 208u8, 122u8, 100u8, 86u8, 237u8, 240u8, 89u8, 90u8, 109u8, + 23u8, 255u8, 121u8, 176u8, 146u8, 10u8, 190u8, 175u8, 148u8, 228u8, + 176u8, 43u8, + ], + ) + } + #[doc = "Set the field information for a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fields`: the fields that the registrar concerns themselves with."] + pub fn set_fields( + &self, + index: types::set_fields::Index, + fields: types::set_fields::Fields, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_fields", + types::SetFields { index, fields }, + [ + 75u8, 38u8, 58u8, 93u8, 92u8, 164u8, 146u8, 146u8, 183u8, 245u8, 135u8, + 235u8, 12u8, 148u8, 37u8, 193u8, 58u8, 66u8, 173u8, 223u8, 166u8, + 169u8, 54u8, 159u8, 141u8, 36u8, 25u8, 231u8, 190u8, 211u8, 254u8, + 38u8, + ], + ) + } + #[doc = "Provide a judgement for an account's identity."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `reg_index`."] + #[doc = ""] + #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] + #[doc = "- `identity`: The hash of the [`IdentityInformationProvider`] for that the judgement is"] + #[doc = " provided."] + #[doc = ""] + #[doc = "Note: Judgements do not apply to a username."] + #[doc = ""] + #[doc = "Emits `JudgementGiven` if successful."] + pub fn provide_judgement( + &self, + reg_index: types::provide_judgement::RegIndex, + target: types::provide_judgement::Target, + judgement: types::provide_judgement::Judgement, + identity: types::provide_judgement::Identity, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "provide_judgement", + types::ProvideJudgement { reg_index, target, judgement, identity }, + [ + 224u8, 108u8, 183u8, 113u8, 45u8, 239u8, 165u8, 94u8, 110u8, 181u8, + 66u8, 213u8, 45u8, 9u8, 132u8, 203u8, 55u8, 96u8, 19u8, 129u8, 0u8, + 240u8, 138u8, 193u8, 191u8, 188u8, 150u8, 5u8, 64u8, 188u8, 163u8, + 231u8, + ], + ) + } + #[doc = "Remove an account's identity and sub-account information and slash the deposits."] + #[doc = ""] + #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] + #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] + #[doc = "manually using `cancel_request`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + #[doc = ""] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = ""] + #[doc = "Emits `IdentityKilled` if successful."] + pub fn kill_identity( + &self, + target: types::kill_identity::Target, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "kill_identity", + types::KillIdentity { target }, + [ + 41u8, 147u8, 161u8, 132u8, 99u8, 63u8, 42u8, 219u8, 109u8, 209u8, 19u8, + 243u8, 61u8, 122u8, 16u8, 248u8, 110u8, 85u8, 71u8, 170u8, 38u8, 4u8, + 91u8, 173u8, 212u8, 55u8, 227u8, 51u8, 100u8, 5u8, 211u8, 177u8, + ], + ) + } + #[doc = "Add the given account to the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub fn add_sub( + &self, + sub: types::add_sub::Sub, + data: types::add_sub::Data, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "add_sub", + types::AddSub { sub, data }, + [ + 92u8, 68u8, 199u8, 2u8, 215u8, 177u8, 19u8, 216u8, 8u8, 79u8, 165u8, + 233u8, 254u8, 85u8, 115u8, 41u8, 103u8, 67u8, 61u8, 93u8, 204u8, 245u8, + 197u8, 120u8, 88u8, 70u8, 37u8, 22u8, 221u8, 5u8, 100u8, 78u8, + ], + ) + } + #[doc = "Alter the associated name of the given sub-account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub fn rename_sub( + &self, + sub: types::rename_sub::Sub, + data: types::rename_sub::Data, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "rename_sub", + types::RenameSub { sub, data }, + [ + 54u8, 76u8, 163u8, 56u8, 90u8, 60u8, 49u8, 218u8, 100u8, 249u8, 177u8, + 33u8, 174u8, 122u8, 237u8, 205u8, 107u8, 232u8, 168u8, 155u8, 240u8, + 22u8, 97u8, 197u8, 174u8, 250u8, 8u8, 227u8, 10u8, 205u8, 188u8, 30u8, + ], + ) + } + #[doc = "Remove the given account from the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + pub fn remove_sub( + &self, + sub: types::remove_sub::Sub, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "remove_sub", + types::RemoveSub { sub }, + [ + 80u8, 67u8, 217u8, 201u8, 139u8, 178u8, 58u8, 253u8, 137u8, 193u8, + 133u8, 239u8, 21u8, 226u8, 14u8, 160u8, 110u8, 20u8, 35u8, 168u8, + 139u8, 199u8, 92u8, 125u8, 13u8, 52u8, 248u8, 63u8, 54u8, 166u8, 55u8, + 225u8, + ], + ) + } + #[doc = "Remove the sender as a sub-account."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender (*not* the original depositor)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "super-identity."] + #[doc = ""] + #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] + #[doc = "controller of an account is maliciously registered as a sub-account."] + pub fn quit_sub(&self) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "quit_sub", + types::QuitSub {}, + [ + 147u8, 131u8, 175u8, 171u8, 187u8, 201u8, 240u8, 26u8, 146u8, 224u8, + 74u8, 166u8, 242u8, 193u8, 204u8, 247u8, 168u8, 93u8, 18u8, 32u8, 27u8, + 208u8, 149u8, 146u8, 179u8, 172u8, 75u8, 112u8, 84u8, 141u8, 233u8, + 223u8, + ], + ) + } + #[doc = "Add an `AccountId` with permission to grant usernames with a given `suffix` appended."] + #[doc = ""] + #[doc = "The authority can grant up to `allocation` usernames. To top up their allocation, they"] + #[doc = "should just issue (or request via governance) a new `add_username_authority` call."] + pub fn add_username_authority( + &self, + authority: types::add_username_authority::Authority, + suffix: types::add_username_authority::Suffix, + allocation: types::add_username_authority::Allocation, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "add_username_authority", + types::AddUsernameAuthority { authority, suffix, allocation }, + [ + 199u8, 210u8, 153u8, 166u8, 161u8, 195u8, 9u8, 47u8, 173u8, 238u8, + 124u8, 171u8, 48u8, 119u8, 163u8, 54u8, 220u8, 53u8, 40u8, 219u8, 52u8, + 215u8, 28u8, 123u8, 94u8, 178u8, 46u8, 93u8, 83u8, 11u8, 173u8, 106u8, + ], + ) + } + #[doc = "Remove `authority` from the username authorities."] + pub fn remove_username_authority( + &self, + authority: types::remove_username_authority::Authority, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "remove_username_authority", + types::RemoveUsernameAuthority { authority }, + [ + 179u8, 32u8, 157u8, 211u8, 10u8, 92u8, 0u8, 221u8, 77u8, 248u8, 227u8, + 117u8, 65u8, 183u8, 21u8, 103u8, 44u8, 180u8, 238u8, 55u8, 201u8, + 196u8, 17u8, 142u8, 74u8, 76u8, 26u8, 10u8, 29u8, 206u8, 166u8, 155u8, + ], + ) + } + #[doc = "Set the username for `who`. Must be called by a username authority."] + #[doc = ""] + #[doc = "The authority must have an `allocation`. Users can either pre-sign their usernames or"] + #[doc = "accept them later."] + #[doc = ""] + #[doc = "Usernames must:"] + #[doc = " - Only contain lowercase ASCII characters or digits."] + #[doc = " - When combined with the suffix of the issuing authority be _less than_ the"] + #[doc = " `MaxUsernameLength`."] + pub fn set_username_for( + &self, + who: types::set_username_for::Who, + username: types::set_username_for::Username, + signature: types::set_username_for::Signature, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_username_for", + types::SetUsernameFor { who, username, signature }, + [ + 119u8, 226u8, 95u8, 20u8, 246u8, 247u8, 166u8, 193u8, 29u8, 99u8, + 186u8, 184u8, 70u8, 45u8, 77u8, 247u8, 11u8, 153u8, 26u8, 121u8, 243u8, + 250u8, 188u8, 85u8, 210u8, 43u8, 4u8, 220u8, 173u8, 191u8, 106u8, + 221u8, + ], + ) + } + #[doc = "Accept a given username that an `authority` granted. The call must include the full"] + #[doc = "username, as in `username.suffix`."] + pub fn accept_username( + &self, + username: types::accept_username::Username, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "accept_username", + types::AcceptUsername { username }, + [ + 247u8, 162u8, 83u8, 250u8, 214u8, 7u8, 12u8, 253u8, 227u8, 4u8, 95u8, + 71u8, 150u8, 218u8, 216u8, 86u8, 137u8, 37u8, 114u8, 188u8, 18u8, + 232u8, 229u8, 179u8, 172u8, 251u8, 70u8, 29u8, 18u8, 86u8, 33u8, 129u8, + ], + ) + } + #[doc = "Remove an expired username approval. The username was approved by an authority but never"] + #[doc = "accepted by the user and must now be beyond its expiration. The call must include the"] + #[doc = "full username, as in `username.suffix`."] + pub fn remove_expired_approval( + &self, + username: types::remove_expired_approval::Username, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "remove_expired_approval", + types::RemoveExpiredApproval { username }, + [ + 159u8, 171u8, 27u8, 97u8, 224u8, 171u8, 14u8, 89u8, 65u8, 213u8, 208u8, + 67u8, 118u8, 146u8, 0u8, 131u8, 82u8, 186u8, 142u8, 52u8, 173u8, 90u8, + 104u8, 107u8, 114u8, 202u8, 123u8, 222u8, 49u8, 53u8, 59u8, 61u8, + ], + ) + } + #[doc = "Set a given username as the primary. The username should include the suffix."] + pub fn set_primary_username( + &self, + username: types::set_primary_username::Username, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "set_primary_username", + types::SetPrimaryUsername { username }, + [ + 3u8, 25u8, 56u8, 26u8, 108u8, 165u8, 84u8, 231u8, 16u8, 4u8, 6u8, + 232u8, 141u8, 7u8, 254u8, 50u8, 26u8, 230u8, 66u8, 245u8, 255u8, 101u8, + 183u8, 234u8, 197u8, 186u8, 132u8, 197u8, 251u8, 84u8, 212u8, 162u8, + ], + ) + } + #[doc = "Remove a username that corresponds to an account with no identity. Exists when a user"] + #[doc = "gets a username but then calls `clear_identity`."] + pub fn remove_dangling_username( + &self, + username: types::remove_dangling_username::Username, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Identity", + "remove_dangling_username", + types::RemoveDanglingUsername { username }, + [ + 220u8, 67u8, 52u8, 223u8, 169u8, 81u8, 202u8, 74u8, 199u8, 169u8, 89u8, + 60u8, 57u8, 153u8, 240u8, 105u8, 188u8, 222u8, 250u8, 247u8, 91u8, + 137u8, 37u8, 212u8, 10u8, 51u8, 9u8, 202u8, 165u8, 155u8, 222u8, 29u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_identity::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A name was set or reset (which will remove all judgements)."] + pub struct IdentitySet { + pub who: identity_set::Who, + } + pub mod identity_set { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for IdentitySet { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "IdentitySet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A name was cleared, and the given balance returned."] + pub struct IdentityCleared { + pub who: identity_cleared::Who, + pub deposit: identity_cleared::Deposit, + } + pub mod identity_cleared { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for IdentityCleared { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "IdentityCleared"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A name was removed and the given balance slashed."] + pub struct IdentityKilled { + pub who: identity_killed::Who, + pub deposit: identity_killed::Deposit, + } + pub mod identity_killed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for IdentityKilled { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "IdentityKilled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A judgement was asked from a registrar."] + pub struct JudgementRequested { + pub who: judgement_requested::Who, + pub registrar_index: judgement_requested::RegistrarIndex, + } + pub mod judgement_requested { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type RegistrarIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for JudgementRequested { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "JudgementRequested"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A judgement request was retracted."] + pub struct JudgementUnrequested { + pub who: judgement_unrequested::Who, + pub registrar_index: judgement_unrequested::RegistrarIndex, + } + pub mod judgement_unrequested { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type RegistrarIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for JudgementUnrequested { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "JudgementUnrequested"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A judgement was given by a registrar."] + pub struct JudgementGiven { + pub target: judgement_given::Target, + pub registrar_index: judgement_given::RegistrarIndex, + } + pub mod judgement_given { + use super::runtime_types; + pub type Target = ::subxt_core::utils::AccountId32; + pub type RegistrarIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for JudgementGiven { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "JudgementGiven"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A registrar was added."] + pub struct RegistrarAdded { + pub registrar_index: registrar_added::RegistrarIndex, + } + pub mod registrar_added { + use super::runtime_types; + pub type RegistrarIndex = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for RegistrarAdded { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "RegistrarAdded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A sub-identity was added to an identity and the deposit paid."] + pub struct SubIdentityAdded { + pub sub: sub_identity_added::Sub, + pub main: sub_identity_added::Main, + pub deposit: sub_identity_added::Deposit, + } + pub mod sub_identity_added { + use super::runtime_types; + pub type Sub = ::subxt_core::utils::AccountId32; + pub type Main = ::subxt_core::utils::AccountId32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for SubIdentityAdded { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityAdded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A sub-identity was removed from an identity and the deposit freed."] + pub struct SubIdentityRemoved { + pub sub: sub_identity_removed::Sub, + pub main: sub_identity_removed::Main, + pub deposit: sub_identity_removed::Deposit, + } + pub mod sub_identity_removed { + use super::runtime_types; + pub type Sub = ::subxt_core::utils::AccountId32; + pub type Main = ::subxt_core::utils::AccountId32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for SubIdentityRemoved { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityRemoved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] + #[doc = "main identity account to the sub-identity account."] + pub struct SubIdentityRevoked { + pub sub: sub_identity_revoked::Sub, + pub main: sub_identity_revoked::Main, + pub deposit: sub_identity_revoked::Deposit, + } + pub mod sub_identity_revoked { + use super::runtime_types; + pub type Sub = ::subxt_core::utils::AccountId32; + pub type Main = ::subxt_core::utils::AccountId32; + pub type Deposit = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for SubIdentityRevoked { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "SubIdentityRevoked"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A username authority was added."] + pub struct AuthorityAdded { + pub authority: authority_added::Authority, + } + pub mod authority_added { + use super::runtime_types; + pub type Authority = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for AuthorityAdded { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "AuthorityAdded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A username authority was removed."] + pub struct AuthorityRemoved { + pub authority: authority_removed::Authority, + } + pub mod authority_removed { + use super::runtime_types; + pub type Authority = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for AuthorityRemoved { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "AuthorityRemoved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A username was set for `who`."] + pub struct UsernameSet { + pub who: username_set::Who, + pub username: username_set::Username, + } + pub mod username_set { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::events::StaticEvent for UsernameSet { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "UsernameSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A username was queued, but `who` must accept it prior to `expiration`."] + pub struct UsernameQueued { + pub who: username_queued::Who, + pub username: username_queued::Username, + pub expiration: username_queued::Expiration, + } + pub mod username_queued { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Expiration = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for UsernameQueued { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "UsernameQueued"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A queued username passed its expiration without being claimed and was removed."] + pub struct PreapprovalExpired { + pub whose: preapproval_expired::Whose, + } + pub mod preapproval_expired { + use super::runtime_types; + pub type Whose = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for PreapprovalExpired { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "PreapprovalExpired"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A username was set as a primary and can be looked up from `who`."] + pub struct PrimaryUsernameSet { + pub who: primary_username_set::Who, + pub username: primary_username_set::Username, + } + pub mod primary_username_set { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::events::StaticEvent for PrimaryUsernameSet { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "PrimaryUsernameSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A dangling username (as in, a username corresponding to an account that has removed its"] + #[doc = "identity) has been removed."] + pub struct DanglingUsernameRemoved { + pub who: dangling_username_removed::Who, + pub username: dangling_username_removed::Username, + } + pub mod dangling_username_removed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Username = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + impl ::subxt_core::events::StaticEvent for DanglingUsernameRemoved { + const PALLET: &'static str = "Identity"; + const EVENT: &'static str = "DanglingUsernameRemoved"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod identity_of { + use super::runtime_types; + pub type IdentityOf = ( + runtime_types::pallet_identity::types::Registration< + ::core::primitive::u128, + runtime_types::pallet_identity::legacy::IdentityInfo, + >, + ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + ); + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod super_of { + use super::runtime_types; + pub type SuperOf = ( + ::subxt_core::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + ); + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod subs_of { + use super::runtime_types; + pub type SubsOf = ( + ::core::primitive::u128, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >, + ); + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod registrars { + use super::runtime_types; + pub type Registrars = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::option::Option< + runtime_types::pallet_identity::types::RegistrarInfo< + ::core::primitive::u128, + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + >, + >, + >; + } + pub mod username_authorities { + use super::runtime_types; + pub type UsernameAuthorities = + runtime_types::pallet_identity::types::AuthorityProperties< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod account_of_username { + use super::runtime_types; + pub type AccountOfUsername = ::subxt_core::utils::AccountId32; + pub type Param0 = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + pub mod pending_usernames { + use super::runtime_types; + pub type PendingUsernames = + (::subxt_core::utils::AccountId32, ::core::primitive::u64); + pub type Param0 = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Information that is pertinent to identify the entity behind an account. First item is the"] + #[doc = " registration, second is the account's primary username."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn identity_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::identity_of::IdentityOf, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "IdentityOf", + (), + [ + 0u8, 73u8, 213u8, 52u8, 49u8, 235u8, 238u8, 43u8, 119u8, 12u8, 35u8, + 162u8, 230u8, 24u8, 246u8, 200u8, 44u8, 254u8, 13u8, 84u8, 10u8, 27u8, + 159u8, 6u8, 176u8, 125u8, 24u8, 212u8, 250u8, 154u8, 181u8, 12u8, + ], + ) + } + #[doc = " Information that is pertinent to identify the entity behind an account. First item is the"] + #[doc = " registration, second is the account's primary username."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn identity_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::identity_of::IdentityOf, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "IdentityOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 0u8, 73u8, 213u8, 52u8, 49u8, 235u8, 238u8, 43u8, 119u8, 12u8, 35u8, + 162u8, 230u8, 24u8, 246u8, 200u8, 44u8, 254u8, 13u8, 84u8, 10u8, 27u8, + 159u8, 6u8, 176u8, 125u8, 24u8, 212u8, 250u8, 154u8, 181u8, 12u8, + ], + ) + } + #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] + #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] + pub fn super_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::super_of::SuperOf, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "SuperOf", + (), + [ + 84u8, 72u8, 64u8, 14u8, 56u8, 9u8, 143u8, 100u8, 141u8, 163u8, 36u8, + 55u8, 38u8, 254u8, 164u8, 17u8, 3u8, 110u8, 88u8, 175u8, 161u8, 65u8, + 159u8, 40u8, 46u8, 8u8, 177u8, 81u8, 130u8, 38u8, 193u8, 28u8, + ], + ) + } + #[doc = " The super-identity of an alternative \"sub\" identity together with its name, within that"] + #[doc = " context. If the account is not some other account's sub-identity, then just `None`."] + pub fn super_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::super_of::SuperOf, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "SuperOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 84u8, 72u8, 64u8, 14u8, 56u8, 9u8, 143u8, 100u8, 141u8, 163u8, 36u8, + 55u8, 38u8, 254u8, 164u8, 17u8, 3u8, 110u8, 88u8, 175u8, 161u8, 65u8, + 159u8, 40u8, 46u8, 8u8, 177u8, 81u8, 130u8, 38u8, 193u8, 28u8, + ], + ) + } + #[doc = " Alternative \"sub\" identities of this account."] + #[doc = ""] + #[doc = " The first item is the deposit, the second is a vector of the accounts."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn subs_of_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::subs_of::SubsOf, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "SubsOf", + (), + [ + 164u8, 140u8, 52u8, 123u8, 220u8, 118u8, 147u8, 3u8, 67u8, 22u8, 191u8, + 18u8, 186u8, 21u8, 154u8, 8u8, 205u8, 224u8, 163u8, 173u8, 174u8, + 107u8, 144u8, 215u8, 116u8, 64u8, 159u8, 115u8, 159u8, 205u8, 91u8, + 28u8, + ], + ) + } + #[doc = " Alternative \"sub\" identities of this account."] + #[doc = ""] + #[doc = " The first item is the deposit, the second is a vector of the accounts."] + #[doc = ""] + #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."] + pub fn subs_of( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::subs_of::SubsOf, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "SubsOf", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 164u8, 140u8, 52u8, 123u8, 220u8, 118u8, 147u8, 3u8, 67u8, 22u8, 191u8, + 18u8, 186u8, 21u8, 154u8, 8u8, 205u8, 224u8, 163u8, 173u8, 174u8, + 107u8, 144u8, 215u8, 116u8, 64u8, 159u8, 115u8, 159u8, 205u8, 91u8, + 28u8, + ], + ) + } + #[doc = " The set of registrars. Not expected to get very big as can only be added through a"] + #[doc = " special origin (likely a council motion)."] + #[doc = ""] + #[doc = " The index into this can be cast to `RegistrarIndex` to get a valid value."] + pub fn registrars( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::registrars::Registrars, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "Registrars", + (), + [ + 167u8, 99u8, 159u8, 117u8, 103u8, 243u8, 208u8, 113u8, 57u8, 225u8, + 27u8, 25u8, 188u8, 120u8, 15u8, 40u8, 134u8, 169u8, 108u8, 134u8, 83u8, + 184u8, 223u8, 170u8, 194u8, 19u8, 168u8, 43u8, 119u8, 76u8, 94u8, + 154u8, + ], + ) + } + #[doc = " A map of the accounts who are authorized to grant usernames."] + pub fn username_authorities_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::username_authorities::UsernameAuthorities, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "UsernameAuthorities", + (), + [ + 89u8, 102u8, 60u8, 184u8, 127u8, 244u8, 3u8, 61u8, 209u8, 78u8, 178u8, + 44u8, 159u8, 27u8, 7u8, 0u8, 22u8, 116u8, 42u8, 240u8, 130u8, 93u8, + 214u8, 182u8, 79u8, 222u8, 19u8, 20u8, 34u8, 198u8, 164u8, 146u8, + ], + ) + } + #[doc = " A map of the accounts who are authorized to grant usernames."] + pub fn username_authorities( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::username_authorities::Param0, + >, + types::username_authorities::UsernameAuthorities, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "UsernameAuthorities", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 89u8, 102u8, 60u8, 184u8, 127u8, 244u8, 3u8, 61u8, 209u8, 78u8, 178u8, + 44u8, 159u8, 27u8, 7u8, 0u8, 22u8, 116u8, 42u8, 240u8, 130u8, 93u8, + 214u8, 182u8, 79u8, 222u8, 19u8, 20u8, 34u8, 198u8, 164u8, 146u8, + ], + ) + } + #[doc = " Reverse lookup from `username` to the `AccountId` that has registered it. The value should"] + #[doc = " be a key in the `IdentityOf` map, but it may not if the user has cleared their identity."] + #[doc = ""] + #[doc = " Multiple usernames may map to the same `AccountId`, but `IdentityOf` will only map to one"] + #[doc = " primary username."] + pub fn account_of_username_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account_of_username::AccountOfUsername, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "AccountOfUsername", + (), + [ + 131u8, 96u8, 207u8, 217u8, 223u8, 54u8, 51u8, 156u8, 8u8, 238u8, 134u8, + 57u8, 42u8, 110u8, 180u8, 107u8, 30u8, 109u8, 162u8, 110u8, 178u8, + 127u8, 151u8, 163u8, 89u8, 127u8, 181u8, 213u8, 74u8, 129u8, 207u8, + 15u8, + ], + ) + } + #[doc = " Reverse lookup from `username` to the `AccountId` that has registered it. The value should"] + #[doc = " be a key in the `IdentityOf` map, but it may not if the user has cleared their identity."] + #[doc = ""] + #[doc = " Multiple usernames may map to the same `AccountId`, but `IdentityOf` will only map to one"] + #[doc = " primary username."] + pub fn account_of_username( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::account_of_username::Param0, + >, + types::account_of_username::AccountOfUsername, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "AccountOfUsername", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 131u8, 96u8, 207u8, 217u8, 223u8, 54u8, 51u8, 156u8, 8u8, 238u8, 134u8, + 57u8, 42u8, 110u8, 180u8, 107u8, 30u8, 109u8, 162u8, 110u8, 178u8, + 127u8, 151u8, 163u8, 89u8, 127u8, 181u8, 213u8, 74u8, 129u8, 207u8, + 15u8, + ], + ) + } + #[doc = " Usernames that an authority has granted, but that the account controller has not confirmed"] + #[doc = " that they want it. Used primarily in cases where the `AccountId` cannot provide a signature"] + #[doc = " because they are a pure proxy, multisig, etc. In order to confirm it, they should call"] + #[doc = " [`Call::accept_username`]."] + #[doc = ""] + #[doc = " First tuple item is the account and second is the acceptance deadline."] + pub fn pending_usernames_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::pending_usernames::PendingUsernames, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "PendingUsernames", + (), + [ + 223u8, 53u8, 146u8, 168u8, 52u8, 5u8, 197u8, 129u8, 163u8, 221u8, + 112u8, 242u8, 120u8, 199u8, 172u8, 187u8, 53u8, 49u8, 11u8, 175u8, + 57u8, 234u8, 68u8, 183u8, 243u8, 181u8, 37u8, 149u8, 72u8, 192u8, + 142u8, 181u8, + ], + ) + } + #[doc = " Usernames that an authority has granted, but that the account controller has not confirmed"] + #[doc = " that they want it. Used primarily in cases where the `AccountId` cannot provide a signature"] + #[doc = " because they are a pure proxy, multisig, etc. In order to confirm it, they should call"] + #[doc = " [`Call::accept_username`]."] + #[doc = ""] + #[doc = " First tuple item is the account and second is the acceptance deadline."] + pub fn pending_usernames( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::pending_usernames::Param0, + >, + types::pending_usernames::PendingUsernames, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Identity", + "PendingUsernames", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 223u8, 53u8, 146u8, 168u8, 52u8, 5u8, 197u8, 129u8, 163u8, 221u8, + 112u8, 242u8, 120u8, 199u8, 172u8, 187u8, 53u8, 49u8, 11u8, 175u8, + 57u8, 234u8, 68u8, 183u8, 243u8, 181u8, 37u8, 149u8, 72u8, 192u8, + 142u8, 181u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The amount held on deposit for a registered identity."] + pub fn basic_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "BasicDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount held on deposit per encoded byte for a registered identity."] + pub fn byte_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "ByteDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount held on deposit for a registered subaccount. This should account for the fact"] + #[doc = " that one storage item's value will increase by the size of an account ID, and there will"] + #[doc = " be another trie item whose value is the size of an account ID plus 32 bytes."] + pub fn sub_account_deposit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "SubAccountDeposit", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum number of sub-accounts allowed per identified account."] + pub fn max_sub_accounts( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "MaxSubAccounts", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of registrars allowed in the system. Needed to bound the complexity"] + #[doc = " of, e.g., updating judgements."] + pub fn max_registrars( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "MaxRegistrars", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The number of blocks within which a username grant must be accepted."] + pub fn pending_username_expiration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u64> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "PendingUsernameExpiration", + [ + 128u8, 214u8, 205u8, 242u8, 181u8, 142u8, 124u8, 231u8, 190u8, 146u8, + 59u8, 226u8, 157u8, 101u8, 103u8, 117u8, 249u8, 65u8, 18u8, 191u8, + 103u8, 119u8, 53u8, 85u8, 81u8, 96u8, 220u8, 42u8, 184u8, 239u8, 42u8, + 246u8, + ], + ) + } + #[doc = " The maximum length of a suffix."] + pub fn max_suffix_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "MaxSuffixLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum length of a username, including its suffix and any system-added delimiters."] + pub fn max_username_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Identity", + "MaxUsernameLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod utility { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_utility::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_utility::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Send a batch of dispatch calls."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + pub struct Batch { + pub calls: batch::Calls, + } + pub mod batch { + use super::runtime_types; + pub type Calls = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Batch { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "batch"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Send a call through an indexed pseudonym of the sender."] + #[doc = ""] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] + #[doc = ""] + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub struct AsDerivative { + pub index: as_derivative::Index, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod as_derivative { + use super::runtime_types; + pub type Index = ::core::primitive::u16; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for AsDerivative { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "as_derivative"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub struct BatchAll { + pub calls: batch_all::Calls, + } + pub mod batch_all { + use super::runtime_types; + pub type Calls = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for BatchAll { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "batch_all"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub struct DispatchAs { + pub as_origin: ::subxt_core::alloc::boxed::Box, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod dispatch_as { + use super::runtime_types; + pub type AsOrigin = runtime_types::tangle_testnet_runtime::OriginCaller; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for DispatchAs { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "dispatch_as"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub struct ForceBatch { + pub calls: force_batch::Calls, + } + pub mod force_batch { + use super::runtime_types; + pub type Calls = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceBatch { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "force_batch"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + pub struct WithWeight { + pub call: ::subxt_core::alloc::boxed::Box, + pub weight: with_weight::Weight, + } + pub mod with_weight { + use super::runtime_types; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + pub type Weight = runtime_types::sp_weights::weight_v2::Weight; + } + impl ::subxt_core::blocks::StaticExtrinsic for WithWeight { + const PALLET: &'static str = "Utility"; + const CALL: &'static str = "with_weight"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Send a batch of dispatch calls."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + pub fn batch( + &self, + calls: types::batch::Calls, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "batch", + types::Batch { calls }, + [ + 65u8, 9u8, 20u8, 123u8, 90u8, 27u8, 59u8, 35u8, 91u8, 62u8, 11u8, + 115u8, 110u8, 170u8, 85u8, 140u8, 220u8, 74u8, 199u8, 36u8, 210u8, + 201u8, 191u8, 170u8, 201u8, 228u8, 243u8, 141u8, 154u8, 106u8, 90u8, + 169u8, + ], + ) + } + #[doc = "Send a call through an indexed pseudonym of the sender."] + #[doc = ""] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] + #[doc = ""] + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + pub fn as_derivative( + &self, + index: types::as_derivative::Index, + call: types::as_derivative::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "as_derivative", + types::AsDerivative { + index, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 66u8, 88u8, 222u8, 141u8, 37u8, 253u8, 195u8, 152u8, 201u8, 155u8, + 197u8, 211u8, 147u8, 10u8, 11u8, 33u8, 242u8, 2u8, 44u8, 178u8, 250u8, + 121u8, 117u8, 122u8, 42u8, 50u8, 65u8, 207u8, 221u8, 140u8, 238u8, + 154u8, + ], + ) + } + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn batch_all( + &self, + calls: types::batch_all::Calls, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "batch_all", + types::BatchAll { calls }, + [ + 109u8, 182u8, 89u8, 197u8, 29u8, 173u8, 102u8, 9u8, 169u8, 112u8, + 204u8, 112u8, 122u8, 219u8, 116u8, 2u8, 26u8, 115u8, 206u8, 89u8, 31u8, + 86u8, 247u8, 228u8, 122u8, 11u8, 17u8, 196u8, 82u8, 72u8, 180u8, 205u8, + ], + ) + } + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + pub fn dispatch_as( + &self, + as_origin: types::dispatch_as::AsOrigin, + call: types::dispatch_as::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "dispatch_as", + types::DispatchAs { + as_origin: ::subxt_core::alloc::boxed::Box::new(as_origin), + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 85u8, 73u8, 154u8, 107u8, 146u8, 223u8, 254u8, 230u8, 25u8, 146u8, + 171u8, 191u8, 168u8, 73u8, 42u8, 173u8, 210u8, 22u8, 127u8, 252u8, + 46u8, 244u8, 186u8, 247u8, 164u8, 231u8, 185u8, 36u8, 83u8, 98u8, 48u8, + 220u8, + ], + ) + } + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + pub fn force_batch( + &self, + calls: types::force_batch::Calls, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "force_batch", + types::ForceBatch { calls }, + [ + 218u8, 155u8, 105u8, 225u8, 220u8, 101u8, 206u8, 236u8, 98u8, 114u8, + 185u8, 77u8, 180u8, 89u8, 72u8, 195u8, 235u8, 39u8, 18u8, 228u8, 196u8, + 124u8, 185u8, 22u8, 74u8, 37u8, 209u8, 203u8, 249u8, 240u8, 251u8, + 245u8, + ], + ) + } + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + pub fn with_weight( + &self, + call: types::with_weight::Call, + weight: types::with_weight::Weight, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Utility", + "with_weight", + types::WithWeight { + call: ::subxt_core::alloc::boxed::Box::new(call), + weight, + }, + [ + 139u8, 120u8, 143u8, 234u8, 175u8, 127u8, 38u8, 228u8, 147u8, 88u8, + 70u8, 180u8, 145u8, 21u8, 239u8, 141u8, 19u8, 114u8, 217u8, 38u8, + 150u8, 5u8, 76u8, 73u8, 62u8, 48u8, 88u8, 122u8, 78u8, 110u8, 23u8, + 118u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_utility::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + pub struct BatchInterrupted { + pub index: batch_interrupted::Index, + pub error: batch_interrupted::Error, + } + pub mod batch_interrupted { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Error = runtime_types::sp_runtime::DispatchError; + } + impl ::subxt_core::events::StaticEvent for BatchInterrupted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchInterrupted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Batch of dispatches completed fully with no error."] + pub struct BatchCompleted; + impl ::subxt_core::events::StaticEvent for BatchCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompleted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Batch of dispatches completed but has errors."] + pub struct BatchCompletedWithErrors; + impl ::subxt_core::events::StaticEvent for BatchCompletedWithErrors { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompletedWithErrors"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A single item within a Batch of dispatches has completed with no error."] + pub struct ItemCompleted; + impl ::subxt_core::events::StaticEvent for ItemCompleted { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemCompleted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A single item within a Batch of dispatches has completed with error."] + pub struct ItemFailed { + pub error: item_failed::Error, + } + pub mod item_failed { + use super::runtime_types; + pub type Error = runtime_types::sp_runtime::DispatchError; + } + impl ::subxt_core::events::StaticEvent for ItemFailed { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A call was dispatched."] + pub struct DispatchedAs { + pub result: dispatched_as::Result, + } + pub mod dispatched_as { + use super::runtime_types; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for DispatchedAs { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "DispatchedAs"; + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The limit on the number of batched calls."] + pub fn batched_calls_limit( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Utility", + "batched_calls_limit", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod multisig { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_multisig::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_multisig::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] + #[doc = "multi-signature, but do not participate in the approval process."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] + pub struct AsMultiThreshold1 { + pub other_signatories: as_multi_threshold1::OtherSignatories, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod as_multi_threshold1 { + use super::runtime_types; + pub type OtherSignatories = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for AsMultiThreshold1 { + const PALLET: &'static str = "Multisig"; + const CALL: &'static str = "as_multi_threshold_1"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "If there are enough, then dispatch the call."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] + #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] + #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] + #[doc = "may be found in the deposited `MultisigExecuted` event."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S + Z + Call)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- The weight of the `call`."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + pub struct AsMulti { + pub threshold: as_multi::Threshold, + pub other_signatories: as_multi::OtherSignatories, + pub maybe_timepoint: as_multi::MaybeTimepoint, + pub call: ::subxt_core::alloc::boxed::Box, + pub max_weight: as_multi::MaxWeight, + } + pub mod as_multi { + use super::runtime_types; + pub type Threshold = ::core::primitive::u16; + pub type OtherSignatories = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type MaybeTimepoint = ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + >; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + pub type MaxWeight = runtime_types::sp_weights::weight_v2::Weight; + } + impl ::subxt_core::blocks::StaticExtrinsic for AsMulti { + const PALLET: &'static str = "Multisig"; + const CALL: &'static str = "as_multi"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + pub struct ApproveAsMulti { + pub threshold: approve_as_multi::Threshold, + pub other_signatories: approve_as_multi::OtherSignatories, + pub maybe_timepoint: approve_as_multi::MaybeTimepoint, + pub call_hash: approve_as_multi::CallHash, + pub max_weight: approve_as_multi::MaxWeight, + } + pub mod approve_as_multi { + use super::runtime_types; + pub type Threshold = ::core::primitive::u16; + pub type OtherSignatories = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type MaybeTimepoint = ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + >; + pub type CallHash = [::core::primitive::u8; 32usize]; + pub type MaxWeight = runtime_types::sp_weights::weight_v2::Weight; + } + impl ::subxt_core::blocks::StaticExtrinsic for ApproveAsMulti { + const PALLET: &'static str = "Multisig"; + const CALL: &'static str = "approve_as_multi"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] + #[doc = "transaction for this dispatch."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- One event."] + #[doc = "- I/O: 1 read `O(S)`, one remove."] + #[doc = "- Storage: removes one item."] + pub struct CancelAsMulti { + pub threshold: cancel_as_multi::Threshold, + pub other_signatories: cancel_as_multi::OtherSignatories, + pub timepoint: cancel_as_multi::Timepoint, + pub call_hash: cancel_as_multi::CallHash, + } + pub mod cancel_as_multi { + use super::runtime_types; + pub type Threshold = ::core::primitive::u16; + pub type OtherSignatories = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Timepoint = + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>; + pub type CallHash = [::core::primitive::u8; 32usize]; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelAsMulti { + const PALLET: &'static str = "Multisig"; + const CALL: &'static str = "cancel_as_multi"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] + #[doc = "multi-signature, but do not participate in the approval process."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] + pub fn as_multi_threshold_1( + &self, + other_signatories: types::as_multi_threshold1::OtherSignatories, + call: types::as_multi_threshold1::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Multisig", + "as_multi_threshold_1", + types::AsMultiThreshold1 { + other_signatories, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 73u8, 99u8, 238u8, 58u8, 92u8, 32u8, 184u8, 128u8, 130u8, 132u8, 144u8, + 41u8, 1u8, 174u8, 206u8, 16u8, 193u8, 164u8, 54u8, 21u8, 15u8, 27u8, + 104u8, 6u8, 55u8, 27u8, 75u8, 20u8, 175u8, 175u8, 196u8, 215u8, + ], + ) + } + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "If there are enough, then dispatch the call."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] + #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] + #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] + #[doc = "may be found in the deposited `MultisigExecuted` event."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S + Z + Call)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- The weight of the `call`."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + pub fn as_multi( + &self, + threshold: types::as_multi::Threshold, + other_signatories: types::as_multi::OtherSignatories, + maybe_timepoint: types::as_multi::MaybeTimepoint, + call: types::as_multi::Call, + max_weight: types::as_multi::MaxWeight, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Multisig", + "as_multi", + types::AsMulti { + threshold, + other_signatories, + maybe_timepoint, + call: ::subxt_core::alloc::boxed::Box::new(call), + max_weight, + }, + [ + 6u8, 239u8, 225u8, 252u8, 97u8, 185u8, 16u8, 113u8, 178u8, 12u8, 158u8, + 61u8, 128u8, 183u8, 231u8, 157u8, 34u8, 174u8, 231u8, 133u8, 230u8, + 0u8, 242u8, 132u8, 61u8, 199u8, 103u8, 243u8, 41u8, 226u8, 23u8, 213u8, + ], + ) + } + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + pub fn approve_as_multi( + &self, + threshold: types::approve_as_multi::Threshold, + other_signatories: types::approve_as_multi::OtherSignatories, + maybe_timepoint: types::approve_as_multi::MaybeTimepoint, + call_hash: types::approve_as_multi::CallHash, + max_weight: types::approve_as_multi::MaxWeight, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Multisig", + "approve_as_multi", + types::ApproveAsMulti { + threshold, + other_signatories, + maybe_timepoint, + call_hash, + max_weight, + }, + [ + 54u8, 141u8, 48u8, 156u8, 12u8, 82u8, 142u8, 38u8, 79u8, 125u8, 32u8, + 202u8, 3u8, 230u8, 157u8, 221u8, 206u8, 76u8, 163u8, 225u8, 18u8, + 253u8, 165u8, 17u8, 21u8, 65u8, 103u8, 79u8, 236u8, 68u8, 10u8, 21u8, + ], + ) + } + #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] + #[doc = "transaction for this dispatch."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- One event."] + #[doc = "- I/O: 1 read `O(S)`, one remove."] + #[doc = "- Storage: removes one item."] + pub fn cancel_as_multi( + &self, + threshold: types::cancel_as_multi::Threshold, + other_signatories: types::cancel_as_multi::OtherSignatories, + timepoint: types::cancel_as_multi::Timepoint, + call_hash: types::cancel_as_multi::CallHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Multisig", + "cancel_as_multi", + types::CancelAsMulti { threshold, other_signatories, timepoint, call_hash }, + [ + 118u8, 81u8, 25u8, 77u8, 172u8, 129u8, 41u8, 32u8, 104u8, 194u8, 106u8, + 92u8, 195u8, 252u8, 140u8, 31u8, 177u8, 250u8, 247u8, 73u8, 206u8, + 153u8, 131u8, 168u8, 96u8, 45u8, 216u8, 234u8, 173u8, 37u8, 226u8, + 20u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_multisig::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new multisig operation has begun."] + pub struct NewMultisig { + pub approving: new_multisig::Approving, + pub multisig: new_multisig::Multisig, + pub call_hash: new_multisig::CallHash, + } + pub mod new_multisig { + use super::runtime_types; + pub type Approving = ::subxt_core::utils::AccountId32; + pub type Multisig = ::subxt_core::utils::AccountId32; + pub type CallHash = [::core::primitive::u8; 32usize]; + } + impl ::subxt_core::events::StaticEvent for NewMultisig { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "NewMultisig"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A multisig operation has been approved by someone."] + pub struct MultisigApproval { + pub approving: multisig_approval::Approving, + pub timepoint: multisig_approval::Timepoint, + pub multisig: multisig_approval::Multisig, + pub call_hash: multisig_approval::CallHash, + } + pub mod multisig_approval { + use super::runtime_types; + pub type Approving = ::subxt_core::utils::AccountId32; + pub type Timepoint = + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>; + pub type Multisig = ::subxt_core::utils::AccountId32; + pub type CallHash = [::core::primitive::u8; 32usize]; + } + impl ::subxt_core::events::StaticEvent for MultisigApproval { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigApproval"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A multisig operation has been executed."] + pub struct MultisigExecuted { + pub approving: multisig_executed::Approving, + pub timepoint: multisig_executed::Timepoint, + pub multisig: multisig_executed::Multisig, + pub call_hash: multisig_executed::CallHash, + pub result: multisig_executed::Result, + } + pub mod multisig_executed { + use super::runtime_types; + pub type Approving = ::subxt_core::utils::AccountId32; + pub type Timepoint = + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>; + pub type Multisig = ::subxt_core::utils::AccountId32; + pub type CallHash = [::core::primitive::u8; 32usize]; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for MultisigExecuted { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigExecuted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A multisig operation has been cancelled."] + pub struct MultisigCancelled { + pub cancelling: multisig_cancelled::Cancelling, + pub timepoint: multisig_cancelled::Timepoint, + pub multisig: multisig_cancelled::Multisig, + pub call_hash: multisig_cancelled::CallHash, + } + pub mod multisig_cancelled { + use super::runtime_types; + pub type Cancelling = ::subxt_core::utils::AccountId32; + pub type Timepoint = + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>; + pub type Multisig = ::subxt_core::utils::AccountId32; + pub type CallHash = [::core::primitive::u8; 32usize]; + } + impl ::subxt_core::events::StaticEvent for MultisigCancelled { + const PALLET: &'static str = "Multisig"; + const EVENT: &'static str = "MultisigCancelled"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod multisigs { + use super::runtime_types; + pub type Multisigs = runtime_types::pallet_multisig::Multisig< + ::core::primitive::u64, + ::core::primitive::u128, + ::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + pub type Param1 = [::core::primitive::u8; 32usize]; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of open multisig operations."] + pub fn multisigs_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::multisigs::Multisigs, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Multisig", + "Multisigs", + (), + [ + 69u8, 190u8, 134u8, 80u8, 236u8, 248u8, 25u8, 153u8, 154u8, 71u8, + 192u8, 101u8, 159u8, 179u8, 0u8, 228u8, 93u8, 125u8, 99u8, 229u8, + 142u8, 117u8, 215u8, 149u8, 134u8, 13u8, 139u8, 251u8, 220u8, 251u8, + 2u8, 255u8, + ], + ) + } + #[doc = " The set of open multisig operations."] + pub fn multisigs_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::multisigs::Multisigs, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Multisig", + "Multisigs", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 69u8, 190u8, 134u8, 80u8, 236u8, 248u8, 25u8, 153u8, 154u8, 71u8, + 192u8, 101u8, 159u8, 179u8, 0u8, 228u8, 93u8, 125u8, 99u8, 229u8, + 142u8, 117u8, 215u8, 149u8, 134u8, 13u8, 139u8, 251u8, 220u8, 251u8, + 2u8, 255u8, + ], + ) + } + #[doc = " The set of open multisig operations."] + pub fn multisigs( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::multisigs::Multisigs, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Multisig", + "Multisigs", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 69u8, 190u8, 134u8, 80u8, 236u8, 248u8, 25u8, 153u8, 154u8, 71u8, + 192u8, 101u8, 159u8, 179u8, 0u8, 228u8, 93u8, 125u8, 99u8, 229u8, + 142u8, 117u8, 215u8, 149u8, 134u8, 13u8, 139u8, 251u8, 220u8, 251u8, + 2u8, 255u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a multisig execution or to"] + #[doc = " store a dispatch call for later."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is"] + #[doc = " `32 + sizeof(AccountId)` bytes."] + pub fn deposit_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Multisig", + "DepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per unit threshold when creating a multisig execution."] + #[doc = ""] + #[doc = " This is held for adding 32 bytes more into a pre-existing storage value."] + pub fn deposit_factor( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Multisig", + "DepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum amount of signatories allowed in the multisig."] + pub fn max_signatories( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Multisig", + "MaxSignatories", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod ethereum { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_ethereum::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_ethereum::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Transact an Ethereum transaction."] + pub struct Transact { + pub transaction: transact::Transaction, + } + pub mod transact { + use super::runtime_types; + pub type Transaction = runtime_types::ethereum::transaction::TransactionV2; + } + impl ::subxt_core::blocks::StaticExtrinsic for Transact { + const PALLET: &'static str = "Ethereum"; + const CALL: &'static str = "transact"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Transact an Ethereum transaction."] + pub fn transact( + &self, + transaction: types::transact::Transaction, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Ethereum", + "transact", + types::Transact { transaction }, + [ + 124u8, 9u8, 75u8, 222u8, 225u8, 49u8, 255u8, 53u8, 207u8, 220u8, 198u8, + 31u8, 26u8, 150u8, 238u8, 140u8, 230u8, 77u8, 248u8, 1u8, 97u8, 222u8, + 9u8, 32u8, 217u8, 160u8, 195u8, 4u8, 69u8, 210u8, 251u8, 109u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_ethereum::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An ethereum transaction was successfully executed."] + pub struct Executed { + pub from: executed::From, + pub to: executed::To, + pub transaction_hash: executed::TransactionHash, + pub exit_reason: executed::ExitReason, + pub extra_data: executed::ExtraData, + } + pub mod executed { + use super::runtime_types; + pub type From = ::subxt_core::utils::H160; + pub type To = ::subxt_core::utils::H160; + pub type TransactionHash = ::subxt_core::utils::H256; + pub type ExitReason = runtime_types::evm_core::error::ExitReason; + pub type ExtraData = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::events::StaticEvent for Executed { + const PALLET: &'static str = "Ethereum"; + const EVENT: &'static str = "Executed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod pending { + use super::runtime_types; + pub type Pending = ::subxt_core::alloc::vec::Vec<( + runtime_types::ethereum::transaction::TransactionV2, + runtime_types::fp_rpc::TransactionStatus, + runtime_types::ethereum::receipt::ReceiptV3, + )>; + } + pub mod current_block { + use super::runtime_types; + pub type CurrentBlock = runtime_types::ethereum::block::Block< + runtime_types::ethereum::transaction::TransactionV2, + >; + } + pub mod current_receipts { + use super::runtime_types; + pub type CurrentReceipts = + ::subxt_core::alloc::vec::Vec; + } + pub mod current_transaction_statuses { + use super::runtime_types; + pub type CurrentTransactionStatuses = + ::subxt_core::alloc::vec::Vec; + } + pub mod block_hash { + use super::runtime_types; + pub type BlockHash = ::subxt_core::utils::H256; + pub type Param0 = runtime_types::primitive_types::U256; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Current building block's transactions and receipts."] + pub fn pending( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::pending::Pending, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Ethereum", + "Pending", + (), + [ + 249u8, 60u8, 121u8, 166u8, 91u8, 128u8, 146u8, 87u8, 240u8, 165u8, + 236u8, 61u8, 65u8, 140u8, 14u8, 203u8, 169u8, 102u8, 126u8, 247u8, + 245u8, 3u8, 166u8, 188u8, 144u8, 74u8, 13u8, 2u8, 244u8, 49u8, 223u8, + 198u8, + ], + ) + } + #[doc = " The current Ethereum block."] + pub fn current_block( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_block::CurrentBlock, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Ethereum", + "CurrentBlock", + (), + [ + 54u8, 128u8, 41u8, 16u8, 65u8, 25u8, 184u8, 85u8, 192u8, 220u8, 208u8, + 92u8, 166u8, 132u8, 223u8, 50u8, 252u8, 112u8, 236u8, 217u8, 108u8, + 166u8, 131u8, 224u8, 141u8, 59u8, 248u8, 42u8, 197u8, 96u8, 240u8, + 88u8, + ], + ) + } + #[doc = " The current Ethereum receipts."] + pub fn current_receipts( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_receipts::CurrentReceipts, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Ethereum", + "CurrentReceipts", + (), + [ + 97u8, 46u8, 228u8, 135u8, 133u8, 148u8, 98u8, 3u8, 128u8, 26u8, 83u8, + 12u8, 33u8, 135u8, 88u8, 205u8, 147u8, 176u8, 13u8, 113u8, 148u8, 48u8, + 31u8, 200u8, 105u8, 224u8, 201u8, 225u8, 157u8, 108u8, 55u8, 209u8, + ], + ) + } + #[doc = " The current transaction statuses."] + pub fn current_transaction_statuses( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_transaction_statuses::CurrentTransactionStatuses, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Ethereum", + "CurrentTransactionStatuses", + (), + [ + 29u8, 20u8, 106u8, 243u8, 226u8, 102u8, 121u8, 20u8, 222u8, 53u8, 99u8, + 68u8, 173u8, 238u8, 167u8, 165u8, 192u8, 192u8, 230u8, 46u8, 231u8, + 88u8, 144u8, 159u8, 3u8, 171u8, 72u8, 125u8, 68u8, 66u8, 125u8, 165u8, + ], + ) + } + pub fn block_hash_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::block_hash::BlockHash, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Ethereum", + "BlockHash", + (), + [ + 131u8, 87u8, 201u8, 82u8, 203u8, 241u8, 176u8, 149u8, 39u8, 243u8, + 227u8, 1u8, 86u8, 62u8, 6u8, 231u8, 55u8, 6u8, 212u8, 96u8, 207u8, + 73u8, 56u8, 204u8, 215u8, 227u8, 48u8, 249u8, 67u8, 137u8, 139u8, 76u8, + ], + ) + } + pub fn block_hash( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::block_hash::BlockHash, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Ethereum", + "BlockHash", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 131u8, 87u8, 201u8, 82u8, 203u8, 241u8, 176u8, 149u8, 39u8, 243u8, + 227u8, 1u8, 86u8, 62u8, 6u8, 231u8, 55u8, 6u8, 212u8, 96u8, 207u8, + 73u8, 56u8, 204u8, 215u8, 227u8, 48u8, 249u8, 67u8, 137u8, 139u8, 76u8, + ], + ) + } + } + } + } + pub mod evm { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_evm::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_evm::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Withdraw balance from EVM into currency/balances pallet."] + pub struct Withdraw { + pub address: withdraw::Address, + pub value: withdraw::Value, + } + pub mod withdraw { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Withdraw { + const PALLET: &'static str = "EVM"; + const CALL: &'static str = "withdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Issue an EVM call operation. This is similar to a message call transaction in Ethereum."] + pub struct Call { + pub source: call::Source, + pub target: call::Target, + pub input: call::Input, + pub value: call::Value, + pub gas_limit: call::GasLimit, + pub max_fee_per_gas: call::MaxFeePerGas, + pub max_priority_fee_per_gas: call::MaxPriorityFeePerGas, + pub nonce: call::Nonce, + pub access_list: call::AccessList, + } + pub mod call { + use super::runtime_types; + pub type Source = ::subxt_core::utils::H160; + pub type Target = ::subxt_core::utils::H160; + pub type Input = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Value = runtime_types::primitive_types::U256; + pub type GasLimit = ::core::primitive::u64; + pub type MaxFeePerGas = runtime_types::primitive_types::U256; + pub type MaxPriorityFeePerGas = + ::core::option::Option; + pub type Nonce = ::core::option::Option; + pub type AccessList = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Call { + const PALLET: &'static str = "EVM"; + const CALL: &'static str = "call"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Issue an EVM create operation. This is similar to a contract creation transaction in"] + #[doc = "Ethereum."] + pub struct Create { + pub source: create::Source, + pub init: create::Init, + pub value: create::Value, + pub gas_limit: create::GasLimit, + pub max_fee_per_gas: create::MaxFeePerGas, + pub max_priority_fee_per_gas: create::MaxPriorityFeePerGas, + pub nonce: create::Nonce, + pub access_list: create::AccessList, + } + pub mod create { + use super::runtime_types; + pub type Source = ::subxt_core::utils::H160; + pub type Init = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Value = runtime_types::primitive_types::U256; + pub type GasLimit = ::core::primitive::u64; + pub type MaxFeePerGas = runtime_types::primitive_types::U256; + pub type MaxPriorityFeePerGas = + ::core::option::Option; + pub type Nonce = ::core::option::Option; + pub type AccessList = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Create { + const PALLET: &'static str = "EVM"; + const CALL: &'static str = "create"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Issue an EVM create2 operation."] + pub struct Create2 { + pub source: create2::Source, + pub init: create2::Init, + pub salt: create2::Salt, + pub value: create2::Value, + pub gas_limit: create2::GasLimit, + pub max_fee_per_gas: create2::MaxFeePerGas, + pub max_priority_fee_per_gas: create2::MaxPriorityFeePerGas, + pub nonce: create2::Nonce, + pub access_list: create2::AccessList, + } + pub mod create2 { + use super::runtime_types; + pub type Source = ::subxt_core::utils::H160; + pub type Init = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Salt = ::subxt_core::utils::H256; + pub type Value = runtime_types::primitive_types::U256; + pub type GasLimit = ::core::primitive::u64; + pub type MaxFeePerGas = runtime_types::primitive_types::U256; + pub type MaxPriorityFeePerGas = + ::core::option::Option; + pub type Nonce = ::core::option::Option; + pub type AccessList = ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Create2 { + const PALLET: &'static str = "EVM"; + const CALL: &'static str = "create2"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Withdraw balance from EVM into currency/balances pallet."] + pub fn withdraw( + &self, + address: types::withdraw::Address, + value: types::withdraw::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "EVM", + "withdraw", + types::Withdraw { address, value }, + [ + 62u8, 162u8, 234u8, 15u8, 176u8, 61u8, 183u8, 203u8, 241u8, 10u8, + 202u8, 26u8, 45u8, 116u8, 38u8, 44u8, 32u8, 57u8, 208u8, 55u8, 182u8, + 92u8, 136u8, 133u8, 216u8, 255u8, 25u8, 132u8, 242u8, 34u8, 43u8, 64u8, + ], + ) + } + #[doc = "Issue an EVM call operation. This is similar to a message call transaction in Ethereum."] + pub fn call( + &self, + source: types::call::Source, + target: types::call::Target, + input: types::call::Input, + value: types::call::Value, + gas_limit: types::call::GasLimit, + max_fee_per_gas: types::call::MaxFeePerGas, + max_priority_fee_per_gas: types::call::MaxPriorityFeePerGas, + nonce: types::call::Nonce, + access_list: types::call::AccessList, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "EVM", + "call", + types::Call { + source, + target, + input, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + access_list, + }, + [ + 121u8, 179u8, 103u8, 152u8, 89u8, 27u8, 36u8, 13u8, 114u8, 246u8, + 222u8, 197u8, 249u8, 250u8, 241u8, 66u8, 219u8, 123u8, 126u8, 144u8, + 144u8, 213u8, 165u8, 25u8, 248u8, 129u8, 86u8, 34u8, 105u8, 145u8, + 85u8, 85u8, + ], + ) + } + #[doc = "Issue an EVM create operation. This is similar to a contract creation transaction in"] + #[doc = "Ethereum."] + pub fn create( + &self, + source: types::create::Source, + init: types::create::Init, + value: types::create::Value, + gas_limit: types::create::GasLimit, + max_fee_per_gas: types::create::MaxFeePerGas, + max_priority_fee_per_gas: types::create::MaxPriorityFeePerGas, + nonce: types::create::Nonce, + access_list: types::create::AccessList, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "EVM", + "create", + types::Create { + source, + init, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + access_list, + }, + [ + 231u8, 52u8, 103u8, 5u8, 29u8, 96u8, 200u8, 245u8, 151u8, 231u8, 111u8, + 150u8, 185u8, 126u8, 12u8, 42u8, 169u8, 92u8, 68u8, 130u8, 36u8, 11u8, + 234u8, 211u8, 199u8, 200u8, 45u8, 10u8, 53u8, 91u8, 226u8, 145u8, + ], + ) + } + #[doc = "Issue an EVM create2 operation."] + pub fn create2( + &self, + source: types::create2::Source, + init: types::create2::Init, + salt: types::create2::Salt, + value: types::create2::Value, + gas_limit: types::create2::GasLimit, + max_fee_per_gas: types::create2::MaxFeePerGas, + max_priority_fee_per_gas: types::create2::MaxPriorityFeePerGas, + nonce: types::create2::Nonce, + access_list: types::create2::AccessList, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "EVM", + "create2", + types::Create2 { + source, + init, + salt, + value, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + access_list, + }, + [ + 73u8, 157u8, 32u8, 232u8, 164u8, 93u8, 191u8, 129u8, 171u8, 104u8, + 212u8, 108u8, 167u8, 5u8, 61u8, 171u8, 247u8, 97u8, 122u8, 162u8, + 102u8, 152u8, 224u8, 130u8, 94u8, 112u8, 115u8, 68u8, 249u8, 215u8, + 233u8, 115u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_evm::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Ethereum events from contracts."] + pub struct Log { + pub log: log::Log, + } + pub mod log { + use super::runtime_types; + pub type Log = runtime_types::ethereum::log::Log; + } + impl ::subxt_core::events::StaticEvent for Log { + const PALLET: &'static str = "EVM"; + const EVENT: &'static str = "Log"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A contract has been created at given address."] + pub struct Created { + pub address: created::Address, + } + pub mod created { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + } + impl ::subxt_core::events::StaticEvent for Created { + const PALLET: &'static str = "EVM"; + const EVENT: &'static str = "Created"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A contract was attempted to be created, but the execution failed."] + pub struct CreatedFailed { + pub address: created_failed::Address, + } + pub mod created_failed { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + } + impl ::subxt_core::events::StaticEvent for CreatedFailed { + const PALLET: &'static str = "EVM"; + const EVENT: &'static str = "CreatedFailed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A contract has been executed successfully with states applied."] + pub struct Executed { + pub address: executed::Address, + } + pub mod executed { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + } + impl ::subxt_core::events::StaticEvent for Executed { + const PALLET: &'static str = "EVM"; + const EVENT: &'static str = "Executed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A contract has been executed with errors. States are reverted with only gas fees applied."] + pub struct ExecutedFailed { + pub address: executed_failed::Address, + } + pub mod executed_failed { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + } + impl ::subxt_core::events::StaticEvent for ExecutedFailed { + const PALLET: &'static str = "EVM"; + const EVENT: &'static str = "ExecutedFailed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod account_codes { + use super::runtime_types; + pub type AccountCodes = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Param0 = ::subxt_core::utils::H160; + } + pub mod account_codes_metadata { + use super::runtime_types; + pub type AccountCodesMetadata = runtime_types::pallet_evm::CodeMetadata; + pub type Param0 = ::subxt_core::utils::H160; + } + pub mod account_storages { + use super::runtime_types; + pub type AccountStorages = ::subxt_core::utils::H256; + pub type Param0 = ::subxt_core::utils::H160; + pub type Param1 = ::subxt_core::utils::H256; + } + pub mod suicided { + use super::runtime_types; + pub type Suicided = (); + pub type Param0 = ::subxt_core::utils::H160; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn account_codes_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account_codes::AccountCodes, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountCodes", + (), + [ + 49u8, 73u8, 188u8, 164u8, 3u8, 40u8, 187u8, 216u8, 70u8, 119u8, 176u8, + 187u8, 76u8, 24u8, 49u8, 174u8, 54u8, 98u8, 208u8, 255u8, 38u8, 214u8, + 120u8, 116u8, 130u8, 139u8, 44u8, 102u8, 115u8, 222u8, 63u8, 56u8, + ], + ) + } + pub fn account_codes( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::account_codes::AccountCodes, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountCodes", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 49u8, 73u8, 188u8, 164u8, 3u8, 40u8, 187u8, 216u8, 70u8, 119u8, 176u8, + 187u8, 76u8, 24u8, 49u8, 174u8, 54u8, 98u8, 208u8, 255u8, 38u8, 214u8, + 120u8, 116u8, 130u8, 139u8, 44u8, 102u8, 115u8, 222u8, 63u8, 56u8, + ], + ) + } + pub fn account_codes_metadata_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account_codes_metadata::AccountCodesMetadata, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountCodesMetadata", + (), + [ + 17u8, 83u8, 22u8, 15u8, 158u8, 242u8, 39u8, 174u8, 61u8, 230u8, 0u8, + 161u8, 173u8, 242u8, 155u8, 156u8, 149u8, 108u8, 47u8, 129u8, 190u8, + 223u8, 25u8, 235u8, 168u8, 86u8, 49u8, 118u8, 132u8, 93u8, 100u8, + 173u8, + ], + ) + } + pub fn account_codes_metadata( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::account_codes_metadata::Param0, + >, + types::account_codes_metadata::AccountCodesMetadata, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountCodesMetadata", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 17u8, 83u8, 22u8, 15u8, 158u8, 242u8, 39u8, 174u8, 61u8, 230u8, 0u8, + 161u8, 173u8, 242u8, 155u8, 156u8, 149u8, 108u8, 47u8, 129u8, 190u8, + 223u8, 25u8, 235u8, 168u8, 86u8, 49u8, 118u8, 132u8, 93u8, 100u8, + 173u8, + ], + ) + } + pub fn account_storages_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::account_storages::AccountStorages, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountStorages", + (), + [ + 63u8, 69u8, 109u8, 3u8, 190u8, 233u8, 39u8, 122u8, 94u8, 37u8, 74u8, + 90u8, 197u8, 191u8, 12u8, 119u8, 165u8, 61u8, 217u8, 15u8, 36u8, 167u8, + 211u8, 120u8, 169u8, 97u8, 13u8, 38u8, 148u8, 224u8, 167u8, 199u8, + ], + ) + } + pub fn account_storages_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::account_storages::Param0, + >, + types::account_storages::AccountStorages, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountStorages", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 63u8, 69u8, 109u8, 3u8, 190u8, 233u8, 39u8, 122u8, 94u8, 37u8, 74u8, + 90u8, 197u8, 191u8, 12u8, 119u8, 165u8, 61u8, 217u8, 15u8, 36u8, 167u8, + 211u8, 120u8, 169u8, 97u8, 13u8, 38u8, 148u8, 224u8, 167u8, 199u8, + ], + ) + } + pub fn account_storages( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::account_storages::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::account_storages::Param1, + >, + ), + types::account_storages::AccountStorages, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "AccountStorages", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 63u8, 69u8, 109u8, 3u8, 190u8, 233u8, 39u8, 122u8, 94u8, 37u8, 74u8, + 90u8, 197u8, 191u8, 12u8, 119u8, 165u8, 61u8, 217u8, 15u8, 36u8, 167u8, + 211u8, 120u8, 169u8, 97u8, 13u8, 38u8, 148u8, 224u8, 167u8, 199u8, + ], + ) + } + pub fn suicided_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::suicided::Suicided, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "Suicided", + (), + [ + 5u8, 137u8, 180u8, 131u8, 216u8, 217u8, 148u8, 127u8, 9u8, 159u8, 14u8, + 25u8, 56u8, 99u8, 55u8, 151u8, 140u8, 143u8, 188u8, 172u8, 33u8, 91u8, + 42u8, 59u8, 104u8, 94u8, 215u8, 41u8, 224u8, 118u8, 190u8, 249u8, + ], + ) + } + pub fn suicided( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::suicided::Suicided, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVM", + "Suicided", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 5u8, 137u8, 180u8, 131u8, 216u8, 217u8, 148u8, 127u8, 9u8, 159u8, 14u8, + 25u8, 56u8, 99u8, 55u8, 151u8, 140u8, 143u8, 188u8, 172u8, 33u8, 91u8, + 42u8, 59u8, 104u8, 94u8, 215u8, 41u8, 224u8, 118u8, 190u8, 249u8, + ], + ) + } + } + } + } + pub mod evm_chain_id { + use super::root_mod; + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod chain_id { + use super::runtime_types; + pub type ChainId = ::core::primitive::u64; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The EVM chain ID."] + pub fn chain_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::chain_id::ChainId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "EVMChainId", + "ChainId", + (), + [ + 250u8, 158u8, 90u8, 220u8, 184u8, 126u8, 207u8, 222u8, 62u8, 226u8, + 144u8, 204u8, 19u8, 136u8, 127u8, 5u8, 135u8, 48u8, 234u8, 138u8, + 216u8, 103u8, 28u8, 140u8, 193u8, 197u8, 142u8, 22u8, 159u8, 16u8, + 225u8, 255u8, + ], + ) + } + } + } + } + pub mod dynamic_fee { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_dynamic_fee::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct NoteMinGasPriceTarget { + pub target: note_min_gas_price_target::Target, + } + pub mod note_min_gas_price_target { + use super::runtime_types; + pub type Target = runtime_types::primitive_types::U256; + } + impl ::subxt_core::blocks::StaticExtrinsic for NoteMinGasPriceTarget { + const PALLET: &'static str = "DynamicFee"; + const CALL: &'static str = "note_min_gas_price_target"; + } + } + pub struct TransactionApi; + impl TransactionApi { + pub fn note_min_gas_price_target( + &self, + target: types::note_min_gas_price_target::Target, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "DynamicFee", + "note_min_gas_price_target", + types::NoteMinGasPriceTarget { target }, + [ + 195u8, 135u8, 128u8, 209u8, 249u8, 41u8, 223u8, 153u8, 197u8, 51u8, + 194u8, 204u8, 79u8, 173u8, 113u8, 25u8, 6u8, 153u8, 167u8, 20u8, 24u8, + 86u8, 205u8, 157u8, 213u8, 248u8, 52u8, 247u8, 209u8, 0u8, 17u8, 171u8, + ], + ) + } + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod min_gas_price { + use super::runtime_types; + pub type MinGasPrice = runtime_types::primitive_types::U256; + } + pub mod target_min_gas_price { + use super::runtime_types; + pub type TargetMinGasPrice = runtime_types::primitive_types::U256; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn min_gas_price( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_gas_price::MinGasPrice, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "DynamicFee", + "MinGasPrice", + (), + [ + 135u8, 244u8, 108u8, 147u8, 120u8, 36u8, 33u8, 200u8, 200u8, 249u8, + 110u8, 39u8, 180u8, 17u8, 231u8, 219u8, 95u8, 60u8, 227u8, 68u8, 150u8, + 151u8, 67u8, 45u8, 235u8, 130u8, 4u8, 244u8, 35u8, 112u8, 69u8, 119u8, + ], + ) + } + pub fn target_min_gas_price( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::target_min_gas_price::TargetMinGasPrice, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "DynamicFee", + "TargetMinGasPrice", + (), + [ + 219u8, 94u8, 37u8, 223u8, 148u8, 89u8, 16u8, 136u8, 218u8, 154u8, 54u8, + 94u8, 202u8, 5u8, 82u8, 185u8, 235u8, 239u8, 152u8, 206u8, 203u8, 71u8, + 237u8, 200u8, 28u8, 250u8, 217u8, 29u8, 132u8, 255u8, 78u8, 94u8, + ], + ) + } + } + } + } + pub mod base_fee { + use super::root_mod; + use super::runtime_types; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_base_fee::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SetBaseFeePerGas { + pub fee: set_base_fee_per_gas::Fee, + } + pub mod set_base_fee_per_gas { + use super::runtime_types; + pub type Fee = runtime_types::primitive_types::U256; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetBaseFeePerGas { + const PALLET: &'static str = "BaseFee"; + const CALL: &'static str = "set_base_fee_per_gas"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SetElasticity { + pub elasticity: set_elasticity::Elasticity, + } + pub mod set_elasticity { + use super::runtime_types; + pub type Elasticity = runtime_types::sp_arithmetic::per_things::Permill; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetElasticity { + const PALLET: &'static str = "BaseFee"; + const CALL: &'static str = "set_elasticity"; + } + } + pub struct TransactionApi; + impl TransactionApi { + pub fn set_base_fee_per_gas( + &self, + fee: types::set_base_fee_per_gas::Fee, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "BaseFee", + "set_base_fee_per_gas", + types::SetBaseFeePerGas { fee }, + [ + 126u8, 236u8, 128u8, 184u8, 42u8, 39u8, 13u8, 175u8, 155u8, 36u8, + 229u8, 20u8, 13u8, 15u8, 88u8, 56u8, 206u8, 44u8, 127u8, 182u8, 120u8, + 212u8, 35u8, 72u8, 100u8, 181u8, 64u8, 200u8, 63u8, 129u8, 167u8, + 132u8, + ], + ) + } + pub fn set_elasticity( + &self, + elasticity: types::set_elasticity::Elasticity, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "BaseFee", + "set_elasticity", + types::SetElasticity { elasticity }, + [ + 209u8, 8u8, 19u8, 35u8, 199u8, 151u8, 122u8, 91u8, 181u8, 133u8, 162u8, + 167u8, 186u8, 150u8, 54u8, 83u8, 101u8, 180u8, 188u8, 136u8, 111u8, + 100u8, 76u8, 51u8, 118u8, 171u8, 15u8, 75u8, 120u8, 106u8, 37u8, 1u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_base_fee::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct NewBaseFeePerGas { + pub fee: new_base_fee_per_gas::Fee, + } + pub mod new_base_fee_per_gas { + use super::runtime_types; + pub type Fee = runtime_types::primitive_types::U256; + } + impl ::subxt_core::events::StaticEvent for NewBaseFeePerGas { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "NewBaseFeePerGas"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BaseFeeOverflow; + impl ::subxt_core::events::StaticEvent for BaseFeeOverflow { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "BaseFeeOverflow"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct NewElasticity { + pub elasticity: new_elasticity::Elasticity, + } + pub mod new_elasticity { + use super::runtime_types; + pub type Elasticity = runtime_types::sp_arithmetic::per_things::Permill; + } + impl ::subxt_core::events::StaticEvent for NewElasticity { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "NewElasticity"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod base_fee_per_gas { + use super::runtime_types; + pub type BaseFeePerGas = runtime_types::primitive_types::U256; + } + pub mod elasticity { + use super::runtime_types; + pub type Elasticity = runtime_types::sp_arithmetic::per_things::Permill; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn base_fee_per_gas( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::base_fee_per_gas::BaseFeePerGas, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BaseFee", + "BaseFeePerGas", + (), + [ + 23u8, 173u8, 98u8, 22u8, 131u8, 239u8, 122u8, 219u8, 222u8, 84u8, + 207u8, 52u8, 213u8, 196u8, 3u8, 24u8, 152u8, 146u8, 63u8, 77u8, 22u8, + 153u8, 2u8, 75u8, 11u8, 89u8, 89u8, 173u8, 123u8, 33u8, 247u8, 9u8, + ], + ) + } + pub fn elasticity( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::elasticity::Elasticity, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "BaseFee", + "Elasticity", + (), + [ + 196u8, 184u8, 245u8, 90u8, 25u8, 50u8, 66u8, 69u8, 140u8, 128u8, 179u8, + 63u8, 197u8, 133u8, 135u8, 141u8, 56u8, 0u8, 143u8, 241u8, 200u8, + 114u8, 73u8, 157u8, 85u8, 190u8, 1u8, 2u8, 208u8, 235u8, 62u8, 16u8, + ], + ) + } + } + } + } + pub mod hotfix_sufficients { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_hotfix_sufficients::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_hotfix_sufficients::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Increment `sufficients` for existing accounts having a nonzero `nonce` but zero `sufficients`, `consumers` and `providers` value."] + #[doc = "This state was caused by a previous bug in EVM create account dispatchable."] + #[doc = ""] + #[doc = "Any accounts in the input list not satisfying the above condition will remain unaffected."] + pub struct HotfixIncAccountSufficients { + pub addresses: hotfix_inc_account_sufficients::Addresses, + } + pub mod hotfix_inc_account_sufficients { + use super::runtime_types; + pub type Addresses = ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H160>; + } + impl ::subxt_core::blocks::StaticExtrinsic for HotfixIncAccountSufficients { + const PALLET: &'static str = "HotfixSufficients"; + const CALL: &'static str = "hotfix_inc_account_sufficients"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Increment `sufficients` for existing accounts having a nonzero `nonce` but zero `sufficients`, `consumers` and `providers` value."] + #[doc = "This state was caused by a previous bug in EVM create account dispatchable."] + #[doc = ""] + #[doc = "Any accounts in the input list not satisfying the above condition will remain unaffected."] + pub fn hotfix_inc_account_sufficients( + &self, + addresses: types::hotfix_inc_account_sufficients::Addresses, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "HotfixSufficients", + "hotfix_inc_account_sufficients", + types::HotfixIncAccountSufficients { addresses }, + [ + 135u8, 117u8, 192u8, 209u8, 218u8, 115u8, 124u8, 21u8, 78u8, 250u8, + 55u8, 209u8, 86u8, 92u8, 17u8, 196u8, 209u8, 131u8, 185u8, 20u8, 166u8, + 25u8, 175u8, 119u8, 21u8, 155u8, 139u8, 112u8, 128u8, 35u8, 223u8, + 195u8, + ], + ) + } + } + } + } + pub mod claims { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_airdrop_claims::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_airdrop_claims::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Make a claim to collect your tokens."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to claim is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] + #[doc = ""] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)"] + #[doc = ""] + #[doc = "and `address` matches the `dest` account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message matching the format"] + #[doc = " described above."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub struct Claim { + pub dest: claim::Dest, + pub signer: claim::Signer, + pub signature: claim::Signature, + } + pub mod claim { + use super::runtime_types; + pub type Dest = ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >; + pub type Signer = ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >; + pub type Signature = + runtime_types::pallet_airdrop_claims::utils::MultiAddressSignature; + } + impl ::subxt_core::blocks::StaticExtrinsic for Claim { + const PALLET: &'static str = "Claims"; + const CALL: &'static str = "claim"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Mint a new claim to collect native tokens."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `who`: The Ethereum address allowed to collect this claim."] + #[doc = "- `value`: The number of native tokens that will be claimed."] + #[doc = "- `vesting_schedule`: An optional vesting schedule for these native tokens."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "We assume worst case that both vesting and statement is being inserted."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub struct MintClaim { + pub who: mint_claim::Who, + pub value: mint_claim::Value, + pub vesting_schedule: mint_claim::VestingSchedule, + pub statement: mint_claim::Statement, + } + pub mod mint_claim { + use super::runtime_types; + pub type Who = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + pub type Value = ::core::primitive::u128; + pub type VestingSchedule = ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u64, + )>, + >; + pub type Statement = + ::core::option::Option; + } + impl ::subxt_core::blocks::StaticExtrinsic for MintClaim { + const PALLET: &'static str = "Claims"; + const CALL: &'static str = "mint_claim"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Make a claim to collect your native tokens by signing a statement."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] + #[doc = ""] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)(statement)"] + #[doc = ""] + #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] + #[doc = "expected according to your purchase arrangement."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message matching the format"] + #[doc = " described above."] + #[doc = "- `statement`: The identity of the statement which is being attested to in the"] + #[doc = " signature."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub struct ClaimAttest { + pub dest: claim_attest::Dest, + pub signer: claim_attest::Signer, + pub signature: claim_attest::Signature, + pub statement: claim_attest::Statement, + } + pub mod claim_attest { + use super::runtime_types; + pub type Dest = ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >; + pub type Signer = ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >; + pub type Signature = + runtime_types::pallet_airdrop_claims::utils::MultiAddressSignature; + pub type Statement = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimAttest { + const PALLET: &'static str = "Claims"; + const CALL: &'static str = "claim_attest"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MoveClaim { + pub old: move_claim::Old, + pub new: move_claim::New, + } + pub mod move_claim { + use super::runtime_types; + pub type Old = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + pub type New = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + } + impl ::subxt_core::blocks::StaticExtrinsic for MoveClaim { + const PALLET: &'static str = "Claims"; + const CALL: &'static str = "move_claim"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the value for expiryconfig"] + #[doc = "Can only be called by ForceOrigin"] + pub struct ForceSetExpiryConfig { + pub expiry_block: force_set_expiry_config::ExpiryBlock, + pub dest: force_set_expiry_config::Dest, + } + pub mod force_set_expiry_config { + use super::runtime_types; + pub type ExpiryBlock = ::core::primitive::u64; + pub type Dest = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + } + impl ::subxt_core::blocks::StaticExtrinsic for ForceSetExpiryConfig { + const PALLET: &'static str = "Claims"; + const CALL: &'static str = "force_set_expiry_config"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claim from signed origin"] + pub struct ClaimSigned { + pub dest: claim_signed::Dest, + } + pub mod claim_signed { + use super::runtime_types; + pub type Dest = ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimSigned { + const PALLET: &'static str = "Claims"; + const CALL: &'static str = "claim_signed"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Make a claim to collect your tokens."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to claim is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] + #[doc = ""] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)"] + #[doc = ""] + #[doc = "and `address` matches the `dest` account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message matching the format"] + #[doc = " described above."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim( + &self, + dest: types::claim::Dest, + signer: types::claim::Signer, + signature: types::claim::Signature, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Claims", + "claim", + types::Claim { dest, signer, signature }, + [ + 174u8, 87u8, 36u8, 13u8, 129u8, 107u8, 7u8, 172u8, 33u8, 255u8, 26u8, + 144u8, 100u8, 170u8, 87u8, 71u8, 69u8, 246u8, 25u8, 150u8, 154u8, 46u8, + 145u8, 113u8, 28u8, 9u8, 137u8, 144u8, 239u8, 195u8, 147u8, 27u8, + ], + ) + } + #[doc = "Mint a new claim to collect native tokens."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `who`: The Ethereum address allowed to collect this claim."] + #[doc = "- `value`: The number of native tokens that will be claimed."] + #[doc = "- `vesting_schedule`: An optional vesting schedule for these native tokens."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "We assume worst case that both vesting and statement is being inserted."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn mint_claim( + &self, + who: types::mint_claim::Who, + value: types::mint_claim::Value, + vesting_schedule: types::mint_claim::VestingSchedule, + statement: types::mint_claim::Statement, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Claims", + "mint_claim", + types::MintClaim { who, value, vesting_schedule, statement }, + [ + 242u8, 253u8, 106u8, 199u8, 247u8, 60u8, 244u8, 130u8, 62u8, 97u8, + 108u8, 22u8, 29u8, 146u8, 25u8, 16u8, 185u8, 223u8, 212u8, 253u8, + 117u8, 169u8, 156u8, 186u8, 58u8, 11u8, 116u8, 255u8, 197u8, 172u8, + 78u8, 58u8, + ], + ) + } + #[doc = "Make a claim to collect your native tokens by signing a statement."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] + #[doc = ""] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)(statement)"] + #[doc = ""] + #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] + #[doc = "expected according to your purchase arrangement."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message matching the format"] + #[doc = " described above."] + #[doc = "- `statement`: The identity of the statement which is being attested to in the"] + #[doc = " signature."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + pub fn claim_attest( + &self, + dest: types::claim_attest::Dest, + signer: types::claim_attest::Signer, + signature: types::claim_attest::Signature, + statement: types::claim_attest::Statement, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Claims", + "claim_attest", + types::ClaimAttest { dest, signer, signature, statement }, + [ + 107u8, 31u8, 239u8, 61u8, 103u8, 231u8, 139u8, 136u8, 92u8, 195u8, + 182u8, 139u8, 173u8, 131u8, 153u8, 42u8, 104u8, 123u8, 8u8, 8u8, 135u8, + 149u8, 164u8, 140u8, 56u8, 147u8, 15u8, 89u8, 126u8, 154u8, 139u8, + 71u8, + ], + ) + } + pub fn move_claim( + &self, + old: types::move_claim::Old, + new: types::move_claim::New, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Claims", + "move_claim", + types::MoveClaim { old, new }, + [ + 158u8, 85u8, 19u8, 154u8, 152u8, 57u8, 252u8, 225u8, 31u8, 9u8, 80u8, + 0u8, 17u8, 78u8, 224u8, 34u8, 255u8, 2u8, 53u8, 220u8, 242u8, 220u8, + 185u8, 48u8, 155u8, 1u8, 71u8, 53u8, 112u8, 111u8, 5u8, 42u8, + ], + ) + } + #[doc = "Set the value for expiryconfig"] + #[doc = "Can only be called by ForceOrigin"] + pub fn force_set_expiry_config( + &self, + expiry_block: types::force_set_expiry_config::ExpiryBlock, + dest: types::force_set_expiry_config::Dest, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Claims", + "force_set_expiry_config", + types::ForceSetExpiryConfig { expiry_block, dest }, + [ + 102u8, 135u8, 138u8, 85u8, 68u8, 159u8, 220u8, 113u8, 148u8, 11u8, + 123u8, 91u8, 3u8, 149u8, 37u8, 92u8, 153u8, 156u8, 210u8, 174u8, 145u8, + 192u8, 149u8, 238u8, 53u8, 217u8, 190u8, 157u8, 224u8, 188u8, 7u8, + 92u8, + ], + ) + } + #[doc = "Claim from signed origin"] + pub fn claim_signed( + &self, + dest: types::claim_signed::Dest, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Claims", + "claim_signed", + types::ClaimSigned { dest }, + [ + 123u8, 242u8, 127u8, 158u8, 93u8, 47u8, 145u8, 109u8, 101u8, 8u8, 53u8, + 129u8, 183u8, 214u8, 245u8, 158u8, 191u8, 186u8, 66u8, 55u8, 44u8, + 254u8, 130u8, 197u8, 44u8, 39u8, 48u8, 194u8, 241u8, 45u8, 253u8, + 176u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_airdrop_claims::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Someone claimed some native tokens."] + pub struct Claimed { + pub recipient: claimed::Recipient, + pub source: claimed::Source, + pub amount: claimed::Amount, + } + pub mod claimed { + use super::runtime_types; + pub type Recipient = ::subxt_core::utils::AccountId32; + pub type Source = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Claimed { + const PALLET: &'static str = "Claims"; + const EVENT: &'static str = "Claimed"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod claims { + use super::runtime_types; + pub type Claims = ::core::primitive::u128; + pub type Param0 = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + } + pub mod total { + use super::runtime_types; + pub type Total = ::core::primitive::u128; + } + pub mod expiry_config { + use super::runtime_types; + pub type ExpiryConfig = ( + ::core::primitive::u64, + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + ); + } + pub mod vesting { + use super::runtime_types; + pub type Vesting = runtime_types::bounded_collections::bounded_vec::BoundedVec< + (::core::primitive::u128, ::core::primitive::u128, ::core::primitive::u64), + >; + pub type Param0 = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + } + pub mod signing { + use super::runtime_types; + pub type Signing = runtime_types::pallet_airdrop_claims::StatementKind; + pub type Param0 = runtime_types::pallet_airdrop_claims::utils::MultiAddress; + } + } + pub struct StorageApi; + impl StorageApi { + pub fn claims_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::claims::Claims, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Claims", + (), + [ + 175u8, 97u8, 79u8, 164u8, 220u8, 228u8, 14u8, 49u8, 136u8, 218u8, 96u8, + 209u8, 66u8, 54u8, 156u8, 95u8, 86u8, 234u8, 219u8, 166u8, 181u8, 93u8, + 48u8, 201u8, 147u8, 253u8, 55u8, 28u8, 8u8, 81u8, 204u8, 255u8, + ], + ) + } + pub fn claims( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::claims::Claims, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Claims", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 175u8, 97u8, 79u8, 164u8, 220u8, 228u8, 14u8, 49u8, 136u8, 218u8, 96u8, + 209u8, 66u8, 54u8, 156u8, 95u8, 86u8, 234u8, 219u8, 166u8, 181u8, 93u8, + 48u8, 201u8, 147u8, 253u8, 55u8, 28u8, 8u8, 81u8, 204u8, 255u8, + ], + ) + } + pub fn total( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::total::Total, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Total", + (), + [ + 188u8, 31u8, 219u8, 189u8, 49u8, 213u8, 203u8, 89u8, 125u8, 58u8, + 232u8, 159u8, 131u8, 155u8, 166u8, 113u8, 99u8, 24u8, 40u8, 242u8, + 118u8, 183u8, 108u8, 230u8, 135u8, 150u8, 84u8, 86u8, 118u8, 91u8, + 168u8, 62u8, + ], + ) + } + #[doc = " Expiry block and account to deposit expired funds"] + pub fn expiry_config( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::expiry_config::ExpiryConfig, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "ExpiryConfig", + (), + [ + 104u8, 249u8, 22u8, 81u8, 1u8, 147u8, 78u8, 127u8, 228u8, 229u8, 17u8, + 129u8, 253u8, 171u8, 42u8, 125u8, 147u8, 73u8, 241u8, 242u8, 199u8, + 44u8, 67u8, 51u8, 206u8, 29u8, 127u8, 229u8, 218u8, 160u8, 132u8, 24u8, + ], + ) + } + #[doc = " Vesting schedule for a claim."] + #[doc = " First balance is the total amount that should be held for vesting."] + #[doc = " Second balance is how much should be unlocked per block."] + #[doc = " The block number is when the vesting should start."] + pub fn vesting_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::vesting::Vesting, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Vesting", + (), + [ + 166u8, 245u8, 205u8, 165u8, 58u8, 90u8, 122u8, 157u8, 28u8, 220u8, + 114u8, 22u8, 73u8, 221u8, 230u8, 238u8, 57u8, 16u8, 66u8, 5u8, 63u8, + 105u8, 184u8, 141u8, 99u8, 116u8, 130u8, 150u8, 180u8, 165u8, 119u8, + 35u8, + ], + ) + } + #[doc = " Vesting schedule for a claim."] + #[doc = " First balance is the total amount that should be held for vesting."] + #[doc = " Second balance is how much should be unlocked per block."] + #[doc = " The block number is when the vesting should start."] + pub fn vesting( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::vesting::Vesting, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Vesting", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 166u8, 245u8, 205u8, 165u8, 58u8, 90u8, 122u8, 157u8, 28u8, 220u8, + 114u8, 22u8, 73u8, 221u8, 230u8, 238u8, 57u8, 16u8, 66u8, 5u8, 63u8, + 105u8, 184u8, 141u8, 99u8, 116u8, 130u8, 150u8, 180u8, 165u8, 119u8, + 35u8, + ], + ) + } + #[doc = " The statement kind that must be signed, if any."] + pub fn signing_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::signing::Signing, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Signing", + (), + [ + 210u8, 2u8, 184u8, 130u8, 98u8, 38u8, 101u8, 191u8, 250u8, 166u8, + 246u8, 153u8, 175u8, 181u8, 174u8, 232u8, 58u8, 4u8, 40u8, 112u8, 68u8, + 213u8, 124u8, 49u8, 250u8, 95u8, 49u8, 122u8, 144u8, 206u8, 57u8, 51u8, + ], + ) + } + #[doc = " The statement kind that must be signed, if any."] + pub fn signing( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::signing::Signing, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Claims", + "Signing", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 210u8, 2u8, 184u8, 130u8, 98u8, 38u8, 101u8, 191u8, 250u8, 166u8, + 246u8, 153u8, 175u8, 181u8, 174u8, 232u8, 58u8, 4u8, 40u8, 112u8, 68u8, + 213u8, 124u8, 49u8, 250u8, 95u8, 49u8, 122u8, 144u8, 206u8, 57u8, 51u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn prefix( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Claims", + "Prefix", + [ + 64u8, 190u8, 244u8, 122u8, 87u8, 182u8, 217u8, 16u8, 55u8, 223u8, + 128u8, 6u8, 112u8, 30u8, 236u8, 222u8, 153u8, 53u8, 247u8, 102u8, + 196u8, 31u8, 6u8, 186u8, 251u8, 209u8, 114u8, 125u8, 213u8, 222u8, + 240u8, 8u8, + ], + ) + } + } + } + } + pub mod proxy { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_proxy::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_proxy::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub struct Proxy { + pub real: proxy::Real, + pub force_proxy_type: proxy::ForceProxyType, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod proxy { + use super::runtime_types; + pub type Real = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type ForceProxyType = + ::core::option::Option; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for Proxy { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "proxy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + pub struct AddProxy { + pub delegate: add_proxy::Delegate, + pub proxy_type: add_proxy::ProxyType, + pub delay: add_proxy::Delay, + } + pub mod add_proxy { + use super::runtime_types; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type Delay = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for AddProxy { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "add_proxy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unregister a proxy account for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + pub struct RemoveProxy { + pub delegate: remove_proxy::Delegate, + pub proxy_type: remove_proxy::ProxyType, + pub delay: remove_proxy::Delay, + } + pub mod remove_proxy { + use super::runtime_types; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type Delay = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveProxy { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "remove_proxy"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unregister all proxy accounts for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + pub struct RemoveProxies; + impl ::subxt_core::blocks::StaticExtrinsic for RemoveProxies { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "remove_proxies"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] + #[doc = ""] + #[doc = "Requires a `Signed` origin."] + #[doc = ""] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + #[doc = ""] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] + #[doc = ""] + #[doc = "Fails if there are insufficient funds to pay for deposit."] + pub struct CreatePure { + pub proxy_type: create_pure::ProxyType, + pub delay: create_pure::Delay, + pub index: create_pure::Index, + } + pub mod create_pure { + use super::runtime_types; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type Delay = ::core::primitive::u64; + pub type Index = ::core::primitive::u16; + } + impl ::subxt_core::blocks::StaticExtrinsic for CreatePure { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "create_pure"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Removes a previously spawned pure proxy."] + #[doc = ""] + #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] + #[doc = ""] + #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] + #[doc = ""] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = ""] + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + pub struct KillPure { + pub spawner: kill_pure::Spawner, + pub proxy_type: kill_pure::ProxyType, + pub index: kill_pure::Index, + #[codec(compact)] + pub height: kill_pure::Height, + #[codec(compact)] + pub ext_index: kill_pure::ExtIndex, + } + pub mod kill_pure { + use super::runtime_types; + pub type Spawner = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type Index = ::core::primitive::u16; + pub type Height = ::core::primitive::u64; + pub type ExtIndex = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for KillPure { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "kill_pure"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Publish the hash of a proxy-call that will be made in the future."] + #[doc = ""] + #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = ""] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = ""] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub struct Announce { + pub real: announce::Real, + pub call_hash: announce::CallHash, + } + pub mod announce { + use super::runtime_types; + pub type Real = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type CallHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for Announce { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "announce"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove a given announcement."] + #[doc = ""] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub struct RemoveAnnouncement { + pub real: remove_announcement::Real, + pub call_hash: remove_announcement::CallHash, + } + pub mod remove_announcement { + use super::runtime_types; + pub type Real = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type CallHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveAnnouncement { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "remove_announcement"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Remove the given announcement of a delegate."] + #[doc = ""] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + pub struct RejectAnnouncement { + pub delegate: reject_announcement::Delegate, + pub call_hash: reject_announcement::CallHash, + } + pub mod reject_announcement { + use super::runtime_types; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type CallHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::blocks::StaticExtrinsic for RejectAnnouncement { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "reject_announcement"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub struct ProxyAnnounced { + pub delegate: proxy_announced::Delegate, + pub real: proxy_announced::Real, + pub force_proxy_type: proxy_announced::ForceProxyType, + pub call: ::subxt_core::alloc::boxed::Box, + } + pub mod proxy_announced { + use super::runtime_types; + pub type Delegate = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Real = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type ForceProxyType = + ::core::option::Option; + pub type Call = runtime_types::tangle_testnet_runtime::RuntimeCall; + } + impl ::subxt_core::blocks::StaticExtrinsic for ProxyAnnounced { + const PALLET: &'static str = "Proxy"; + const CALL: &'static str = "proxy_announced"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy( + &self, + real: types::proxy::Real, + force_proxy_type: types::proxy::ForceProxyType, + call: types::proxy::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "proxy", + types::Proxy { + real, + force_proxy_type, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 80u8, 194u8, 182u8, 148u8, 168u8, 19u8, 162u8, 203u8, 211u8, 253u8, + 202u8, 6u8, 127u8, 99u8, 178u8, 165u8, 17u8, 225u8, 212u8, 156u8, 87u8, + 127u8, 152u8, 137u8, 209u8, 172u8, 145u8, 221u8, 101u8, 6u8, 47u8, + 227u8, + ], + ) + } + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + pub fn add_proxy( + &self, + delegate: types::add_proxy::Delegate, + proxy_type: types::add_proxy::ProxyType, + delay: types::add_proxy::Delay, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "add_proxy", + types::AddProxy { delegate, proxy_type, delay }, + [ + 204u8, 170u8, 8u8, 148u8, 160u8, 168u8, 107u8, 62u8, 50u8, 75u8, 3u8, + 71u8, 179u8, 30u8, 109u8, 127u8, 108u8, 156u8, 239u8, 38u8, 97u8, 92u8, + 28u8, 253u8, 230u8, 97u8, 205u8, 44u8, 214u8, 237u8, 137u8, 27u8, + ], + ) + } + #[doc = "Unregister a proxy account for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + pub fn remove_proxy( + &self, + delegate: types::remove_proxy::Delegate, + proxy_type: types::remove_proxy::ProxyType, + delay: types::remove_proxy::Delay, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "remove_proxy", + types::RemoveProxy { delegate, proxy_type, delay }, + [ + 191u8, 2u8, 69u8, 93u8, 184u8, 207u8, 70u8, 111u8, 8u8, 255u8, 11u8, + 157u8, 4u8, 29u8, 102u8, 245u8, 223u8, 103u8, 132u8, 196u8, 238u8, + 252u8, 127u8, 91u8, 243u8, 48u8, 176u8, 86u8, 99u8, 63u8, 108u8, 111u8, + ], + ) + } + #[doc = "Unregister all proxy accounts for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + pub fn remove_proxies( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "remove_proxies", + types::RemoveProxies {}, + [ + 1u8, 126u8, 36u8, 227u8, 185u8, 34u8, 218u8, 236u8, 125u8, 231u8, 68u8, + 185u8, 145u8, 63u8, 250u8, 225u8, 103u8, 3u8, 189u8, 37u8, 172u8, + 195u8, 197u8, 216u8, 99u8, 210u8, 240u8, 162u8, 158u8, 132u8, 24u8, + 6u8, + ], + ) + } + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] + #[doc = ""] + #[doc = "Requires a `Signed` origin."] + #[doc = ""] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + #[doc = ""] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] + #[doc = ""] + #[doc = "Fails if there are insufficient funds to pay for deposit."] + pub fn create_pure( + &self, + proxy_type: types::create_pure::ProxyType, + delay: types::create_pure::Delay, + index: types::create_pure::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "create_pure", + types::CreatePure { proxy_type, delay, index }, + [ + 239u8, 72u8, 255u8, 141u8, 190u8, 115u8, 141u8, 227u8, 164u8, 59u8, + 113u8, 0u8, 87u8, 101u8, 142u8, 147u8, 43u8, 13u8, 59u8, 213u8, 162u8, + 48u8, 67u8, 167u8, 223u8, 72u8, 153u8, 148u8, 219u8, 71u8, 53u8, 4u8, + ], + ) + } + #[doc = "Removes a previously spawned pure proxy."] + #[doc = ""] + #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] + #[doc = ""] + #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] + #[doc = ""] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = ""] + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + pub fn kill_pure( + &self, + spawner: types::kill_pure::Spawner, + proxy_type: types::kill_pure::ProxyType, + index: types::kill_pure::Index, + height: types::kill_pure::Height, + ext_index: types::kill_pure::ExtIndex, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "kill_pure", + types::KillPure { spawner, proxy_type, index, height, ext_index }, + [ + 125u8, 59u8, 127u8, 47u8, 63u8, 48u8, 101u8, 56u8, 61u8, 192u8, 198u8, + 217u8, 119u8, 91u8, 186u8, 35u8, 119u8, 222u8, 16u8, 246u8, 42u8, + 248u8, 19u8, 89u8, 246u8, 20u8, 66u8, 14u8, 133u8, 32u8, 118u8, 118u8, + ], + ) + } + #[doc = "Publish the hash of a proxy-call that will be made in the future."] + #[doc = ""] + #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = ""] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = ""] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn announce( + &self, + real: types::announce::Real, + call_hash: types::announce::CallHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "announce", + types::Announce { real, call_hash }, + [ + 32u8, 88u8, 145u8, 33u8, 55u8, 44u8, 136u8, 153u8, 26u8, 111u8, 73u8, + 15u8, 247u8, 188u8, 14u8, 236u8, 221u8, 222u8, 60u8, 97u8, 71u8, 229u8, + 18u8, 120u8, 182u8, 43u8, 67u8, 248u8, 169u8, 80u8, 170u8, 207u8, + ], + ) + } + #[doc = "Remove a given announcement."] + #[doc = ""] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + pub fn remove_announcement( + &self, + real: types::remove_announcement::Real, + call_hash: types::remove_announcement::CallHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "remove_announcement", + types::RemoveAnnouncement { real, call_hash }, + [ + 195u8, 224u8, 61u8, 33u8, 27u8, 100u8, 168u8, 18u8, 105u8, 23u8, 220u8, + 168u8, 207u8, 231u8, 136u8, 46u8, 181u8, 85u8, 15u8, 151u8, 126u8, + 227u8, 97u8, 162u8, 232u8, 39u8, 45u8, 255u8, 44u8, 167u8, 237u8, 38u8, + ], + ) + } + #[doc = "Remove the given announcement of a delegate."] + #[doc = ""] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + pub fn reject_announcement( + &self, + delegate: types::reject_announcement::Delegate, + call_hash: types::reject_announcement::CallHash, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "reject_announcement", + types::RejectAnnouncement { delegate, call_hash }, + [ + 29u8, 140u8, 243u8, 165u8, 143u8, 166u8, 205u8, 203u8, 111u8, 196u8, + 11u8, 2u8, 4u8, 230u8, 11u8, 136u8, 249u8, 139u8, 224u8, 242u8, 96u8, + 146u8, 118u8, 210u8, 104u8, 77u8, 168u8, 28u8, 67u8, 244u8, 91u8, 65u8, + ], + ) + } + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + pub fn proxy_announced( + &self, + delegate: types::proxy_announced::Delegate, + real: types::proxy_announced::Real, + force_proxy_type: types::proxy_announced::ForceProxyType, + call: types::proxy_announced::Call, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Proxy", + "proxy_announced", + types::ProxyAnnounced { + delegate, + real, + force_proxy_type, + call: ::subxt_core::alloc::boxed::Box::new(call), + }, + [ + 141u8, 44u8, 153u8, 5u8, 251u8, 189u8, 172u8, 189u8, 85u8, 53u8, 0u8, + 254u8, 79u8, 186u8, 133u8, 105u8, 129u8, 41u8, 233u8, 45u8, 248u8, + 120u8, 138u8, 45u8, 202u8, 240u8, 41u8, 135u8, 56u8, 60u8, 250u8, 22u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_proxy::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proxy was executed correctly, with the given."] + pub struct ProxyExecuted { + pub result: proxy_executed::Result, + } + pub mod proxy_executed { + use super::runtime_types; + pub type Result = + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>; + } + impl ::subxt_core::events::StaticEvent for ProxyExecuted { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyExecuted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + pub struct PureCreated { + pub pure: pure_created::Pure, + pub who: pure_created::Who, + pub proxy_type: pure_created::ProxyType, + pub disambiguation_index: pure_created::DisambiguationIndex, + } + pub mod pure_created { + use super::runtime_types; + pub type Pure = ::subxt_core::utils::AccountId32; + pub type Who = ::subxt_core::utils::AccountId32; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type DisambiguationIndex = ::core::primitive::u16; + } + impl ::subxt_core::events::StaticEvent for PureCreated { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "PureCreated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An announcement was placed to make a call in the future."] + pub struct Announced { + pub real: announced::Real, + pub proxy: announced::Proxy, + pub call_hash: announced::CallHash, + } + pub mod announced { + use super::runtime_types; + pub type Real = ::subxt_core::utils::AccountId32; + pub type Proxy = ::subxt_core::utils::AccountId32; + pub type CallHash = ::subxt_core::utils::H256; + } + impl ::subxt_core::events::StaticEvent for Announced { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "Announced"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proxy was added."] + pub struct ProxyAdded { + pub delegator: proxy_added::Delegator, + pub delegatee: proxy_added::Delegatee, + pub proxy_type: proxy_added::ProxyType, + pub delay: proxy_added::Delay, + } + pub mod proxy_added { + use super::runtime_types; + pub type Delegator = ::subxt_core::utils::AccountId32; + pub type Delegatee = ::subxt_core::utils::AccountId32; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type Delay = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for ProxyAdded { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyAdded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A proxy was removed."] + pub struct ProxyRemoved { + pub delegator: proxy_removed::Delegator, + pub delegatee: proxy_removed::Delegatee, + pub proxy_type: proxy_removed::ProxyType, + pub delay: proxy_removed::Delay, + } + pub mod proxy_removed { + use super::runtime_types; + pub type Delegator = ::subxt_core::utils::AccountId32; + pub type Delegatee = ::subxt_core::utils::AccountId32; + pub type ProxyType = runtime_types::tangle_testnet_runtime::ProxyType; + pub type Delay = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod proxies { + use super::runtime_types; + pub type Proxies = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::ProxyDefinition< + ::subxt_core::utils::AccountId32, + runtime_types::tangle_testnet_runtime::ProxyType, + ::core::primitive::u64, + >, + >, + ::core::primitive::u128, + ); + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod announcements { + use super::runtime_types; + pub type Announcements = ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_proxy::Announcement< + ::subxt_core::utils::AccountId32, + ::subxt_core::utils::H256, + ::core::primitive::u64, + >, + >, + ::core::primitive::u128, + ); + pub type Param0 = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::proxies::Proxies, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Proxy", + "Proxies", + (), + [ + 223u8, 41u8, 16u8, 124u8, 14u8, 158u8, 113u8, 7u8, 229u8, 203u8, 172u8, + 71u8, 221u8, 164u8, 20u8, 177u8, 252u8, 14u8, 117u8, 176u8, 21u8, + 236u8, 79u8, 107u8, 57u8, 148u8, 170u8, 107u8, 179u8, 144u8, 255u8, + 10u8, + ], + ) + } + #[doc = " The set of account proxies. Maps the account which has delegated to the accounts"] + #[doc = " which are being delegated to, together with the amount held on deposit."] + pub fn proxies( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::proxies::Proxies, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Proxy", + "Proxies", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 223u8, 41u8, 16u8, 124u8, 14u8, 158u8, 113u8, 7u8, 229u8, 203u8, 172u8, + 71u8, 221u8, 164u8, 20u8, 177u8, 252u8, 14u8, 117u8, 176u8, 21u8, + 236u8, 79u8, 107u8, 57u8, 148u8, 170u8, 107u8, 179u8, 144u8, 255u8, + 10u8, + ], + ) + } + #[doc = " The announcements made by the proxy (key)."] + pub fn announcements_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::announcements::Announcements, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Proxy", + "Announcements", + (), + [ + 36u8, 91u8, 194u8, 19u8, 186u8, 110u8, 217u8, 123u8, 101u8, 197u8, + 249u8, 185u8, 42u8, 5u8, 244u8, 249u8, 18u8, 156u8, 41u8, 19u8, 86u8, + 12u8, 253u8, 126u8, 232u8, 9u8, 226u8, 210u8, 25u8, 3u8, 115u8, 40u8, + ], + ) + } + #[doc = " The announcements made by the proxy (key)."] + pub fn announcements( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::announcements::Announcements, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Proxy", + "Announcements", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 36u8, 91u8, 194u8, 19u8, 186u8, 110u8, 217u8, 123u8, 101u8, 197u8, + 249u8, 185u8, 42u8, 5u8, 244u8, 249u8, 18u8, 156u8, 41u8, 19u8, 86u8, + 12u8, 253u8, 126u8, 232u8, 9u8, 226u8, 210u8, 25u8, 3u8, 115u8, 40u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The base amount of currency needed to reserve for creating a proxy."] + #[doc = ""] + #[doc = " This is held for an additional storage item whose value size is"] + #[doc = " `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes."] + pub fn proxy_deposit_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Proxy", + "ProxyDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per proxy added."] + #[doc = ""] + #[doc = " This is held for adding 32 bytes plus an instance of `ProxyType` more into a"] + #[doc = " pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take"] + #[doc = " into account `32 + proxy_type.encode().len()` bytes of data."] + pub fn proxy_deposit_factor( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Proxy", + "ProxyDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The maximum amount of proxies allowed for a single account."] + pub fn max_proxies( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Proxy", + "MaxProxies", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum amount of time-delayed announcements that are allowed to be pending."] + pub fn max_pending( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Proxy", + "MaxPending", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The base amount of currency needed to reserve for creating an announcement."] + #[doc = ""] + #[doc = " This is held when a new storage item holding a `Balance` is created (typically 16"] + #[doc = " bytes)."] + pub fn announcement_deposit_base( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Proxy", + "AnnouncementDepositBase", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The amount of currency needed per announcement made."] + #[doc = ""] + #[doc = " This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)"] + #[doc = " into a pre-existing storage value."] + pub fn announcement_deposit_factor( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Proxy", + "AnnouncementDepositFactor", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + } + } + } + pub mod multi_asset_delegation { + use super::root_mod; + use super::runtime_types; + #[doc = "Errors emitted by the pallet."] + pub type Error = runtime_types::pallet_multi_asset_delegation::pallet::Error; + #[doc = "The callable functions (extrinsics) of the pallet."] + pub type Call = runtime_types::pallet_multi_asset_delegation::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows an account to join as an operator by providing a stake."] + pub struct JoinOperators { + pub bond_amount: join_operators::BondAmount, + } + pub mod join_operators { + use super::runtime_types; + pub type BondAmount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for JoinOperators { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "join_operators"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedules an operator to leave."] + pub struct ScheduleLeaveOperators; + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleLeaveOperators { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "schedule_leave_operators"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancels a scheduled leave for an operator."] + pub struct CancelLeaveOperators; + impl ::subxt_core::blocks::StaticExtrinsic for CancelLeaveOperators { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "cancel_leave_operators"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Executes a scheduled leave for an operator."] + pub struct ExecuteLeaveOperators; + impl ::subxt_core::blocks::StaticExtrinsic for ExecuteLeaveOperators { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "execute_leave_operators"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows an operator to increase their stake."] + pub struct OperatorBondMore { + pub additional_bond: operator_bond_more::AdditionalBond, + } + pub mod operator_bond_more { + use super::runtime_types; + pub type AdditionalBond = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for OperatorBondMore { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "operator_bond_more"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedules an operator to decrease their stake."] + pub struct ScheduleOperatorUnstake { + pub unstake_amount: schedule_operator_unstake::UnstakeAmount, + } + pub mod schedule_operator_unstake { + use super::runtime_types; + pub type UnstakeAmount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleOperatorUnstake { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "schedule_operator_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Executes a scheduled stake decrease for an operator."] + pub struct ExecuteOperatorUnstake; + impl ::subxt_core::blocks::StaticExtrinsic for ExecuteOperatorUnstake { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "execute_operator_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancels a scheduled stake decrease for an operator."] + pub struct CancelOperatorUnstake; + impl ::subxt_core::blocks::StaticExtrinsic for CancelOperatorUnstake { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "cancel_operator_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows an operator to go offline."] + pub struct GoOffline; + impl ::subxt_core::blocks::StaticExtrinsic for GoOffline { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "go_offline"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows an operator to go online."] + pub struct GoOnline; + impl ::subxt_core::blocks::StaticExtrinsic for GoOnline { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "go_online"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows a user to deposit an asset."] + pub struct Deposit { + pub asset_id: deposit::AssetId, + pub amount: deposit::Amount, + pub evm_address: deposit::EvmAddress, + } + pub mod deposit { + use super::runtime_types; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Amount = ::core::primitive::u128; + pub type EvmAddress = ::core::option::Option<::subxt_core::utils::H160>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Deposit { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "deposit"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedules an withdraw request."] + pub struct ScheduleWithdraw { + pub asset_id: schedule_withdraw::AssetId, + pub amount: schedule_withdraw::Amount, + } + pub mod schedule_withdraw { + use super::runtime_types; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleWithdraw { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "schedule_withdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Executes a scheduled withdraw request."] + pub struct ExecuteWithdraw { + pub evm_address: execute_withdraw::EvmAddress, + } + pub mod execute_withdraw { + use super::runtime_types; + pub type EvmAddress = ::core::option::Option<::subxt_core::utils::H160>; + } + impl ::subxt_core::blocks::StaticExtrinsic for ExecuteWithdraw { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "execute_withdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancels a scheduled withdraw request."] + pub struct CancelWithdraw { + pub asset_id: cancel_withdraw::AssetId, + pub amount: cancel_withdraw::Amount, + } + pub mod cancel_withdraw { + use super::runtime_types; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelWithdraw { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "cancel_withdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Allows a user to delegate an amount of an asset to an operator."] + pub struct Delegate { + pub operator: delegate::Operator, + pub asset_id: delegate::AssetId, + pub amount: delegate::Amount, + pub blueprint_selection: delegate::BlueprintSelection, + } + pub mod delegate { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Amount = ::core::primitive::u128; + pub type BlueprintSelection = runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: DelegatorBlueprintSelection < runtime_types :: tangle_testnet_runtime :: MaxDelegatorBlueprints > ; + } + impl ::subxt_core::blocks::StaticExtrinsic for Delegate { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "delegate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Schedules a request to reduce a delegator's stake."] + pub struct ScheduleDelegatorUnstake { + pub operator: schedule_delegator_unstake::Operator, + pub asset_id: schedule_delegator_unstake::AssetId, + pub amount: schedule_delegator_unstake::Amount, + } + pub mod schedule_delegator_unstake { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for ScheduleDelegatorUnstake { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "schedule_delegator_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Executes a scheduled request to reduce a delegator's stake."] + pub struct ExecuteDelegatorUnstake; + impl ::subxt_core::blocks::StaticExtrinsic for ExecuteDelegatorUnstake { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "execute_delegator_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Cancels a scheduled request to reduce a delegator's stake."] + pub struct CancelDelegatorUnstake { + pub operator: cancel_delegator_unstake::Operator, + pub asset_id: cancel_delegator_unstake::AssetId, + pub amount: cancel_delegator_unstake::Amount, + } + pub mod cancel_delegator_unstake { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for CancelDelegatorUnstake { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "cancel_delegator_unstake"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Sets the APY and cap for a specific asset."] + #[doc = "The APY is the annual percentage yield that the asset will earn."] + #[doc = "The cap is the amount of assets required to be deposited to distribute the entire APY."] + #[doc = "The APY is capped at 10% and will require runtime upgrade to change."] + #[doc = ""] + #[doc = "While the cap is not met, the APY distributed will be `amount_deposited / cap * APY`."] + pub struct SetIncentiveApyAndCap { + pub vault_id: set_incentive_apy_and_cap::VaultId, + pub apy: set_incentive_apy_and_cap::Apy, + pub cap: set_incentive_apy_and_cap::Cap, + } + pub mod set_incentive_apy_and_cap { + use super::runtime_types; + pub type VaultId = ::core::primitive::u128; + pub type Apy = runtime_types::sp_arithmetic::per_things::Percent; + pub type Cap = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetIncentiveApyAndCap { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "set_incentive_apy_and_cap"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Whitelists a blueprint for rewards."] + pub struct WhitelistBlueprintForRewards { + pub blueprint_id: whitelist_blueprint_for_rewards::BlueprintId, + } + pub mod whitelist_blueprint_for_rewards { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for WhitelistBlueprintForRewards { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "whitelist_blueprint_for_rewards"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Manage asset id to vault rewards"] + pub struct ManageAssetInVault { + pub vault_id: manage_asset_in_vault::VaultId, + pub asset_id: manage_asset_in_vault::AssetId, + pub action: manage_asset_in_vault::Action, + } + pub mod manage_asset_in_vault { + use super::runtime_types; + pub type VaultId = ::core::primitive::u128; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Action = + runtime_types::pallet_multi_asset_delegation::types::rewards::AssetAction; + } + impl ::subxt_core::blocks::StaticExtrinsic for ManageAssetInVault { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "manage_asset_in_vault"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Adds a blueprint ID to a delegator's selection."] + pub struct AddBlueprintId { + pub blueprint_id: add_blueprint_id::BlueprintId, + } + pub mod add_blueprint_id { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for AddBlueprintId { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "add_blueprint_id"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Removes a blueprint ID from a delegator's selection."] + pub struct RemoveBlueprintId { + pub blueprint_id: remove_blueprint_id::BlueprintId, + } + pub mod remove_blueprint_id { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for RemoveBlueprintId { + const PALLET: &'static str = "MultiAssetDelegation"; + const CALL: &'static str = "remove_blueprint_id"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Allows an account to join as an operator by providing a stake."] + pub fn join_operators( + &self, + bond_amount: types::join_operators::BondAmount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "join_operators", + types::JoinOperators { bond_amount }, + [ + 200u8, 51u8, 233u8, 253u8, 180u8, 90u8, 81u8, 7u8, 248u8, 218u8, 76u8, + 136u8, 126u8, 106u8, 132u8, 111u8, 26u8, 70u8, 68u8, 40u8, 153u8, + 179u8, 25u8, 198u8, 10u8, 105u8, 214u8, 38u8, 79u8, 102u8, 183u8, + 115u8, + ], + ) + } + #[doc = "Schedules an operator to leave."] + pub fn schedule_leave_operators( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "schedule_leave_operators", + types::ScheduleLeaveOperators {}, + [ + 40u8, 228u8, 5u8, 223u8, 70u8, 47u8, 223u8, 89u8, 229u8, 174u8, 84u8, + 232u8, 216u8, 104u8, 83u8, 134u8, 59u8, 234u8, 89u8, 53u8, 238u8, + 253u8, 150u8, 13u8, 19u8, 178u8, 179u8, 191u8, 209u8, 45u8, 53u8, 85u8, + ], + ) + } + #[doc = "Cancels a scheduled leave for an operator."] + pub fn cancel_leave_operators( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "cancel_leave_operators", + types::CancelLeaveOperators {}, + [ + 69u8, 106u8, 203u8, 11u8, 3u8, 80u8, 201u8, 178u8, 156u8, 17u8, 142u8, + 173u8, 37u8, 245u8, 0u8, 84u8, 213u8, 189u8, 221u8, 34u8, 28u8, 204u8, + 88u8, 240u8, 72u8, 190u8, 173u8, 115u8, 82u8, 210u8, 212u8, 6u8, + ], + ) + } + #[doc = "Executes a scheduled leave for an operator."] + pub fn execute_leave_operators( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "execute_leave_operators", + types::ExecuteLeaveOperators {}, + [ + 57u8, 188u8, 97u8, 173u8, 224u8, 57u8, 203u8, 116u8, 132u8, 111u8, + 60u8, 129u8, 153u8, 1u8, 222u8, 163u8, 102u8, 230u8, 13u8, 177u8, + 221u8, 246u8, 53u8, 106u8, 229u8, 133u8, 240u8, 136u8, 179u8, 21u8, + 143u8, 180u8, + ], + ) + } + #[doc = "Allows an operator to increase their stake."] + pub fn operator_bond_more( + &self, + additional_bond: types::operator_bond_more::AdditionalBond, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "operator_bond_more", + types::OperatorBondMore { additional_bond }, + [ + 124u8, 33u8, 17u8, 157u8, 169u8, 58u8, 82u8, 138u8, 216u8, 98u8, 111u8, + 31u8, 223u8, 183u8, 172u8, 219u8, 224u8, 196u8, 180u8, 92u8, 156u8, + 215u8, 145u8, 66u8, 172u8, 96u8, 81u8, 20u8, 210u8, 182u8, 144u8, + 172u8, + ], + ) + } + #[doc = "Schedules an operator to decrease their stake."] + pub fn schedule_operator_unstake( + &self, + unstake_amount: types::schedule_operator_unstake::UnstakeAmount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "schedule_operator_unstake", + types::ScheduleOperatorUnstake { unstake_amount }, + [ + 34u8, 99u8, 195u8, 190u8, 177u8, 99u8, 126u8, 217u8, 214u8, 187u8, + 152u8, 53u8, 223u8, 100u8, 68u8, 17u8, 188u8, 148u8, 25u8, 21u8, 75u8, + 48u8, 52u8, 208u8, 221u8, 62u8, 146u8, 65u8, 60u8, 209u8, 206u8, 44u8, + ], + ) + } + #[doc = "Executes a scheduled stake decrease for an operator."] + pub fn execute_operator_unstake( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "execute_operator_unstake", + types::ExecuteOperatorUnstake {}, + [ + 22u8, 7u8, 144u8, 170u8, 57u8, 205u8, 226u8, 10u8, 36u8, 245u8, 197u8, + 184u8, 137u8, 7u8, 252u8, 56u8, 186u8, 50u8, 30u8, 179u8, 244u8, 203u8, + 242u8, 90u8, 93u8, 130u8, 82u8, 225u8, 192u8, 92u8, 211u8, 14u8, + ], + ) + } + #[doc = "Cancels a scheduled stake decrease for an operator."] + pub fn cancel_operator_unstake( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "cancel_operator_unstake", + types::CancelOperatorUnstake {}, + [ + 9u8, 153u8, 57u8, 25u8, 35u8, 233u8, 83u8, 162u8, 125u8, 240u8, 57u8, + 179u8, 110u8, 131u8, 115u8, 69u8, 96u8, 139u8, 228u8, 20u8, 33u8, 30u8, + 207u8, 176u8, 175u8, 233u8, 141u8, 152u8, 197u8, 134u8, 78u8, 40u8, + ], + ) + } + #[doc = "Allows an operator to go offline."] + pub fn go_offline( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "go_offline", + types::GoOffline {}, + [ + 229u8, 123u8, 37u8, 67u8, 121u8, 41u8, 249u8, 87u8, 1u8, 78u8, 249u8, + 173u8, 135u8, 228u8, 239u8, 244u8, 177u8, 153u8, 242u8, 112u8, 157u8, + 150u8, 12u8, 213u8, 38u8, 250u8, 85u8, 150u8, 252u8, 60u8, 204u8, + 134u8, + ], + ) + } + #[doc = "Allows an operator to go online."] + pub fn go_online( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "go_online", + types::GoOnline {}, + [ + 58u8, 44u8, 183u8, 212u8, 2u8, 121u8, 216u8, 100u8, 238u8, 222u8, + 118u8, 20u8, 145u8, 231u8, 226u8, 156u8, 130u8, 2u8, 113u8, 3u8, 49u8, + 119u8, 211u8, 112u8, 151u8, 192u8, 181u8, 139u8, 108u8, 209u8, 80u8, + 47u8, + ], + ) + } + #[doc = "Allows a user to deposit an asset."] + pub fn deposit( + &self, + asset_id: types::deposit::AssetId, + amount: types::deposit::Amount, + evm_address: types::deposit::EvmAddress, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "deposit", + types::Deposit { asset_id, amount, evm_address }, + [ + 58u8, 72u8, 176u8, 66u8, 51u8, 188u8, 190u8, 38u8, 13u8, 234u8, 239u8, + 113u8, 157u8, 64u8, 109u8, 91u8, 0u8, 242u8, 157u8, 176u8, 126u8, + 250u8, 133u8, 66u8, 172u8, 17u8, 254u8, 231u8, 124u8, 159u8, 248u8, + 101u8, + ], + ) + } + #[doc = "Schedules an withdraw request."] + pub fn schedule_withdraw( + &self, + asset_id: types::schedule_withdraw::AssetId, + amount: types::schedule_withdraw::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "schedule_withdraw", + types::ScheduleWithdraw { asset_id, amount }, + [ + 151u8, 83u8, 1u8, 25u8, 237u8, 166u8, 220u8, 253u8, 160u8, 43u8, 229u8, + 21u8, 247u8, 247u8, 110u8, 119u8, 99u8, 12u8, 213u8, 134u8, 181u8, + 30u8, 13u8, 11u8, 133u8, 131u8, 2u8, 79u8, 48u8, 65u8, 144u8, 77u8, + ], + ) + } + #[doc = "Executes a scheduled withdraw request."] + pub fn execute_withdraw( + &self, + evm_address: types::execute_withdraw::EvmAddress, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "execute_withdraw", + types::ExecuteWithdraw { evm_address }, + [ + 192u8, 219u8, 87u8, 231u8, 26u8, 7u8, 60u8, 107u8, 41u8, 80u8, 25u8, + 90u8, 189u8, 215u8, 113u8, 78u8, 93u8, 147u8, 56u8, 175u8, 57u8, 75u8, + 117u8, 131u8, 227u8, 252u8, 16u8, 241u8, 170u8, 241u8, 77u8, 124u8, + ], + ) + } + #[doc = "Cancels a scheduled withdraw request."] + pub fn cancel_withdraw( + &self, + asset_id: types::cancel_withdraw::AssetId, + amount: types::cancel_withdraw::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "cancel_withdraw", + types::CancelWithdraw { asset_id, amount }, + [ + 18u8, 80u8, 162u8, 132u8, 33u8, 12u8, 254u8, 88u8, 103u8, 101u8, 227u8, + 4u8, 12u8, 113u8, 76u8, 143u8, 80u8, 89u8, 50u8, 188u8, 233u8, 184u8, + 102u8, 60u8, 245u8, 21u8, 95u8, 250u8, 78u8, 193u8, 28u8, 242u8, + ], + ) + } + #[doc = "Allows a user to delegate an amount of an asset to an operator."] + pub fn delegate( + &self, + operator: types::delegate::Operator, + asset_id: types::delegate::AssetId, + amount: types::delegate::Amount, + blueprint_selection: types::delegate::BlueprintSelection, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "delegate", + types::Delegate { operator, asset_id, amount, blueprint_selection }, + [ + 122u8, 21u8, 147u8, 191u8, 103u8, 51u8, 255u8, 119u8, 157u8, 35u8, + 16u8, 92u8, 138u8, 149u8, 215u8, 86u8, 170u8, 106u8, 101u8, 232u8, + 96u8, 14u8, 80u8, 242u8, 180u8, 96u8, 86u8, 78u8, 237u8, 155u8, 3u8, + 88u8, + ], + ) + } + #[doc = "Schedules a request to reduce a delegator's stake."] + pub fn schedule_delegator_unstake( + &self, + operator: types::schedule_delegator_unstake::Operator, + asset_id: types::schedule_delegator_unstake::AssetId, + amount: types::schedule_delegator_unstake::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "schedule_delegator_unstake", + types::ScheduleDelegatorUnstake { operator, asset_id, amount }, + [ + 244u8, 2u8, 144u8, 12u8, 8u8, 144u8, 76u8, 125u8, 36u8, 206u8, 176u8, + 88u8, 49u8, 6u8, 202u8, 23u8, 225u8, 231u8, 241u8, 133u8, 69u8, 214u8, + 67u8, 79u8, 174u8, 140u8, 28u8, 167u8, 84u8, 227u8, 88u8, 130u8, + ], + ) + } + #[doc = "Executes a scheduled request to reduce a delegator's stake."] + pub fn execute_delegator_unstake( + &self, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "execute_delegator_unstake", + types::ExecuteDelegatorUnstake {}, + [ + 122u8, 83u8, 15u8, 157u8, 106u8, 98u8, 132u8, 80u8, 95u8, 3u8, 89u8, + 166u8, 247u8, 83u8, 9u8, 238u8, 2u8, 100u8, 2u8, 49u8, 99u8, 203u8, + 99u8, 139u8, 21u8, 210u8, 78u8, 212u8, 47u8, 214u8, 38u8, 29u8, + ], + ) + } + #[doc = "Cancels a scheduled request to reduce a delegator's stake."] + pub fn cancel_delegator_unstake( + &self, + operator: types::cancel_delegator_unstake::Operator, + asset_id: types::cancel_delegator_unstake::AssetId, + amount: types::cancel_delegator_unstake::Amount, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "cancel_delegator_unstake", + types::CancelDelegatorUnstake { operator, asset_id, amount }, + [ + 230u8, 243u8, 246u8, 127u8, 75u8, 179u8, 58u8, 225u8, 144u8, 194u8, + 15u8, 13u8, 172u8, 162u8, 88u8, 181u8, 223u8, 191u8, 89u8, 231u8, + 168u8, 91u8, 170u8, 199u8, 178u8, 151u8, 49u8, 58u8, 166u8, 208u8, + 159u8, 220u8, + ], + ) + } + #[doc = "Sets the APY and cap for a specific asset."] + #[doc = "The APY is the annual percentage yield that the asset will earn."] + #[doc = "The cap is the amount of assets required to be deposited to distribute the entire APY."] + #[doc = "The APY is capped at 10% and will require runtime upgrade to change."] + #[doc = ""] + #[doc = "While the cap is not met, the APY distributed will be `amount_deposited / cap * APY`."] + pub fn set_incentive_apy_and_cap( + &self, + vault_id: types::set_incentive_apy_and_cap::VaultId, + apy: types::set_incentive_apy_and_cap::Apy, + cap: types::set_incentive_apy_and_cap::Cap, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "set_incentive_apy_and_cap", + types::SetIncentiveApyAndCap { vault_id, apy, cap }, + [ + 176u8, 74u8, 10u8, 166u8, 121u8, 38u8, 138u8, 18u8, 107u8, 106u8, + 229u8, 224u8, 59u8, 92u8, 15u8, 203u8, 132u8, 253u8, 4u8, 144u8, 218u8, + 106u8, 239u8, 142u8, 237u8, 241u8, 177u8, 94u8, 61u8, 183u8, 144u8, + 145u8, + ], + ) + } + #[doc = "Whitelists a blueprint for rewards."] + pub fn whitelist_blueprint_for_rewards( + &self, + blueprint_id: types::whitelist_blueprint_for_rewards::BlueprintId, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "whitelist_blueprint_for_rewards", + types::WhitelistBlueprintForRewards { blueprint_id }, + [ + 200u8, 143u8, 250u8, 243u8, 185u8, 186u8, 117u8, 67u8, 9u8, 186u8, + 103u8, 240u8, 211u8, 39u8, 0u8, 197u8, 101u8, 62u8, 27u8, 237u8, 182u8, + 179u8, 251u8, 81u8, 142u8, 195u8, 213u8, 24u8, 123u8, 134u8, 80u8, + 187u8, + ], + ) + } + #[doc = "Manage asset id to vault rewards"] + pub fn manage_asset_in_vault( + &self, + vault_id: types::manage_asset_in_vault::VaultId, + asset_id: types::manage_asset_in_vault::AssetId, + action: types::manage_asset_in_vault::Action, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "manage_asset_in_vault", + types::ManageAssetInVault { vault_id, asset_id, action }, + [ + 164u8, 251u8, 229u8, 192u8, 83u8, 53u8, 179u8, 154u8, 228u8, 245u8, + 116u8, 154u8, 100u8, 198u8, 182u8, 69u8, 90u8, 178u8, 237u8, 99u8, 0u8, + 160u8, 243u8, 162u8, 69u8, 87u8, 26u8, 61u8, 82u8, 151u8, 100u8, 251u8, + ], + ) + } + #[doc = "Adds a blueprint ID to a delegator's selection."] + pub fn add_blueprint_id( + &self, + blueprint_id: types::add_blueprint_id::BlueprintId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "add_blueprint_id", + types::AddBlueprintId { blueprint_id }, + [ + 74u8, 66u8, 160u8, 46u8, 189u8, 193u8, 17u8, 231u8, 120u8, 52u8, 172u8, + 159u8, 250u8, 132u8, 97u8, 232u8, 0u8, 156u8, 141u8, 168u8, 85u8, 31u8, + 114u8, 113u8, 101u8, 141u8, 69u8, 28u8, 54u8, 103u8, 54u8, 29u8, + ], + ) + } + #[doc = "Removes a blueprint ID from a delegator's selection."] + pub fn remove_blueprint_id( + &self, + blueprint_id: types::remove_blueprint_id::BlueprintId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "MultiAssetDelegation", + "remove_blueprint_id", + types::RemoveBlueprintId { blueprint_id }, + [ + 81u8, 3u8, 117u8, 89u8, 53u8, 187u8, 26u8, 167u8, 9u8, 26u8, 9u8, + 213u8, 230u8, 218u8, 64u8, 142u8, 227u8, 34u8, 128u8, 123u8, 197u8, + 25u8, 199u8, 212u8, 118u8, 117u8, 134u8, 45u8, 116u8, 10u8, 217u8, + 136u8, + ], + ) + } + } + } + #[doc = "Events emitted by the pallet."] + pub type Event = runtime_types::pallet_multi_asset_delegation::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has joined."] + pub struct OperatorJoined { + pub who: operator_joined::Who, + } + pub mod operator_joined { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorJoined { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorJoined"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has scheduled to leave."] + pub struct OperatorLeavingScheduled { + pub who: operator_leaving_scheduled::Who, + } + pub mod operator_leaving_scheduled { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorLeavingScheduled { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorLeavingScheduled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has cancelled their leave request."] + pub struct OperatorLeaveCancelled { + pub who: operator_leave_cancelled::Who, + } + pub mod operator_leave_cancelled { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorLeaveCancelled { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorLeaveCancelled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has executed their leave request."] + pub struct OperatorLeaveExecuted { + pub who: operator_leave_executed::Who, + } + pub mod operator_leave_executed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorLeaveExecuted { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorLeaveExecuted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has increased their stake."] + pub struct OperatorBondMore { + pub who: operator_bond_more::Who, + pub additional_bond: operator_bond_more::AdditionalBond, + } + pub mod operator_bond_more { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type AdditionalBond = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for OperatorBondMore { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorBondMore"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has scheduled to decrease their stake."] + pub struct OperatorBondLessScheduled { + pub who: operator_bond_less_scheduled::Who, + pub unstake_amount: operator_bond_less_scheduled::UnstakeAmount, + } + pub mod operator_bond_less_scheduled { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type UnstakeAmount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for OperatorBondLessScheduled { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorBondLessScheduled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has executed their stake decrease."] + pub struct OperatorBondLessExecuted { + pub who: operator_bond_less_executed::Who, + } + pub mod operator_bond_less_executed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorBondLessExecuted { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorBondLessExecuted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has cancelled their stake decrease request."] + pub struct OperatorBondLessCancelled { + pub who: operator_bond_less_cancelled::Who, + } + pub mod operator_bond_less_cancelled { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorBondLessCancelled { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorBondLessCancelled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has gone offline."] + pub struct OperatorWentOffline { + pub who: operator_went_offline::Who, + } + pub mod operator_went_offline { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorWentOffline { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorWentOffline"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has gone online."] + pub struct OperatorWentOnline { + pub who: operator_went_online::Who, + } + pub mod operator_went_online { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for OperatorWentOnline { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorWentOnline"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A deposit has been made."] + pub struct Deposited { + pub who: deposited::Who, + pub amount: deposited::Amount, + pub asset_id: deposited::AssetId, + } + pub mod deposited { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for Deposited { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "Deposited"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An withdraw has been scheduled."] + pub struct Scheduledwithdraw { + pub who: scheduledwithdraw::Who, + pub amount: scheduledwithdraw::Amount, + pub asset_id: scheduledwithdraw::AssetId, + } + pub mod scheduledwithdraw { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for Scheduledwithdraw { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "Scheduledwithdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An withdraw has been executed."] + pub struct Executedwithdraw { + pub who: executedwithdraw::Who, + } + pub mod executedwithdraw { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Executedwithdraw { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "Executedwithdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An withdraw has been cancelled."] + pub struct Cancelledwithdraw { + pub who: cancelledwithdraw::Who, + } + pub mod cancelledwithdraw { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for Cancelledwithdraw { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "Cancelledwithdraw"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A delegation has been made."] + pub struct Delegated { + pub who: delegated::Who, + pub operator: delegated::Operator, + pub amount: delegated::Amount, + pub asset_id: delegated::AssetId, + } + pub mod delegated { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for Delegated { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "Delegated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A delegator unstake request has been scheduled."] + pub struct ScheduledDelegatorBondLess { + pub who: scheduled_delegator_bond_less::Who, + pub operator: scheduled_delegator_bond_less::Operator, + pub amount: scheduled_delegator_bond_less::Amount, + pub asset_id: scheduled_delegator_bond_less::AssetId, + } + pub mod scheduled_delegator_bond_less { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for ScheduledDelegatorBondLess { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "ScheduledDelegatorBondLess"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A delegator unstake request has been executed."] + pub struct ExecutedDelegatorBondLess { + pub who: executed_delegator_bond_less::Who, + } + pub mod executed_delegator_bond_less { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for ExecutedDelegatorBondLess { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "ExecutedDelegatorBondLess"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A delegator unstake request has been cancelled."] + pub struct CancelledDelegatorBondLess { + pub who: cancelled_delegator_bond_less::Who, + } + pub mod cancelled_delegator_bond_less { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for CancelledDelegatorBondLess { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "CancelledDelegatorBondLess"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Event emitted when an incentive APY and cap are set for a reward vault"] + pub struct IncentiveAPYAndCapSet { + pub vault_id: incentive_apy_and_cap_set::VaultId, + pub apy: incentive_apy_and_cap_set::Apy, + pub cap: incentive_apy_and_cap_set::Cap, + } + pub mod incentive_apy_and_cap_set { + use super::runtime_types; + pub type VaultId = ::core::primitive::u128; + pub type Apy = runtime_types::sp_arithmetic::per_things::Percent; + pub type Cap = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for IncentiveAPYAndCapSet { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "IncentiveAPYAndCapSet"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Event emitted when a blueprint is whitelisted for rewards"] + pub struct BlueprintWhitelisted { + pub blueprint_id: blueprint_whitelisted::BlueprintId, + } + pub mod blueprint_whitelisted { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for BlueprintWhitelisted { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "BlueprintWhitelisted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Asset has been updated to reward vault"] + pub struct AssetUpdatedInVault { + pub who: asset_updated_in_vault::Who, + pub vault_id: asset_updated_in_vault::VaultId, + pub asset_id: asset_updated_in_vault::AssetId, + pub action: asset_updated_in_vault::Action, + } + pub mod asset_updated_in_vault { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type VaultId = ::core::primitive::u128; + pub type AssetId = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Action = + runtime_types::pallet_multi_asset_delegation::types::rewards::AssetAction; + } + impl ::subxt_core::events::StaticEvent for AssetUpdatedInVault { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "AssetUpdatedInVault"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Operator has been slashed"] + pub struct OperatorSlashed { + pub who: operator_slashed::Who, + pub amount: operator_slashed::Amount, + } + pub mod operator_slashed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for OperatorSlashed { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "OperatorSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Delegator has been slashed"] + pub struct DelegatorSlashed { + pub who: delegator_slashed::Who, + pub amount: delegator_slashed::Amount, + } + pub mod delegator_slashed { + use super::runtime_types; + pub type Who = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for DelegatorSlashed { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "DelegatorSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "EVM execution reverted with a reason."] + pub struct EvmReverted { + pub from: evm_reverted::From, + pub to: evm_reverted::To, + pub data: evm_reverted::Data, + pub reason: evm_reverted::Reason, + } + pub mod evm_reverted { + use super::runtime_types; + pub type From = ::subxt_core::utils::H160; + pub type To = ::subxt_core::utils::H160; + pub type Data = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Reason = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::events::StaticEvent for EvmReverted { + const PALLET: &'static str = "MultiAssetDelegation"; + const EVENT: &'static str = "EvmReverted"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod operators { + use super::runtime_types; + pub type Operators = runtime_types :: pallet_multi_asset_delegation :: types :: operator :: OperatorMetadata < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u128 , :: core :: primitive :: u128 , runtime_types :: tangle_testnet_runtime :: MaxDelegations , runtime_types :: tangle_testnet_runtime :: MaxOperatorBlueprints > ; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod current_round { + use super::runtime_types; + pub type CurrentRound = ::core::primitive::u32; + } + pub mod at_stake { + use super::runtime_types; + pub type AtStake = runtime_types :: pallet_multi_asset_delegation :: types :: operator :: OperatorSnapshot < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u128 , :: core :: primitive :: u128 , runtime_types :: tangle_testnet_runtime :: MaxDelegations > ; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod delegators { + use super::runtime_types; + pub type Delegators = runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: DelegatorMetadata < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u128 , :: core :: primitive :: u128 , runtime_types :: tangle_testnet_runtime :: MaxWithdrawRequests , runtime_types :: tangle_testnet_runtime :: MaxDelegations , runtime_types :: tangle_testnet_runtime :: MaxUnstakeRequests , runtime_types :: tangle_testnet_runtime :: MaxDelegatorBlueprints > ; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod reward_vaults { + use super::runtime_types; + pub type RewardVaults = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>, + >; + pub type Param0 = ::core::primitive::u128; + } + pub mod asset_lookup_reward_vaults { + use super::runtime_types; + pub type AssetLookupRewardVaults = ::core::primitive::u128; + pub type Param0 = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + } + pub mod reward_config_storage { + use super::runtime_types; + pub type RewardConfigStorage = + runtime_types::pallet_multi_asset_delegation::types::rewards::RewardConfig< + ::core::primitive::u128, + ::core::primitive::u128, + >; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " Storage for operator information."] + pub fn operators_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::operators::Operators, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "Operators", + (), + [ + 181u8, 37u8, 69u8, 139u8, 18u8, 44u8, 99u8, 55u8, 186u8, 237u8, 91u8, + 83u8, 53u8, 119u8, 142u8, 206u8, 254u8, 203u8, 89u8, 154u8, 138u8, + 163u8, 29u8, 141u8, 7u8, 161u8, 54u8, 162u8, 48u8, 28u8, 70u8, 0u8, + ], + ) + } + #[doc = " Storage for operator information."] + pub fn operators( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::operators::Operators, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "Operators", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 181u8, 37u8, 69u8, 139u8, 18u8, 44u8, 99u8, 55u8, 186u8, 237u8, 91u8, + 83u8, 53u8, 119u8, 142u8, 206u8, 254u8, 203u8, 89u8, 154u8, 138u8, + 163u8, 29u8, 141u8, 7u8, 161u8, 54u8, 162u8, 48u8, 28u8, 70u8, 0u8, + ], + ) + } + #[doc = " Storage for the current round."] + pub fn current_round( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::current_round::CurrentRound, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "CurrentRound", + (), + [ + 36u8, 98u8, 75u8, 19u8, 13u8, 250u8, 136u8, 31u8, 63u8, 120u8, 224u8, + 83u8, 183u8, 198u8, 195u8, 37u8, 82u8, 213u8, 193u8, 217u8, 137u8, + 62u8, 201u8, 251u8, 45u8, 141u8, 171u8, 22u8, 54u8, 134u8, 113u8, + 232u8, + ], + ) + } + #[doc = " Snapshot of collator delegation stake at the start of the round."] + pub fn at_stake_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::at_stake::AtStake, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "AtStake", + (), + [ + 156u8, 26u8, 172u8, 63u8, 87u8, 150u8, 192u8, 117u8, 222u8, 34u8, + 191u8, 110u8, 251u8, 174u8, 184u8, 171u8, 73u8, 48u8, 79u8, 87u8, + 175u8, 216u8, 132u8, 96u8, 217u8, 232u8, 148u8, 89u8, 181u8, 39u8, + 219u8, 106u8, + ], + ) + } + #[doc = " Snapshot of collator delegation stake at the start of the round."] + pub fn at_stake_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::at_stake::AtStake, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "AtStake", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 156u8, 26u8, 172u8, 63u8, 87u8, 150u8, 192u8, 117u8, 222u8, 34u8, + 191u8, 110u8, 251u8, 174u8, 184u8, 171u8, 73u8, 48u8, 79u8, 87u8, + 175u8, 216u8, 132u8, 96u8, 217u8, 232u8, 148u8, 89u8, 181u8, 39u8, + 219u8, 106u8, + ], + ) + } + #[doc = " Snapshot of collator delegation stake at the start of the round."] + pub fn at_stake( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::at_stake::AtStake, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "AtStake", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 156u8, 26u8, 172u8, 63u8, 87u8, 150u8, 192u8, 117u8, 222u8, 34u8, + 191u8, 110u8, 251u8, 174u8, 184u8, 171u8, 73u8, 48u8, 79u8, 87u8, + 175u8, 216u8, 132u8, 96u8, 217u8, 232u8, 148u8, 89u8, 181u8, 39u8, + 219u8, 106u8, + ], + ) + } + #[doc = " Storage for delegator information."] + pub fn delegators_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::delegators::Delegators, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "Delegators", + (), + [ + 208u8, 190u8, 90u8, 169u8, 30u8, 169u8, 192u8, 170u8, 53u8, 227u8, + 128u8, 145u8, 223u8, 226u8, 166u8, 141u8, 222u8, 141u8, 6u8, 136u8, + 232u8, 114u8, 217u8, 222u8, 129u8, 124u8, 160u8, 239u8, 33u8, 211u8, + 10u8, 156u8, + ], + ) + } + #[doc = " Storage for delegator information."] + pub fn delegators( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::delegators::Delegators, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "Delegators", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 208u8, 190u8, 90u8, 169u8, 30u8, 169u8, 192u8, 170u8, 53u8, 227u8, + 128u8, 145u8, 223u8, 226u8, 166u8, 141u8, 222u8, 141u8, 6u8, 136u8, + 232u8, 114u8, 217u8, 222u8, 129u8, 124u8, 160u8, 239u8, 33u8, 211u8, + 10u8, 156u8, + ], + ) + } + #[doc = " Storage for the reward vaults"] + pub fn reward_vaults_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reward_vaults::RewardVaults, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "RewardVaults", + (), + [ + 30u8, 97u8, 236u8, 132u8, 229u8, 86u8, 124u8, 248u8, 89u8, 52u8, 91u8, + 194u8, 48u8, 44u8, 236u8, 142u8, 251u8, 192u8, 107u8, 103u8, 244u8, + 170u8, 94u8, 57u8, 146u8, 82u8, 122u8, 212u8, 228u8, 119u8, 152u8, + 57u8, + ], + ) + } + #[doc = " Storage for the reward vaults"] + pub fn reward_vaults( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::reward_vaults::RewardVaults, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "RewardVaults", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 30u8, 97u8, 236u8, 132u8, 229u8, 86u8, 124u8, 248u8, 89u8, 52u8, 91u8, + 194u8, 48u8, 44u8, 236u8, 142u8, 251u8, 192u8, 107u8, 103u8, 244u8, + 170u8, 94u8, 57u8, 146u8, 82u8, 122u8, 212u8, 228u8, 119u8, 152u8, + 57u8, + ], + ) + } + #[doc = " Storage for the reward vaults"] + pub fn asset_lookup_reward_vaults_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::asset_lookup_reward_vaults::AssetLookupRewardVaults, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "AssetLookupRewardVaults", + (), + [ + 128u8, 153u8, 122u8, 108u8, 34u8, 110u8, 223u8, 199u8, 51u8, 251u8, + 55u8, 208u8, 134u8, 89u8, 137u8, 250u8, 251u8, 211u8, 107u8, 114u8, + 38u8, 28u8, 52u8, 98u8, 234u8, 110u8, 226u8, 205u8, 105u8, 195u8, + 149u8, 113u8, + ], + ) + } + #[doc = " Storage for the reward vaults"] + pub fn asset_lookup_reward_vaults( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::asset_lookup_reward_vaults::Param0, + >, + types::asset_lookup_reward_vaults::AssetLookupRewardVaults, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "AssetLookupRewardVaults", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 128u8, 153u8, 122u8, 108u8, 34u8, 110u8, 223u8, 199u8, 51u8, 251u8, + 55u8, 208u8, 134u8, 89u8, 137u8, 250u8, 251u8, 211u8, 107u8, 114u8, + 38u8, 28u8, 52u8, 98u8, 234u8, 110u8, 226u8, 205u8, 105u8, 195u8, + 149u8, 113u8, + ], + ) + } + #[doc = " Storage for the reward configuration, which includes APY, cap for assets, and whitelisted"] + #[doc = " blueprints."] + pub fn reward_config_storage( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reward_config_storage::RewardConfigStorage, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "MultiAssetDelegation", + "RewardConfigStorage", + (), + [ + 84u8, 15u8, 156u8, 11u8, 42u8, 78u8, 242u8, 92u8, 45u8, 18u8, 105u8, + 60u8, 16u8, 109u8, 236u8, 33u8, 98u8, 177u8, 156u8, 43u8, 57u8, 209u8, + 178u8, 168u8, 230u8, 248u8, 155u8, 87u8, 135u8, 180u8, 29u8, 192u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The maximum number of blueprints a delegator can have in Fixed mode."] + pub fn max_delegator_blueprints( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MaxDelegatorBlueprints", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of blueprints an operator can support."] + pub fn max_operator_blueprints( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MaxOperatorBlueprints", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of withdraw requests a delegator can have."] + pub fn max_withdraw_requests( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MaxWithdrawRequests", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of delegations a delegator can have."] + pub fn max_delegations( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MaxDelegations", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum number of unstake requests a delegator can have."] + pub fn max_unstake_requests( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MaxUnstakeRequests", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The minimum amount of stake required for an operator."] + pub fn min_operator_bond_amount( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MinOperatorBondAmount", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The minimum amount of stake required for a delegate."] + pub fn min_delegate_amount( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u128> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "MinDelegateAmount", + [ + 84u8, 157u8, 140u8, 4u8, 93u8, 57u8, 29u8, 133u8, 105u8, 200u8, 214u8, + 27u8, 144u8, 208u8, 218u8, 160u8, 130u8, 109u8, 101u8, 54u8, 210u8, + 136u8, 71u8, 63u8, 49u8, 237u8, 234u8, 15u8, 178u8, 98u8, 148u8, 156u8, + ], + ) + } + #[doc = " The duration for which the stake is locked."] + pub fn bond_duration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "BondDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of rounds that operators remain bonded before the exit request is executable."] + pub fn leave_operators_delay( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "LeaveOperatorsDelay", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of rounds operator requests to decrease self-stake must wait to be executable."] + pub fn operator_bond_less_delay( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "OperatorBondLessDelay", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of rounds that delegators remain bonded before the exit request is executable."] + pub fn leave_delegators_delay( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "LeaveDelegatorsDelay", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of rounds that delegation unstake requests must wait before being executable."] + pub fn delegation_bond_less_delay( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "MultiAssetDelegation", + "DelegationBondLessDelay", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod services { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_services::module::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_services::module::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create a new service blueprint."] + #[doc = ""] + #[doc = "A Service Blueprint is a template for a service that can be instantiated later on by a"] + #[doc = "user."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = "- `origin`: The account that is creating the service blueprint."] + #[doc = "- `blueprint`: The blueprint of the service."] + pub struct CreateBlueprint { + pub blueprint: create_blueprint::Blueprint, + } + pub mod create_blueprint { + use super::runtime_types; + pub type Blueprint = + runtime_types::tangle_primitives::services::ServiceBlueprint; + } + impl ::subxt_core::blocks::StaticExtrinsic for CreateBlueprint { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "create_blueprint"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pre-register the caller as an operator for a specific blueprint."] + #[doc = ""] + #[doc = "The caller can pre-register for a blueprint, which will emit a `PreRegistration` event."] + #[doc = "This event can be listened to by the operator node to execute the custom blueprint's"] + #[doc = "registration function."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = "- `origin`: The account that is pre-registering for the service blueprint."] + #[doc = "- `blueprint_id`: The ID of the service blueprint."] + pub struct PreRegister { + #[codec(compact)] + pub blueprint_id: pre_register::BlueprintId, + } + pub mod pre_register { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for PreRegister { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "pre_register"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Register the caller as an operator for a specific blueprint."] + #[doc = ""] + #[doc = "The caller may require an approval first before they can accept to provide the service"] + #[doc = "for the users."] + pub struct Register { + #[codec(compact)] + pub blueprint_id: register::BlueprintId, + pub preferences: register::Preferences, + pub registration_args: register::RegistrationArgs, + #[codec(compact)] + pub value: register::Value, + } + pub mod register { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u64; + pub type Preferences = + runtime_types::tangle_primitives::services::OperatorPreferences; + pub type RegistrationArgs = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Register { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "register"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unregister the caller from being an operator for the service blueprint"] + #[doc = "so that, no more services will assigned to the caller for this specific blueprint."] + #[doc = "Note that, the caller needs to keep providing service for other active service"] + #[doc = "that uses this blueprint, until the end of service time, otherwise they may get reported"] + #[doc = "and slashed."] + pub struct Unregister { + #[codec(compact)] + pub blueprint_id: unregister::BlueprintId, + } + pub mod unregister { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for Unregister { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "unregister"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Update the price targets for the caller for a specific service blueprint."] + #[doc = ""] + #[doc = "See [`Self::register`] for more information."] + pub struct UpdatePriceTargets { + #[codec(compact)] + pub blueprint_id: update_price_targets::BlueprintId, + pub price_targets: update_price_targets::PriceTargets, + } + pub mod update_price_targets { + use super::runtime_types; + pub type BlueprintId = ::core::primitive::u64; + pub type PriceTargets = + runtime_types::tangle_primitives::services::PriceTargets; + } + impl ::subxt_core::blocks::StaticExtrinsic for UpdatePriceTargets { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "update_price_targets"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Request a new service to be initiated using the provided blueprint with a list of"] + #[doc = "operators that will run your service. Optionally, you can customize who is permitted"] + #[doc = "caller of this service, by default only the caller is allowed to call the service."] + pub struct Request { + pub evm_origin: request::EvmOrigin, + #[codec(compact)] + pub blueprint_id: request::BlueprintId, + pub permitted_callers: request::PermittedCallers, + pub operators: request::Operators, + pub request_args: request::RequestArgs, + pub assets: request::Assets, + #[codec(compact)] + pub ttl: request::Ttl, + pub payment_asset: request::PaymentAsset, + #[codec(compact)] + pub value: request::Value, + } + pub mod request { + use super::runtime_types; + pub type EvmOrigin = ::core::option::Option<::subxt_core::utils::H160>; + pub type BlueprintId = ::core::primitive::u64; + pub type PermittedCallers = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Operators = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type RequestArgs = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + pub type Assets = ::subxt_core::alloc::vec::Vec<::core::primitive::u128>; + pub type Ttl = ::core::primitive::u64; + pub type PaymentAsset = + runtime_types::tangle_primitives::services::Asset<::core::primitive::u128>; + pub type Value = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Request { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "request"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Approve a service request, so that the service can be initiated."] + #[doc = ""] + #[doc = "The `restaking_percent` is the percentage of the restaked tokens that will be exposed to"] + #[doc = "the service."] + pub struct Approve { + #[codec(compact)] + pub request_id: approve::RequestId, + #[codec(compact)] + pub restaking_percent: approve::RestakingPercent, + } + pub mod approve { + use super::runtime_types; + pub type RequestId = ::core::primitive::u64; + pub type RestakingPercent = runtime_types::sp_arithmetic::per_things::Percent; + } + impl ::subxt_core::blocks::StaticExtrinsic for Approve { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "approve"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Reject a service request."] + #[doc = "The service will not be initiated, and the requester will need to update the service"] + #[doc = "request."] + pub struct Reject { + #[codec(compact)] + pub request_id: reject::RequestId, + } + pub mod reject { + use super::runtime_types; + pub type RequestId = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for Reject { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "reject"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Terminates the service by the owner of the service."] + pub struct Terminate { + #[codec(compact)] + pub service_id: terminate::ServiceId, + } + pub mod terminate { + use super::runtime_types; + pub type ServiceId = ::core::primitive::u64; + } + impl ::subxt_core::blocks::StaticExtrinsic for Terminate { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "terminate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Call a Job in the service."] + #[doc = "The caller needs to be the owner of the service, or a permitted caller."] + pub struct Call { + #[codec(compact)] + pub service_id: call::ServiceId, + #[codec(compact)] + pub job: call::Job, + pub args: call::Args, + } + pub mod call { + use super::runtime_types; + pub type ServiceId = ::core::primitive::u64; + pub type Job = ::core::primitive::u8; + pub type Args = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Call { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "call"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Submit the job result by using the service ID and call ID."] + pub struct SubmitResult { + #[codec(compact)] + pub service_id: submit_result::ServiceId, + #[codec(compact)] + pub call_id: submit_result::CallId, + pub result: submit_result::Result, + } + pub mod submit_result { + use super::runtime_types; + pub type ServiceId = ::core::primitive::u64; + pub type CallId = ::core::primitive::u64; + pub type Result = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SubmitResult { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "submit_result"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Slash an operator (offender) for a service id with a given percent of their exposed"] + #[doc = "stake for that service."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Slash Origin for this service."] + #[doc = "Note that this does not apply the slash directly, but instead schedules a deferred call"] + #[doc = "to apply the slash by another entity."] + pub struct Slash { + pub offender: slash::Offender, + #[codec(compact)] + pub service_id: slash::ServiceId, + #[codec(compact)] + pub percent: slash::Percent, + } + pub mod slash { + use super::runtime_types; + pub type Offender = ::subxt_core::utils::AccountId32; + pub type ServiceId = ::core::primitive::u64; + pub type Percent = runtime_types::sp_arithmetic::per_things::Percent; + } + impl ::subxt_core::blocks::StaticExtrinsic for Slash { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "slash"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Dispute an [UnappliedSlash] for a given era and index."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Dispute Origin for the service in the"] + #[doc = "[UnappliedSlash]."] + pub struct Dispute { + #[codec(compact)] + pub era: dispute::Era, + #[codec(compact)] + pub index: dispute::Index, + } + pub mod dispute { + use super::runtime_types; + pub type Era = ::core::primitive::u32; + pub type Index = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Dispute { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "dispute"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Adds a new Master Blueprint Service Manager to the list of revisions."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Master Blueprint Service Manager Update Origin."] + pub struct UpdateMasterBlueprintServiceManager { + pub address: update_master_blueprint_service_manager::Address, + } + pub mod update_master_blueprint_service_manager { + use super::runtime_types; + pub type Address = ::subxt_core::utils::H160; + } + impl ::subxt_core::blocks::StaticExtrinsic for UpdateMasterBlueprintServiceManager { + const PALLET: &'static str = "Services"; + const CALL: &'static str = "update_master_blueprint_service_manager"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Create a new service blueprint."] + #[doc = ""] + #[doc = "A Service Blueprint is a template for a service that can be instantiated later on by a"] + #[doc = "user."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = "- `origin`: The account that is creating the service blueprint."] + #[doc = "- `blueprint`: The blueprint of the service."] + pub fn create_blueprint( + &self, + blueprint: types::create_blueprint::Blueprint, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "create_blueprint", + types::CreateBlueprint { blueprint }, + [ + 19u8, 125u8, 48u8, 153u8, 57u8, 158u8, 34u8, 194u8, 247u8, 193u8, + 186u8, 71u8, 59u8, 219u8, 32u8, 194u8, 130u8, 14u8, 189u8, 254u8, 60u8, + 231u8, 142u8, 0u8, 40u8, 244u8, 151u8, 203u8, 133u8, 230u8, 125u8, + 186u8, + ], + ) + } + #[doc = "Pre-register the caller as an operator for a specific blueprint."] + #[doc = ""] + #[doc = "The caller can pre-register for a blueprint, which will emit a `PreRegistration` event."] + #[doc = "This event can be listened to by the operator node to execute the custom blueprint's"] + #[doc = "registration function."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = "- `origin`: The account that is pre-registering for the service blueprint."] + #[doc = "- `blueprint_id`: The ID of the service blueprint."] + pub fn pre_register( + &self, + blueprint_id: types::pre_register::BlueprintId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "pre_register", + types::PreRegister { blueprint_id }, + [ + 217u8, 211u8, 242u8, 184u8, 133u8, 139u8, 206u8, 231u8, 34u8, 94u8, + 70u8, 103u8, 84u8, 252u8, 100u8, 234u8, 76u8, 60u8, 172u8, 32u8, 211u8, + 2u8, 179u8, 63u8, 135u8, 162u8, 110u8, 40u8, 203u8, 213u8, 5u8, 244u8, + ], + ) + } + #[doc = "Register the caller as an operator for a specific blueprint."] + #[doc = ""] + #[doc = "The caller may require an approval first before they can accept to provide the service"] + #[doc = "for the users."] + pub fn register( + &self, + blueprint_id: types::register::BlueprintId, + preferences: types::register::Preferences, + registration_args: types::register::RegistrationArgs, + value: types::register::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "register", + types::Register { blueprint_id, preferences, registration_args, value }, + [ + 112u8, 46u8, 37u8, 227u8, 120u8, 104u8, 106u8, 65u8, 90u8, 52u8, 148u8, + 55u8, 85u8, 196u8, 67u8, 126u8, 22u8, 36u8, 150u8, 149u8, 171u8, 39u8, + 91u8, 156u8, 136u8, 233u8, 166u8, 236u8, 177u8, 9u8, 32u8, 4u8, + ], + ) + } + #[doc = "Unregister the caller from being an operator for the service blueprint"] + #[doc = "so that, no more services will assigned to the caller for this specific blueprint."] + #[doc = "Note that, the caller needs to keep providing service for other active service"] + #[doc = "that uses this blueprint, until the end of service time, otherwise they may get reported"] + #[doc = "and slashed."] + pub fn unregister( + &self, + blueprint_id: types::unregister::BlueprintId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "unregister", + types::Unregister { blueprint_id }, + [ + 159u8, 137u8, 225u8, 1u8, 158u8, 129u8, 192u8, 17u8, 9u8, 163u8, 73u8, + 108u8, 130u8, 155u8, 196u8, 141u8, 203u8, 128u8, 3u8, 198u8, 23u8, + 48u8, 174u8, 104u8, 254u8, 98u8, 29u8, 51u8, 187u8, 122u8, 203u8, 14u8, + ], + ) + } + #[doc = "Update the price targets for the caller for a specific service blueprint."] + #[doc = ""] + #[doc = "See [`Self::register`] for more information."] + pub fn update_price_targets( + &self, + blueprint_id: types::update_price_targets::BlueprintId, + price_targets: types::update_price_targets::PriceTargets, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "update_price_targets", + types::UpdatePriceTargets { blueprint_id, price_targets }, + [ + 64u8, 243u8, 239u8, 182u8, 174u8, 160u8, 96u8, 140u8, 62u8, 187u8, + 247u8, 111u8, 78u8, 96u8, 33u8, 159u8, 95u8, 203u8, 204u8, 31u8, 254u8, + 57u8, 114u8, 219u8, 245u8, 19u8, 201u8, 6u8, 205u8, 145u8, 138u8, + 100u8, + ], + ) + } + #[doc = "Request a new service to be initiated using the provided blueprint with a list of"] + #[doc = "operators that will run your service. Optionally, you can customize who is permitted"] + #[doc = "caller of this service, by default only the caller is allowed to call the service."] + pub fn request( + &self, + evm_origin: types::request::EvmOrigin, + blueprint_id: types::request::BlueprintId, + permitted_callers: types::request::PermittedCallers, + operators: types::request::Operators, + request_args: types::request::RequestArgs, + assets: types::request::Assets, + ttl: types::request::Ttl, + payment_asset: types::request::PaymentAsset, + value: types::request::Value, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "request", + types::Request { + evm_origin, + blueprint_id, + permitted_callers, + operators, + request_args, + assets, + ttl, + payment_asset, + value, + }, + [ + 239u8, 112u8, 229u8, 145u8, 173u8, 9u8, 69u8, 119u8, 15u8, 142u8, 38u8, + 190u8, 184u8, 7u8, 192u8, 144u8, 170u8, 45u8, 45u8, 161u8, 217u8, + 190u8, 35u8, 153u8, 9u8, 37u8, 231u8, 191u8, 139u8, 174u8, 211u8, + 148u8, + ], + ) + } + #[doc = "Approve a service request, so that the service can be initiated."] + #[doc = ""] + #[doc = "The `restaking_percent` is the percentage of the restaked tokens that will be exposed to"] + #[doc = "the service."] + pub fn approve( + &self, + request_id: types::approve::RequestId, + restaking_percent: types::approve::RestakingPercent, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "approve", + types::Approve { request_id, restaking_percent }, + [ + 72u8, 64u8, 87u8, 137u8, 74u8, 76u8, 114u8, 137u8, 14u8, 170u8, 131u8, + 34u8, 144u8, 202u8, 182u8, 61u8, 8u8, 166u8, 232u8, 86u8, 41u8, 12u8, + 111u8, 231u8, 49u8, 153u8, 158u8, 24u8, 153u8, 96u8, 49u8, 209u8, + ], + ) + } + #[doc = "Reject a service request."] + #[doc = "The service will not be initiated, and the requester will need to update the service"] + #[doc = "request."] + pub fn reject( + &self, + request_id: types::reject::RequestId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "reject", + types::Reject { request_id }, + [ + 119u8, 137u8, 83u8, 229u8, 178u8, 252u8, 111u8, 82u8, 34u8, 195u8, + 132u8, 26u8, 136u8, 69u8, 244u8, 124u8, 138u8, 82u8, 249u8, 95u8, + 177u8, 91u8, 236u8, 63u8, 153u8, 82u8, 50u8, 207u8, 145u8, 86u8, 135u8, + 202u8, + ], + ) + } + #[doc = "Terminates the service by the owner of the service."] + pub fn terminate( + &self, + service_id: types::terminate::ServiceId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "terminate", + types::Terminate { service_id }, + [ + 80u8, 226u8, 169u8, 82u8, 37u8, 5u8, 44u8, 217u8, 228u8, 230u8, 40u8, + 144u8, 149u8, 62u8, 225u8, 232u8, 222u8, 111u8, 67u8, 78u8, 31u8, + 209u8, 89u8, 183u8, 19u8, 187u8, 250u8, 1u8, 230u8, 160u8, 252u8, 91u8, + ], + ) + } + #[doc = "Call a Job in the service."] + #[doc = "The caller needs to be the owner of the service, or a permitted caller."] + pub fn call( + &self, + service_id: types::call::ServiceId, + job: types::call::Job, + args: types::call::Args, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "call", + types::Call { service_id, job, args }, + [ + 38u8, 70u8, 241u8, 168u8, 163u8, 141u8, 56u8, 50u8, 45u8, 152u8, 55u8, + 150u8, 139u8, 78u8, 127u8, 111u8, 205u8, 76u8, 206u8, 119u8, 112u8, + 177u8, 210u8, 57u8, 32u8, 235u8, 212u8, 30u8, 236u8, 73u8, 113u8, + 121u8, + ], + ) + } + #[doc = "Submit the job result by using the service ID and call ID."] + pub fn submit_result( + &self, + service_id: types::submit_result::ServiceId, + call_id: types::submit_result::CallId, + result: types::submit_result::Result, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "submit_result", + types::SubmitResult { service_id, call_id, result }, + [ + 205u8, 78u8, 211u8, 173u8, 153u8, 41u8, 173u8, 81u8, 175u8, 37u8, 20u8, + 243u8, 235u8, 202u8, 147u8, 35u8, 174u8, 230u8, 35u8, 194u8, 130u8, + 116u8, 17u8, 39u8, 218u8, 130u8, 239u8, 106u8, 24u8, 214u8, 145u8, + 204u8, + ], + ) + } + #[doc = "Slash an operator (offender) for a service id with a given percent of their exposed"] + #[doc = "stake for that service."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Slash Origin for this service."] + #[doc = "Note that this does not apply the slash directly, but instead schedules a deferred call"] + #[doc = "to apply the slash by another entity."] + pub fn slash( + &self, + offender: types::slash::Offender, + service_id: types::slash::ServiceId, + percent: types::slash::Percent, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "slash", + types::Slash { offender, service_id, percent }, + [ + 230u8, 228u8, 230u8, 48u8, 57u8, 70u8, 72u8, 244u8, 232u8, 45u8, 172u8, + 52u8, 3u8, 157u8, 216u8, 203u8, 191u8, 112u8, 8u8, 104u8, 35u8, 0u8, + 58u8, 17u8, 238u8, 8u8, 221u8, 138u8, 70u8, 24u8, 173u8, 185u8, + ], + ) + } + #[doc = "Dispute an [UnappliedSlash] for a given era and index."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Dispute Origin for the service in the"] + #[doc = "[UnappliedSlash]."] + pub fn dispute( + &self, + era: types::dispute::Era, + index: types::dispute::Index, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "dispute", + types::Dispute { era, index }, + [ + 11u8, 20u8, 40u8, 197u8, 106u8, 155u8, 43u8, 220u8, 65u8, 245u8, 83u8, + 57u8, 99u8, 72u8, 115u8, 215u8, 198u8, 123u8, 58u8, 211u8, 238u8, + 194u8, 87u8, 11u8, 18u8, 9u8, 248u8, 159u8, 49u8, 138u8, 39u8, 69u8, + ], + ) + } + #[doc = "Adds a new Master Blueprint Service Manager to the list of revisions."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Master Blueprint Service Manager Update Origin."] + pub fn update_master_blueprint_service_manager( + &self, + address: types::update_master_blueprint_service_manager::Address, + ) -> ::subxt_core::tx::payload::StaticPayload< + types::UpdateMasterBlueprintServiceManager, + > { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Services", + "update_master_blueprint_service_manager", + types::UpdateMasterBlueprintServiceManager { address }, + [ + 252u8, 219u8, 162u8, 106u8, 90u8, 65u8, 108u8, 176u8, 11u8, 107u8, + 15u8, 162u8, 137u8, 205u8, 165u8, 226u8, 66u8, 222u8, 234u8, 231u8, + 20u8, 85u8, 248u8, 147u8, 200u8, 203u8, 51u8, 242u8, 10u8, 152u8, + 167u8, 68u8, + ], + ) + } + } + } + #[doc = "The `Event` enum of this pallet"] + pub type Event = runtime_types::pallet_services::module::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new service blueprint has been created."] + pub struct BlueprintCreated { + pub owner: blueprint_created::Owner, + pub blueprint_id: blueprint_created::BlueprintId, + } + pub mod blueprint_created { + use super::runtime_types; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for BlueprintCreated { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "BlueprintCreated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has pre-registered for a service blueprint."] + pub struct PreRegistration { + pub operator: pre_registration::Operator, + pub blueprint_id: pre_registration::BlueprintId, + } + pub mod pre_registration { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for PreRegistration { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "PreRegistration"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An new operator has been registered."] + pub struct Registered { + pub provider: registered::Provider, + pub blueprint_id: registered::BlueprintId, + pub preferences: registered::Preferences, + pub registration_args: registered::RegistrationArgs, + } + pub mod registered { + use super::runtime_types; + pub type Provider = ::subxt_core::utils::AccountId32; + pub type BlueprintId = ::core::primitive::u64; + pub type Preferences = + runtime_types::tangle_primitives::services::OperatorPreferences; + pub type RegistrationArgs = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::events::StaticEvent for Registered { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "Registered"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An operator has been unregistered."] + pub struct Unregistered { + pub operator: unregistered::Operator, + pub blueprint_id: unregistered::BlueprintId, + } + pub mod unregistered { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for Unregistered { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "Unregistered"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The price targets for an operator has been updated."] + pub struct PriceTargetsUpdated { + pub operator: price_targets_updated::Operator, + pub blueprint_id: price_targets_updated::BlueprintId, + pub price_targets: price_targets_updated::PriceTargets, + } + pub mod price_targets_updated { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type BlueprintId = ::core::primitive::u64; + pub type PriceTargets = runtime_types::tangle_primitives::services::PriceTargets; + } + impl ::subxt_core::events::StaticEvent for PriceTargetsUpdated { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "PriceTargetsUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A new service has been requested."] + pub struct ServiceRequested { + pub owner: service_requested::Owner, + pub request_id: service_requested::RequestId, + pub blueprint_id: service_requested::BlueprintId, + pub pending_approvals: service_requested::PendingApprovals, + pub approved: service_requested::Approved, + pub assets: service_requested::Assets, + } + pub mod service_requested { + use super::runtime_types; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type RequestId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + pub type PendingApprovals = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Approved = ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Assets = ::subxt_core::alloc::vec::Vec<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for ServiceRequested { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "ServiceRequested"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A service request has been approved."] + pub struct ServiceRequestApproved { + pub operator: service_request_approved::Operator, + pub request_id: service_request_approved::RequestId, + pub blueprint_id: service_request_approved::BlueprintId, + pub pending_approvals: service_request_approved::PendingApprovals, + pub approved: service_request_approved::Approved, + } + pub mod service_request_approved { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type RequestId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + pub type PendingApprovals = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + pub type Approved = ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::events::StaticEvent for ServiceRequestApproved { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "ServiceRequestApproved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A service request has been rejected."] + pub struct ServiceRequestRejected { + pub operator: service_request_rejected::Operator, + pub request_id: service_request_rejected::RequestId, + pub blueprint_id: service_request_rejected::BlueprintId, + } + pub mod service_request_rejected { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type RequestId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for ServiceRequestRejected { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "ServiceRequestRejected"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A service has been initiated."] + pub struct ServiceInitiated { + pub owner: service_initiated::Owner, + pub request_id: service_initiated::RequestId, + pub service_id: service_initiated::ServiceId, + pub blueprint_id: service_initiated::BlueprintId, + pub assets: service_initiated::Assets, + } + pub mod service_initiated { + use super::runtime_types; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type RequestId = ::core::primitive::u64; + pub type ServiceId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + pub type Assets = ::subxt_core::alloc::vec::Vec<::core::primitive::u128>; + } + impl ::subxt_core::events::StaticEvent for ServiceInitiated { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "ServiceInitiated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A service has been terminated."] + pub struct ServiceTerminated { + pub owner: service_terminated::Owner, + pub service_id: service_terminated::ServiceId, + pub blueprint_id: service_terminated::BlueprintId, + } + pub mod service_terminated { + use super::runtime_types; + pub type Owner = ::subxt_core::utils::AccountId32; + pub type ServiceId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + } + impl ::subxt_core::events::StaticEvent for ServiceTerminated { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "ServiceTerminated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A job has been called."] + pub struct JobCalled { + pub caller: job_called::Caller, + pub service_id: job_called::ServiceId, + pub call_id: job_called::CallId, + pub job: job_called::Job, + pub args: job_called::Args, + } + pub mod job_called { + use super::runtime_types; + pub type Caller = ::subxt_core::utils::AccountId32; + pub type ServiceId = ::core::primitive::u64; + pub type CallId = ::core::primitive::u64; + pub type Job = ::core::primitive::u8; + pub type Args = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::events::StaticEvent for JobCalled { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "JobCalled"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A job result has been submitted."] + pub struct JobResultSubmitted { + pub operator: job_result_submitted::Operator, + pub service_id: job_result_submitted::ServiceId, + pub call_id: job_result_submitted::CallId, + pub job: job_result_submitted::Job, + pub result: job_result_submitted::Result, + } + pub mod job_result_submitted { + use super::runtime_types; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type ServiceId = ::core::primitive::u64; + pub type CallId = ::core::primitive::u64; + pub type Job = ::core::primitive::u8; + pub type Result = ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::events::StaticEvent for JobResultSubmitted { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "JobResultSubmitted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "EVM execution reverted with a reason."] + pub struct EvmReverted { + pub from: evm_reverted::From, + pub to: evm_reverted::To, + pub data: evm_reverted::Data, + pub reason: evm_reverted::Reason, + } + pub mod evm_reverted { + use super::runtime_types; + pub type From = ::subxt_core::utils::H160; + pub type To = ::subxt_core::utils::H160; + pub type Data = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + pub type Reason = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::events::StaticEvent for EvmReverted { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "EvmReverted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An Operator has an unapplied slash."] + pub struct UnappliedSlash { + pub index: unapplied_slash::Index, + pub operator: unapplied_slash::Operator, + pub amount: unapplied_slash::Amount, + pub service_id: unapplied_slash::ServiceId, + pub blueprint_id: unapplied_slash::BlueprintId, + pub era: unapplied_slash::Era, + } + pub mod unapplied_slash { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type ServiceId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + pub type Era = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for UnappliedSlash { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "UnappliedSlash"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "An Unapplied Slash got discarded."] + pub struct SlashDiscarded { + pub index: slash_discarded::Index, + pub operator: slash_discarded::Operator, + pub amount: slash_discarded::Amount, + pub service_id: slash_discarded::ServiceId, + pub blueprint_id: slash_discarded::BlueprintId, + pub era: slash_discarded::Era, + } + pub mod slash_discarded { + use super::runtime_types; + pub type Index = ::core::primitive::u32; + pub type Operator = ::subxt_core::utils::AccountId32; + pub type Amount = ::core::primitive::u128; + pub type ServiceId = ::core::primitive::u64; + pub type BlueprintId = ::core::primitive::u64; + pub type Era = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for SlashDiscarded { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "SlashDiscarded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The Master Blueprint Service Manager has been revised."] + pub struct MasterBlueprintServiceManagerRevised { + pub revision: master_blueprint_service_manager_revised::Revision, + pub address: master_blueprint_service_manager_revised::Address, + } + pub mod master_blueprint_service_manager_revised { + use super::runtime_types; + pub type Revision = ::core::primitive::u32; + pub type Address = ::subxt_core::utils::H160; + } + impl ::subxt_core::events::StaticEvent for MasterBlueprintServiceManagerRevised { + const PALLET: &'static str = "Services"; + const EVENT: &'static str = "MasterBlueprintServiceManagerRevised"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod next_blueprint_id { + use super::runtime_types; + pub type NextBlueprintId = ::core::primitive::u64; + } + pub mod next_service_request_id { + use super::runtime_types; + pub type NextServiceRequestId = ::core::primitive::u64; + } + pub mod next_instance_id { + use super::runtime_types; + pub type NextInstanceId = ::core::primitive::u64; + } + pub mod next_job_call_id { + use super::runtime_types; + pub type NextJobCallId = ::core::primitive::u64; + } + pub mod next_unapplied_slash_index { + use super::runtime_types; + pub type NextUnappliedSlashIndex = ::core::primitive::u32; + } + pub mod blueprints { + use super::runtime_types; + pub type Blueprints = ( + ::subxt_core::utils::AccountId32, + runtime_types::tangle_primitives::services::ServiceBlueprint, + ); + pub type Param0 = ::core::primitive::u64; + } + pub mod operators { + use super::runtime_types; + pub type Operators = + runtime_types::tangle_primitives::services::OperatorPreferences; + pub type Param0 = ::core::primitive::u64; + pub type Param1 = ::subxt_core::utils::AccountId32; + } + pub mod service_requests { + use super::runtime_types; + pub type ServiceRequests = + runtime_types::tangle_primitives::services::ServiceRequest< + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u64; + } + pub mod instances { + use super::runtime_types; + pub type Instances = runtime_types::tangle_primitives::services::Service< + ::subxt_core::utils::AccountId32, + ::core::primitive::u64, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u64; + } + pub mod user_services { + use super::runtime_types; + pub type UserServices = + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< + ::core::primitive::u64, + >; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod job_calls { + use super::runtime_types; + pub type JobCalls = runtime_types::tangle_primitives::services::JobCall< + ::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::core::primitive::u64; + pub type Param1 = ::core::primitive::u64; + } + pub mod job_results { + use super::runtime_types; + pub type JobResults = runtime_types::tangle_primitives::services::JobCallResult< + ::subxt_core::utils::AccountId32, + >; + pub type Param0 = ::core::primitive::u64; + pub type Param1 = ::core::primitive::u64; + } + pub mod unapplied_slashes { + use super::runtime_types; + pub type UnappliedSlashes = + runtime_types::pallet_services::types::UnappliedSlash< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u32; + pub type Param1 = ::core::primitive::u32; + } + pub mod master_blueprint_service_manager_revisions { + use super::runtime_types; + pub type MasterBlueprintServiceManagerRevisions = + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::H160, + >; + } + pub mod operators_profile { + use super::runtime_types; + pub type OperatorsProfile = + runtime_types::tangle_primitives::services::OperatorProfile; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod staging_service_payments { + use super::runtime_types; + pub type StagingServicePayments = + runtime_types::tangle_primitives::services::StagingServicePayment< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + ::core::primitive::u128, + >; + pub type Param0 = ::core::primitive::u64; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The next free ID for a service blueprint."] + pub fn next_blueprint_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_blueprint_id::NextBlueprintId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "NextBlueprintId", + (), + [ + 35u8, 44u8, 121u8, 43u8, 47u8, 227u8, 24u8, 214u8, 105u8, 224u8, 192u8, + 107u8, 93u8, 67u8, 237u8, 105u8, 147u8, 12u8, 106u8, 77u8, 106u8, 60u8, + 125u8, 136u8, 29u8, 74u8, 32u8, 116u8, 169u8, 29u8, 248u8, 191u8, + ], + ) + } + #[doc = " The next free ID for a service request."] + pub fn next_service_request_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_service_request_id::NextServiceRequestId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "NextServiceRequestId", + (), + [ + 40u8, 205u8, 139u8, 150u8, 30u8, 95u8, 231u8, 50u8, 201u8, 122u8, 18u8, + 86u8, 153u8, 52u8, 66u8, 18u8, 223u8, 123u8, 81u8, 25u8, 124u8, 181u8, + 88u8, 131u8, 156u8, 54u8, 121u8, 244u8, 206u8, 54u8, 15u8, 218u8, + ], + ) + } + #[doc = " The next free ID for a service Instance."] + pub fn next_instance_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_instance_id::NextInstanceId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "NextInstanceId", + (), + [ + 134u8, 80u8, 72u8, 175u8, 246u8, 17u8, 135u8, 164u8, 20u8, 191u8, 89u8, + 166u8, 9u8, 94u8, 74u8, 92u8, 98u8, 189u8, 199u8, 136u8, 27u8, 203u8, + 96u8, 193u8, 212u8, 151u8, 83u8, 178u8, 71u8, 44u8, 229u8, 101u8, + ], + ) + } + #[doc = " The next free ID for a service call."] + pub fn next_job_call_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_job_call_id::NextJobCallId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "NextJobCallId", + (), + [ + 91u8, 154u8, 224u8, 213u8, 133u8, 241u8, 107u8, 25u8, 9u8, 22u8, 190u8, + 236u8, 246u8, 67u8, 142u8, 223u8, 38u8, 184u8, 60u8, 6u8, 154u8, 229u8, + 170u8, 195u8, 109u8, 160u8, 23u8, 104u8, 229u8, 202u8, 10u8, 76u8, + ], + ) + } + #[doc = " The next free ID for a unapplied slash."] + pub fn next_unapplied_slash_index( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::next_unapplied_slash_index::NextUnappliedSlashIndex, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "NextUnappliedSlashIndex", + (), + [ + 140u8, 233u8, 25u8, 123u8, 172u8, 43u8, 141u8, 60u8, 203u8, 69u8, + 231u8, 163u8, 190u8, 51u8, 102u8, 76u8, 70u8, 188u8, 154u8, 127u8, + 246u8, 42u8, 27u8, 176u8, 50u8, 178u8, 222u8, 57u8, 57u8, 220u8, 60u8, + 74u8, + ], + ) + } + #[doc = " The service blueprints along with their owner."] + pub fn blueprints_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::blueprints::Blueprints, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Blueprints", + (), + [ + 128u8, 96u8, 251u8, 173u8, 221u8, 227u8, 202u8, 143u8, 95u8, 146u8, + 91u8, 134u8, 174u8, 134u8, 229u8, 40u8, 99u8, 115u8, 180u8, 135u8, + 144u8, 94u8, 17u8, 43u8, 69u8, 81u8, 46u8, 127u8, 238u8, 179u8, 51u8, + 58u8, + ], + ) + } + #[doc = " The service blueprints along with their owner."] + pub fn blueprints( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::blueprints::Blueprints, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Blueprints", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 128u8, 96u8, 251u8, 173u8, 221u8, 227u8, 202u8, 143u8, 95u8, 146u8, + 91u8, 134u8, 174u8, 134u8, 229u8, 40u8, 99u8, 115u8, 180u8, 135u8, + 144u8, 94u8, 17u8, 43u8, 69u8, 81u8, 46u8, 127u8, 238u8, 179u8, 51u8, + 58u8, + ], + ) + } + #[doc = " The operators for a specific service blueprint."] + #[doc = " Blueprint ID -> Operator -> Operator Preferences"] + pub fn operators_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::operators::Operators, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Operators", + (), + [ + 174u8, 201u8, 136u8, 193u8, 231u8, 202u8, 185u8, 114u8, 100u8, 186u8, + 124u8, 138u8, 206u8, 11u8, 196u8, 146u8, 131u8, 51u8, 252u8, 115u8, + 26u8, 13u8, 143u8, 66u8, 27u8, 2u8, 44u8, 25u8, 72u8, 247u8, 191u8, + 109u8, + ], + ) + } + #[doc = " The operators for a specific service blueprint."] + #[doc = " Blueprint ID -> Operator -> Operator Preferences"] + pub fn operators_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::operators::Operators, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Operators", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 174u8, 201u8, 136u8, 193u8, 231u8, 202u8, 185u8, 114u8, 100u8, 186u8, + 124u8, 138u8, 206u8, 11u8, 196u8, 146u8, 131u8, 51u8, 252u8, 115u8, + 26u8, 13u8, 143u8, 66u8, 27u8, 2u8, 44u8, 25u8, 72u8, 247u8, 191u8, + 109u8, + ], + ) + } + #[doc = " The operators for a specific service blueprint."] + #[doc = " Blueprint ID -> Operator -> Operator Preferences"] + pub fn operators( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::operators::Operators, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Operators", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 174u8, 201u8, 136u8, 193u8, 231u8, 202u8, 185u8, 114u8, 100u8, 186u8, + 124u8, 138u8, 206u8, 11u8, 196u8, 146u8, 131u8, 51u8, 252u8, 115u8, + 26u8, 13u8, 143u8, 66u8, 27u8, 2u8, 44u8, 25u8, 72u8, 247u8, 191u8, + 109u8, + ], + ) + } + #[doc = " The service requests along with their owner."] + #[doc = " Request ID -> Service Request"] + pub fn service_requests_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::service_requests::ServiceRequests, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "ServiceRequests", + (), + [ + 92u8, 49u8, 14u8, 154u8, 29u8, 210u8, 138u8, 91u8, 151u8, 226u8, 221u8, + 114u8, 248u8, 45u8, 245u8, 254u8, 111u8, 214u8, 147u8, 250u8, 173u8, + 241u8, 197u8, 2u8, 223u8, 27u8, 216u8, 162u8, 87u8, 93u8, 222u8, 12u8, + ], + ) + } + #[doc = " The service requests along with their owner."] + #[doc = " Request ID -> Service Request"] + pub fn service_requests( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::service_requests::Param0, + >, + types::service_requests::ServiceRequests, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "ServiceRequests", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 92u8, 49u8, 14u8, 154u8, 29u8, 210u8, 138u8, 91u8, 151u8, 226u8, 221u8, + 114u8, 248u8, 45u8, 245u8, 254u8, 111u8, 214u8, 147u8, 250u8, 173u8, + 241u8, 197u8, 2u8, 223u8, 27u8, 216u8, 162u8, 87u8, 93u8, 222u8, 12u8, + ], + ) + } + #[doc = " The Services Instances"] + #[doc = " Service ID -> Service"] + pub fn instances_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::instances::Instances, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Instances", + (), + [ + 219u8, 177u8, 116u8, 70u8, 123u8, 19u8, 195u8, 108u8, 154u8, 204u8, + 221u8, 131u8, 254u8, 20u8, 56u8, 29u8, 41u8, 105u8, 35u8, 213u8, 252u8, + 44u8, 118u8, 125u8, 82u8, 215u8, 54u8, 131u8, 154u8, 111u8, 105u8, + 246u8, + ], + ) + } + #[doc = " The Services Instances"] + #[doc = " Service ID -> Service"] + pub fn instances( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::instances::Instances, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "Instances", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 219u8, 177u8, 116u8, 70u8, 123u8, 19u8, 195u8, 108u8, 154u8, 204u8, + 221u8, 131u8, 254u8, 20u8, 56u8, 29u8, 41u8, 105u8, 35u8, 213u8, 252u8, + 44u8, 118u8, 125u8, 82u8, 215u8, 54u8, 131u8, 154u8, 111u8, 105u8, + 246u8, + ], + ) + } + #[doc = " User Service Instances"] + #[doc = " User Account ID -> Service ID"] + pub fn user_services_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::user_services::UserServices, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "UserServices", + (), + [ + 228u8, 80u8, 139u8, 177u8, 57u8, 117u8, 175u8, 212u8, 37u8, 201u8, + 176u8, 12u8, 79u8, 136u8, 65u8, 250u8, 105u8, 37u8, 13u8, 176u8, 86u8, + 119u8, 111u8, 6u8, 44u8, 109u8, 193u8, 103u8, 199u8, 195u8, 56u8, + 235u8, + ], + ) + } + #[doc = " User Service Instances"] + #[doc = " User Account ID -> Service ID"] + pub fn user_services( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::user_services::UserServices, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "UserServices", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 228u8, 80u8, 139u8, 177u8, 57u8, 117u8, 175u8, 212u8, 37u8, 201u8, + 176u8, 12u8, 79u8, 136u8, 65u8, 250u8, 105u8, 37u8, 13u8, 176u8, 86u8, + 119u8, 111u8, 6u8, 44u8, 109u8, 193u8, 103u8, 199u8, 195u8, 56u8, + 235u8, + ], + ) + } + #[doc = " The Service Job Calls"] + #[doc = " Service ID -> Call ID -> Job Call"] + pub fn job_calls_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::job_calls::JobCalls, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "JobCalls", + (), + [ + 210u8, 66u8, 128u8, 255u8, 41u8, 25u8, 204u8, 100u8, 45u8, 122u8, 29u8, + 103u8, 47u8, 49u8, 21u8, 182u8, 4u8, 212u8, 199u8, 119u8, 107u8, 59u8, + 94u8, 82u8, 70u8, 184u8, 131u8, 151u8, 80u8, 223u8, 172u8, 178u8, + ], + ) + } + #[doc = " The Service Job Calls"] + #[doc = " Service ID -> Call ID -> Job Call"] + pub fn job_calls_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::job_calls::JobCalls, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "JobCalls", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 210u8, 66u8, 128u8, 255u8, 41u8, 25u8, 204u8, 100u8, 45u8, 122u8, 29u8, + 103u8, 47u8, 49u8, 21u8, 182u8, 4u8, 212u8, 199u8, 119u8, 107u8, 59u8, + 94u8, 82u8, 70u8, 184u8, 131u8, 151u8, 80u8, 223u8, 172u8, 178u8, + ], + ) + } + #[doc = " The Service Job Calls"] + #[doc = " Service ID -> Call ID -> Job Call"] + pub fn job_calls( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey, + ::subxt_core::storage::address::StaticStorageKey, + ), + types::job_calls::JobCalls, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "JobCalls", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 210u8, 66u8, 128u8, 255u8, 41u8, 25u8, 204u8, 100u8, 45u8, 122u8, 29u8, + 103u8, 47u8, 49u8, 21u8, 182u8, 4u8, 212u8, 199u8, 119u8, 107u8, 59u8, + 94u8, 82u8, 70u8, 184u8, 131u8, 151u8, 80u8, 223u8, 172u8, 178u8, + ], + ) + } + #[doc = " The Service Job Call Results"] + #[doc = " Service ID -> Call ID -> Job Call Result"] + pub fn job_results_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::job_results::JobResults, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "JobResults", + (), + [ + 254u8, 193u8, 251u8, 72u8, 66u8, 54u8, 149u8, 100u8, 181u8, 169u8, + 170u8, 162u8, 209u8, 71u8, 148u8, 26u8, 93u8, 110u8, 187u8, 91u8, 28u8, + 120u8, 63u8, 93u8, 3u8, 59u8, 39u8, 147u8, 235u8, 126u8, 167u8, 108u8, + ], + ) + } + #[doc = " The Service Job Call Results"] + #[doc = " Service ID -> Call ID -> Job Call Result"] + pub fn job_results_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::job_results::JobResults, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "JobResults", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 254u8, 193u8, 251u8, 72u8, 66u8, 54u8, 149u8, 100u8, 181u8, 169u8, + 170u8, 162u8, 209u8, 71u8, 148u8, 26u8, 93u8, 110u8, 187u8, 91u8, 28u8, + 120u8, 63u8, 93u8, 3u8, 59u8, 39u8, 147u8, 235u8, 126u8, 167u8, 108u8, + ], + ) + } + #[doc = " The Service Job Call Results"] + #[doc = " Service ID -> Call ID -> Job Call Result"] + pub fn job_results( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::job_results::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::job_results::Param1, + >, + ), + types::job_results::JobResults, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "JobResults", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 254u8, 193u8, 251u8, 72u8, 66u8, 54u8, 149u8, 100u8, 181u8, 169u8, + 170u8, 162u8, 209u8, 71u8, 148u8, 26u8, 93u8, 110u8, 187u8, 91u8, 28u8, + 120u8, 63u8, 93u8, 3u8, 59u8, 39u8, 147u8, 235u8, 126u8, 167u8, 108u8, + ], + ) + } + #[doc = " All unapplied slashes that are queued for later."] + #[doc = ""] + #[doc = " EraIndex -> Index -> UnappliedSlash"] + pub fn unapplied_slashes_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::unapplied_slashes::UnappliedSlashes, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "UnappliedSlashes", + (), + [ + 131u8, 139u8, 216u8, 142u8, 159u8, 249u8, 125u8, 45u8, 8u8, 130u8, + 110u8, 58u8, 162u8, 117u8, 169u8, 140u8, 71u8, 132u8, 11u8, 255u8, + 112u8, 187u8, 4u8, 46u8, 22u8, 107u8, 20u8, 139u8, 49u8, 181u8, 45u8, + 61u8, + ], + ) + } + #[doc = " All unapplied slashes that are queued for later."] + #[doc = ""] + #[doc = " EraIndex -> Index -> UnappliedSlash"] + pub fn unapplied_slashes_iter1( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::unapplied_slashes::Param0, + >, + types::unapplied_slashes::UnappliedSlashes, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "UnappliedSlashes", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 131u8, 139u8, 216u8, 142u8, 159u8, 249u8, 125u8, 45u8, 8u8, 130u8, + 110u8, 58u8, 162u8, 117u8, 169u8, 140u8, 71u8, 132u8, 11u8, 255u8, + 112u8, 187u8, 4u8, 46u8, 22u8, 107u8, 20u8, 139u8, 49u8, 181u8, 45u8, + 61u8, + ], + ) + } + #[doc = " All unapplied slashes that are queued for later."] + #[doc = ""] + #[doc = " EraIndex -> Index -> UnappliedSlash"] + pub fn unapplied_slashes( + &self, + _0: impl ::core::borrow::Borrow, + _1: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ( + ::subxt_core::storage::address::StaticStorageKey< + types::unapplied_slashes::Param0, + >, + ::subxt_core::storage::address::StaticStorageKey< + types::unapplied_slashes::Param1, + >, + ), + types::unapplied_slashes::UnappliedSlashes, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "UnappliedSlashes", + ( + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + ::subxt_core::storage::address::StaticStorageKey::new(_1.borrow()), + ), + [ + 131u8, 139u8, 216u8, 142u8, 159u8, 249u8, 125u8, 45u8, 8u8, 130u8, + 110u8, 58u8, 162u8, 117u8, 169u8, 140u8, 71u8, 132u8, 11u8, 255u8, + 112u8, 187u8, 4u8, 46u8, 22u8, 107u8, 20u8, 139u8, 49u8, 181u8, 45u8, + 61u8, + ], + ) + } + #[doc = " All the Master Blueprint Service Managers revisions."] + #[doc = ""] + #[doc = " Where the index is the revision number."] pub fn master_blueprint_service_manager_revisions (& self ,) -> :: subxt_core :: storage :: address :: StaticAddress :: < () , types :: master_blueprint_service_manager_revisions :: MasterBlueprintServiceManagerRevisions , :: subxt_core :: utils :: Yes , :: subxt_core :: utils :: Yes , () >{ + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "MasterBlueprintServiceManagerRevisions", + (), + [ + 189u8, 128u8, 221u8, 221u8, 88u8, 201u8, 75u8, 183u8, 233u8, 149u8, + 188u8, 66u8, 88u8, 166u8, 249u8, 15u8, 140u8, 119u8, 83u8, 86u8, 106u8, + 68u8, 14u8, 1u8, 194u8, 48u8, 241u8, 18u8, 19u8, 133u8, 114u8, 167u8, + ], + ) + } + pub fn operators_profile_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::operators_profile::OperatorsProfile, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "OperatorsProfile", + (), + [ + 89u8, 71u8, 163u8, 108u8, 71u8, 192u8, 181u8, 164u8, 168u8, 126u8, + 228u8, 122u8, 159u8, 83u8, 66u8, 59u8, 179u8, 218u8, 96u8, 67u8, 172u8, + 65u8, 62u8, 156u8, 69u8, 85u8, 38u8, 217u8, 93u8, 8u8, 58u8, 115u8, + ], + ) + } + pub fn operators_profile( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::operators_profile::Param0, + >, + types::operators_profile::OperatorsProfile, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "OperatorsProfile", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 89u8, 71u8, 163u8, 108u8, 71u8, 192u8, 181u8, 164u8, 168u8, 126u8, + 228u8, 122u8, 159u8, 83u8, 66u8, 59u8, 179u8, 218u8, 96u8, 67u8, 172u8, + 65u8, 62u8, 156u8, 69u8, 85u8, 38u8, 217u8, 93u8, 8u8, 58u8, 115u8, + ], + ) + } + #[doc = " Holds the service payment information for a service request."] + #[doc = " Once the service is initiated, the payment is transferred to the MBSM and this"] + #[doc = " information is removed."] + #[doc = ""] + #[doc = " Service Requst ID -> Service Payment"] + pub fn staging_service_payments_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::staging_service_payments::StagingServicePayments, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "StagingServicePayments", + (), + [ + 192u8, 196u8, 170u8, 27u8, 123u8, 252u8, 120u8, 33u8, 138u8, 77u8, + 224u8, 10u8, 9u8, 100u8, 175u8, 118u8, 86u8, 82u8, 147u8, 139u8, 223u8, + 187u8, 42u8, 108u8, 143u8, 226u8, 174u8, 159u8, 195u8, 179u8, 246u8, + 28u8, + ], + ) + } + #[doc = " Holds the service payment information for a service request."] + #[doc = " Once the service is initiated, the payment is transferred to the MBSM and this"] + #[doc = " information is removed."] + #[doc = ""] + #[doc = " Service Requst ID -> Service Payment"] + pub fn staging_service_payments( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::staging_service_payments::Param0, + >, + types::staging_service_payments::StagingServicePayments, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Services", + "StagingServicePayments", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 192u8, 196u8, 170u8, 27u8, 123u8, 252u8, 120u8, 33u8, 138u8, 77u8, + 224u8, 10u8, 9u8, 100u8, 175u8, 118u8, 86u8, 82u8, 147u8, 139u8, 223u8, + 187u8, 42u8, 108u8, 143u8, 226u8, 174u8, 159u8, 195u8, 179u8, 246u8, + 28u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " `Pallet` EVM Address."] + pub fn pallet_evm_address( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::subxt_core::utils::H160> + { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "PalletEVMAddress", + [ + 184u8, 103u8, 76u8, 37u8, 218u8, 155u8, 125u8, 78u8, 138u8, 122u8, + 255u8, 132u8, 124u8, 68u8, 65u8, 163u8, 97u8, 77u8, 80u8, 33u8, 69u8, + 55u8, 69u8, 230u8, 83u8, 135u8, 254u8, 221u8, 222u8, 177u8, 10u8, + 189u8, + ], + ) + } + #[doc = " Maximum number of fields in a job call."] + pub fn max_fields( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxFields", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum size of a field in a job call."] + pub fn max_fields_size( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxFieldsSize", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum length of metadata string length."] + pub fn max_metadata_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxMetadataLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of jobs per service."] + pub fn max_jobs_per_service( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxJobsPerService", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of Operators per service."] + pub fn max_operators_per_service( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxOperatorsPerService", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of permitted callers per service."] + pub fn max_permitted_callers( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxPermittedCallers", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of services per operator."] + pub fn max_services_per_operator( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxServicesPerOperator", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of blueprints per operator."] + pub fn max_blueprints_per_operator( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxBlueprintsPerOperator", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of services per user."] + pub fn max_services_per_user( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxServicesPerUser", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of binaries per gadget."] + pub fn max_binaries_per_gadget( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxBinariesPerGadget", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of sources per gadget."] + pub fn max_sources_per_gadget( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxSourcesPerGadget", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Git owner maximum length."] + pub fn max_git_owner_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxGitOwnerLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Git repository maximum length."] + pub fn max_git_repo_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxGitRepoLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Git tag maximum length."] + pub fn max_git_tag_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxGitTagLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " binary name maximum length."] + pub fn max_binary_name_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxBinaryNameLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " IPFS hash maximum length."] + pub fn max_ipfs_hash_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxIpfsHashLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Container registry maximum length."] + pub fn max_container_registry_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxContainerRegistryLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Container image name maximum length."] + pub fn max_container_image_name_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxContainerImageNameLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Container image tag maximum length."] + pub fn max_container_image_tag_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxContainerImageTagLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of assets per service."] + pub fn max_assets_per_service( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxAssetsPerService", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Maximum number of versions of Master Blueprint Service Manager allowed."] + pub fn max_master_blueprint_service_manager_versions( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "MaxMasterBlueprintServiceManagerVersions", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " Number of eras that slashes are deferred by, after computation."] + #[doc = ""] + #[doc = " This should be less than the bonding duration. Set to 0 if slashes"] + #[doc = " should be applied immediately, without opportunity for intervention."] + pub fn slash_defer_duration( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Services", + "SlashDeferDuration", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod lst { + use super::root_mod; + use super::runtime_types; + #[doc = "The `Error` enum of this pallet."] + pub type Error = runtime_types::pallet_tangle_lst::pallet::Error; + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub type Call = runtime_types::pallet_tangle_lst::pallet::Call; + pub mod calls { + use super::root_mod; + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub struct Join { + #[codec(compact)] + pub amount: join::Amount, + pub pool_id: join::PoolId, + } + pub mod join { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Join { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "join"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] + pub struct BondExtra { + pub pool_id: bond_extra::PoolId, + pub extra: bond_extra::Extra, + } + pub mod bond_extra { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Extra = + runtime_types::pallet_tangle_lst::types::BondExtra<::core::primitive::u128>; + } + impl ::subxt_core::blocks::StaticExtrinsic for BondExtra { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "bond_extra"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + pub struct Unbond { + pub member_account: unbond::MemberAccount, + pub pool_id: unbond::PoolId, + #[codec(compact)] + pub unbonding_points: unbond::UnbondingPoints, + } + pub mod unbond { + use super::runtime_types; + pub type MemberAccount = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type PoolId = ::core::primitive::u32; + pub type UnbondingPoints = ::core::primitive::u128; + } + impl ::subxt_core::blocks::StaticExtrinsic for Unbond { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "unbond"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if there are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub struct PoolWithdrawUnbonded { + pub pool_id: pool_withdraw_unbonded::PoolId, + pub num_slashing_spans: pool_withdraw_unbonded::NumSlashingSpans, + } + pub mod pool_withdraw_unbonded { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for PoolWithdrawUnbonded { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "pool_withdraw_unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If the target is the depositor, the pool will be destroyed."] + pub struct WithdrawUnbonded { + pub member_account: withdraw_unbonded::MemberAccount, + pub pool_id: withdraw_unbonded::PoolId, + pub num_slashing_spans: withdraw_unbonded::NumSlashingSpans, + } + pub mod withdraw_unbonded { + use super::runtime_types; + pub type MemberAccount = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type PoolId = ::core::primitive::u32; + pub type NumSlashingSpans = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for WithdrawUnbonded { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "withdraw_unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferable."] + pub struct Create { + #[codec(compact)] + pub amount: create::Amount, + pub root: create::Root, + pub nominator: create::Nominator, + pub bouncer: create::Bouncer, + pub name: create::Name, + pub icon: create::Icon, + } + pub mod create { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type Root = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Nominator = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Bouncer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Name = ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >; + pub type Icon = ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for Create { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "create"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub struct CreateWithPoolId { + #[codec(compact)] + pub amount: create_with_pool_id::Amount, + pub root: create_with_pool_id::Root, + pub nominator: create_with_pool_id::Nominator, + pub bouncer: create_with_pool_id::Bouncer, + pub pool_id: create_with_pool_id::PoolId, + pub name: create_with_pool_id::Name, + pub icon: create_with_pool_id::Icon, + } + pub mod create_with_pool_id { + use super::runtime_types; + pub type Amount = ::core::primitive::u128; + pub type Root = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Nominator = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type Bouncer = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type PoolId = ::core::primitive::u32; + pub type Name = ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >; + pub type Icon = ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for CreateWithPoolId { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "create_with_pool_id"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub struct Nominate { + pub pool_id: nominate::PoolId, + pub validators: nominate::Validators, + } + pub mod nominate { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Validators = + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::blocks::StaticExtrinsic for Nominate { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "nominate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + pub struct SetState { + pub pool_id: set_state::PoolId, + pub state: set_state::State, + } + pub mod set_state { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type State = runtime_types::pallet_tangle_lst::types::pools::PoolState; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetState { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_state"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] + pub struct SetMetadata { + pub pool_id: set_metadata::PoolId, + pub metadata: set_metadata::Metadata, + } + pub mod set_metadata { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Metadata = ::subxt_core::alloc::vec::Vec<::core::primitive::u8>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetMetadata { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_metadata"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] + pub struct SetConfigs { + pub min_join_bond: set_configs::MinJoinBond, + pub min_create_bond: set_configs::MinCreateBond, + pub max_pools: set_configs::MaxPools, + pub global_max_commission: set_configs::GlobalMaxCommission, + } + pub mod set_configs { + use super::runtime_types; + pub type MinJoinBond = + runtime_types::pallet_tangle_lst::types::ConfigOp<::core::primitive::u128>; + pub type MinCreateBond = + runtime_types::pallet_tangle_lst::types::ConfigOp<::core::primitive::u128>; + pub type MaxPools = + runtime_types::pallet_tangle_lst::types::ConfigOp<::core::primitive::u32>; + pub type GlobalMaxCommission = + runtime_types::pallet_tangle_lst::types::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetConfigs { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_configs"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + pub struct UpdateRoles { + pub pool_id: update_roles::PoolId, + pub new_root: update_roles::NewRoot, + pub new_nominator: update_roles::NewNominator, + pub new_bouncer: update_roles::NewBouncer, + } + pub mod update_roles { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NewRoot = runtime_types::pallet_tangle_lst::types::ConfigOp< + ::subxt_core::utils::AccountId32, + >; + pub type NewNominator = runtime_types::pallet_tangle_lst::types::ConfigOp< + ::subxt_core::utils::AccountId32, + >; + pub type NewBouncer = runtime_types::pallet_tangle_lst::types::ConfigOp< + ::subxt_core::utils::AccountId32, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for UpdateRoles { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "update_roles"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub struct Chill { + pub pool_id: chill::PoolId, + } + pub mod chill { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for Chill { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "chill"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessAll` or `PermissionlessCompound`."] + pub struct BondExtraOther { + pub member: bond_extra_other::Member, + pub pool_id: bond_extra_other::PoolId, + pub extra: bond_extra_other::Extra, + } + pub mod bond_extra_other { + use super::runtime_types; + pub type Member = ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >; + pub type PoolId = ::core::primitive::u32; + pub type Extra = + runtime_types::pallet_tangle_lst::types::BondExtra<::core::primitive::u128>; + } + impl ::subxt_core::blocks::StaticExtrinsic for BondExtraOther { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "bond_extra_other"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + pub struct SetCommission { + pub pool_id: set_commission::PoolId, + pub new_commission: set_commission::NewCommission, + } + pub mod set_commission { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NewCommission = ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommission { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_commission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + pub struct SetCommissionMax { + pub pool_id: set_commission_max::PoolId, + pub max_commission: set_commission_max::MaxCommission, + } + pub mod set_commission_max { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type MaxCommission = runtime_types::sp_arithmetic::per_things::Perbill; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommissionMax { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_commission_max"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + pub struct SetCommissionChangeRate { + pub pool_id: set_commission_change_rate::PoolId, + pub change_rate: set_commission_change_rate::ChangeRate, + } + pub mod set_commission_change_rate { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type ChangeRate = + runtime_types::pallet_tangle_lst::types::commission::CommissionChangeRate< + ::core::primitive::u64, + >; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommissionChangeRate { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_commission_change_rate"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + pub struct ClaimCommission { + pub pool_id: claim_commission::PoolId, + } + pub mod claim_commission { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for ClaimCommission { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "claim_commission"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Top up the deficit or withdraw the excess ED from the pool."] + #[doc = ""] + #[doc = "When a pool is created, the pool depositor transfers ED to the reward account of the"] + #[doc = "pool. ED is subject to change and over time, the deposit in the reward account may be"] + #[doc = "insufficient to cover the ED deficit of the pool or vice-versa where there is excess"] + #[doc = "deposit to the pool. This call allows anyone to adjust the ED deposit of the"] + #[doc = "pool by either topping up the deficit or claiming the excess."] + pub struct AdjustPoolDeposit { + pub pool_id: adjust_pool_deposit::PoolId, + } + pub mod adjust_pool_deposit { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::blocks::StaticExtrinsic for AdjustPoolDeposit { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "adjust_pool_deposit"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Set or remove a pool's commission claim permission."] + #[doc = ""] + #[doc = "Determines who can claim the pool's pending commission. Only the `Root` role of the pool"] + #[doc = "is able to conifigure commission claim permissions."] + pub struct SetCommissionClaimPermission { + pub pool_id: set_commission_claim_permission::PoolId, + pub permission: set_commission_claim_permission::Permission, + } + pub mod set_commission_claim_permission { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Permission = :: core :: option :: Option < runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionClaimPermission < :: subxt_core :: utils :: AccountId32 > > ; + } + impl ::subxt_core::blocks::StaticExtrinsic for SetCommissionClaimPermission { + const PALLET: &'static str = "Lst"; + const CALL: &'static str = "set_commission_claim_permission"; + } + } + pub struct TransactionApi; + impl TransactionApi { + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + pub fn join( + &self, + amount: types::join::Amount, + pool_id: types::join::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "join", + types::Join { amount, pool_id }, + [ + 9u8, 24u8, 209u8, 117u8, 242u8, 76u8, 192u8, 40u8, 196u8, 136u8, 158u8, + 182u8, 117u8, 140u8, 164u8, 64u8, 184u8, 160u8, 146u8, 143u8, 173u8, + 180u8, 6u8, 242u8, 203u8, 130u8, 41u8, 176u8, 158u8, 96u8, 94u8, 175u8, + ], + ) + } + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] + pub fn bond_extra( + &self, + pool_id: types::bond_extra::PoolId, + extra: types::bond_extra::Extra, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "bond_extra", + types::BondExtra { pool_id, extra }, + [ + 207u8, 223u8, 241u8, 142u8, 14u8, 243u8, 19u8, 200u8, 33u8, 143u8, + 71u8, 169u8, 109u8, 253u8, 165u8, 4u8, 122u8, 75u8, 223u8, 219u8, 97u8, + 115u8, 92u8, 219u8, 50u8, 219u8, 65u8, 236u8, 210u8, 74u8, 189u8, 23u8, + ], + ) + } + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + pub fn unbond( + &self, + member_account: types::unbond::MemberAccount, + pool_id: types::unbond::PoolId, + unbonding_points: types::unbond::UnbondingPoints, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "unbond", + types::Unbond { member_account, pool_id, unbonding_points }, + [ + 189u8, 203u8, 137u8, 121u8, 75u8, 69u8, 213u8, 105u8, 104u8, 118u8, + 109u8, 167u8, 88u8, 203u8, 168u8, 218u8, 229u8, 43u8, 69u8, 124u8, + 33u8, 139u8, 170u8, 102u8, 63u8, 150u8, 91u8, 103u8, 77u8, 50u8, 9u8, + 187u8, + ], + ) + } + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if there are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pub fn pool_withdraw_unbonded( + &self, + pool_id: types::pool_withdraw_unbonded::PoolId, + num_slashing_spans: types::pool_withdraw_unbonded::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "pool_withdraw_unbonded", + types::PoolWithdrawUnbonded { pool_id, num_slashing_spans }, + [ + 145u8, 39u8, 154u8, 109u8, 24u8, 233u8, 144u8, 66u8, 28u8, 252u8, + 180u8, 5u8, 54u8, 123u8, 28u8, 182u8, 26u8, 156u8, 69u8, 105u8, 226u8, + 208u8, 154u8, 34u8, 22u8, 201u8, 139u8, 104u8, 198u8, 195u8, 247u8, + 49u8, + ], + ) + } + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If the target is the depositor, the pool will be destroyed."] + pub fn withdraw_unbonded( + &self, + member_account: types::withdraw_unbonded::MemberAccount, + pool_id: types::withdraw_unbonded::PoolId, + num_slashing_spans: types::withdraw_unbonded::NumSlashingSpans, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "withdraw_unbonded", + types::WithdrawUnbonded { member_account, pool_id, num_slashing_spans }, + [ + 179u8, 221u8, 113u8, 60u8, 166u8, 26u8, 168u8, 219u8, 3u8, 250u8, + 196u8, 76u8, 24u8, 109u8, 8u8, 191u8, 202u8, 111u8, 119u8, 184u8, 26u8, + 96u8, 53u8, 104u8, 71u8, 115u8, 173u8, 91u8, 200u8, 213u8, 209u8, + 100u8, + ], + ) + } + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferable."] + pub fn create( + &self, + amount: types::create::Amount, + root: types::create::Root, + nominator: types::create::Nominator, + bouncer: types::create::Bouncer, + name: types::create::Name, + icon: types::create::Icon, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "create", + types::Create { amount, root, nominator, bouncer, name, icon }, + [ + 155u8, 214u8, 57u8, 30u8, 13u8, 44u8, 25u8, 59u8, 143u8, 30u8, 135u8, + 176u8, 8u8, 168u8, 194u8, 130u8, 114u8, 155u8, 3u8, 80u8, 29u8, 243u8, + 145u8, 226u8, 28u8, 177u8, 102u8, 158u8, 32u8, 82u8, 0u8, 169u8, + ], + ) + } + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + pub fn create_with_pool_id( + &self, + amount: types::create_with_pool_id::Amount, + root: types::create_with_pool_id::Root, + nominator: types::create_with_pool_id::Nominator, + bouncer: types::create_with_pool_id::Bouncer, + pool_id: types::create_with_pool_id::PoolId, + name: types::create_with_pool_id::Name, + icon: types::create_with_pool_id::Icon, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "create_with_pool_id", + types::CreateWithPoolId { + amount, + root, + nominator, + bouncer, + pool_id, + name, + icon, + }, + [ + 63u8, 171u8, 225u8, 224u8, 51u8, 116u8, 96u8, 130u8, 128u8, 42u8, + 112u8, 58u8, 55u8, 183u8, 1u8, 200u8, 111u8, 255u8, 214u8, 233u8, + 120u8, 69u8, 17u8, 68u8, 233u8, 0u8, 65u8, 164u8, 41u8, 218u8, 174u8, + 119u8, + ], + ) + } + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn nominate( + &self, + pool_id: types::nominate::PoolId, + validators: types::nominate::Validators, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "nominate", + types::Nominate { pool_id, validators }, + [ + 118u8, 80u8, 137u8, 47u8, 102u8, 9u8, 20u8, 136u8, 76u8, 164u8, 161u8, + 114u8, 33u8, 159u8, 204u8, 49u8, 233u8, 199u8, 246u8, 67u8, 144u8, + 169u8, 211u8, 67u8, 12u8, 68u8, 198u8, 149u8, 87u8, 62u8, 226u8, 72u8, + ], + ) + } + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + pub fn set_state( + &self, + pool_id: types::set_state::PoolId, + state: types::set_state::State, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_state", + types::SetState { pool_id, state }, + [ + 39u8, 221u8, 24u8, 65u8, 144u8, 230u8, 228u8, 24u8, 191u8, 53u8, 171u8, + 148u8, 131u8, 45u8, 10u8, 22u8, 222u8, 240u8, 13u8, 87u8, 123u8, 182u8, + 102u8, 26u8, 124u8, 205u8, 23u8, 31u8, 25u8, 43u8, 12u8, 140u8, + ], + ) + } + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] + pub fn set_metadata( + &self, + pool_id: types::set_metadata::PoolId, + metadata: types::set_metadata::Metadata, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_metadata", + types::SetMetadata { pool_id, metadata }, + [ + 221u8, 189u8, 15u8, 232u8, 0u8, 49u8, 187u8, 67u8, 124u8, 26u8, 114u8, + 191u8, 81u8, 14u8, 253u8, 75u8, 88u8, 182u8, 136u8, 18u8, 238u8, 119u8, + 215u8, 248u8, 133u8, 160u8, 154u8, 193u8, 177u8, 140u8, 1u8, 16u8, + ], + ) + } + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "Root."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] + pub fn set_configs( + &self, + min_join_bond: types::set_configs::MinJoinBond, + min_create_bond: types::set_configs::MinCreateBond, + max_pools: types::set_configs::MaxPools, + global_max_commission: types::set_configs::GlobalMaxCommission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_configs", + types::SetConfigs { + min_join_bond, + min_create_bond, + max_pools, + global_max_commission, + }, + [ + 162u8, 185u8, 108u8, 89u8, 8u8, 208u8, 236u8, 194u8, 219u8, 228u8, + 157u8, 105u8, 247u8, 228u8, 145u8, 127u8, 91u8, 0u8, 1u8, 92u8, 231u8, + 183u8, 162u8, 241u8, 247u8, 148u8, 44u8, 68u8, 22u8, 220u8, 189u8, + 81u8, + ], + ) + } + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + pub fn update_roles( + &self, + pool_id: types::update_roles::PoolId, + new_root: types::update_roles::NewRoot, + new_nominator: types::update_roles::NewNominator, + new_bouncer: types::update_roles::NewBouncer, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "update_roles", + types::UpdateRoles { pool_id, new_root, new_nominator, new_bouncer }, + [ + 48u8, 253u8, 39u8, 205u8, 196u8, 231u8, 254u8, 76u8, 238u8, 70u8, 2u8, + 192u8, 188u8, 240u8, 206u8, 91u8, 213u8, 98u8, 226u8, 51u8, 167u8, + 205u8, 120u8, 128u8, 40u8, 175u8, 238u8, 57u8, 147u8, 96u8, 116u8, + 133u8, + ], + ) + } + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + pub fn chill( + &self, + pool_id: types::chill::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "chill", + types::Chill { pool_id }, + [ + 65u8, 206u8, 54u8, 53u8, 37u8, 97u8, 161u8, 104u8, 62u8, 9u8, 93u8, + 236u8, 61u8, 185u8, 204u8, 245u8, 234u8, 218u8, 213u8, 40u8, 154u8, + 29u8, 244u8, 19u8, 207u8, 172u8, 142u8, 221u8, 38u8, 70u8, 39u8, 10u8, + ], + ) + } + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessAll` or `PermissionlessCompound`."] + pub fn bond_extra_other( + &self, + member: types::bond_extra_other::Member, + pool_id: types::bond_extra_other::PoolId, + extra: types::bond_extra_other::Extra, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "bond_extra_other", + types::BondExtraOther { member, pool_id, extra }, + [ + 209u8, 101u8, 203u8, 149u8, 91u8, 1u8, 60u8, 191u8, 154u8, 70u8, 66u8, + 221u8, 33u8, 38u8, 239u8, 209u8, 23u8, 80u8, 87u8, 226u8, 121u8, 15u8, + 242u8, 80u8, 69u8, 127u8, 116u8, 25u8, 157u8, 233u8, 22u8, 40u8, + ], + ) + } + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + pub fn set_commission( + &self, + pool_id: types::set_commission::PoolId, + new_commission: types::set_commission::NewCommission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_commission", + types::SetCommission { pool_id, new_commission }, + [ + 77u8, 139u8, 221u8, 210u8, 51u8, 57u8, 243u8, 96u8, 25u8, 0u8, 42u8, + 81u8, 80u8, 7u8, 145u8, 28u8, 17u8, 44u8, 123u8, 28u8, 130u8, 194u8, + 153u8, 139u8, 222u8, 166u8, 169u8, 184u8, 46u8, 178u8, 236u8, 246u8, + ], + ) + } + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + pub fn set_commission_max( + &self, + pool_id: types::set_commission_max::PoolId, + max_commission: types::set_commission_max::MaxCommission, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_commission_max", + types::SetCommissionMax { pool_id, max_commission }, + [ + 198u8, 127u8, 255u8, 230u8, 96u8, 142u8, 9u8, 220u8, 204u8, 82u8, + 192u8, 76u8, 140u8, 52u8, 94u8, 80u8, 153u8, 30u8, 162u8, 21u8, 71u8, + 31u8, 218u8, 160u8, 254u8, 180u8, 160u8, 219u8, 163u8, 30u8, 193u8, + 6u8, + ], + ) + } + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + pub fn set_commission_change_rate( + &self, + pool_id: types::set_commission_change_rate::PoolId, + change_rate: types::set_commission_change_rate::ChangeRate, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_commission_change_rate", + types::SetCommissionChangeRate { pool_id, change_rate }, + [ + 253u8, 128u8, 246u8, 46u8, 81u8, 204u8, 114u8, 21u8, 245u8, 99u8, 88u8, + 98u8, 194u8, 103u8, 85u8, 231u8, 181u8, 61u8, 146u8, 184u8, 225u8, + 175u8, 175u8, 99u8, 63u8, 141u8, 112u8, 218u8, 160u8, 226u8, 251u8, + 185u8, + ], + ) + } + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + pub fn claim_commission( + &self, + pool_id: types::claim_commission::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "claim_commission", + types::ClaimCommission { pool_id }, + [ + 51u8, 64u8, 163u8, 230u8, 2u8, 119u8, 68u8, 5u8, 154u8, 4u8, 84u8, + 149u8, 9u8, 195u8, 173u8, 37u8, 98u8, 48u8, 188u8, 65u8, 81u8, 11u8, + 64u8, 254u8, 126u8, 62u8, 29u8, 204u8, 92u8, 230u8, 240u8, 91u8, + ], + ) + } + #[doc = "Top up the deficit or withdraw the excess ED from the pool."] + #[doc = ""] + #[doc = "When a pool is created, the pool depositor transfers ED to the reward account of the"] + #[doc = "pool. ED is subject to change and over time, the deposit in the reward account may be"] + #[doc = "insufficient to cover the ED deficit of the pool or vice-versa where there is excess"] + #[doc = "deposit to the pool. This call allows anyone to adjust the ED deposit of the"] + #[doc = "pool by either topping up the deficit or claiming the excess."] + pub fn adjust_pool_deposit( + &self, + pool_id: types::adjust_pool_deposit::PoolId, + ) -> ::subxt_core::tx::payload::StaticPayload { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "adjust_pool_deposit", + types::AdjustPoolDeposit { pool_id }, + [ + 5u8, 203u8, 109u8, 141u8, 29u8, 58u8, 216u8, 21u8, 219u8, 139u8, 129u8, + 33u8, 49u8, 196u8, 255u8, 49u8, 79u8, 218u8, 24u8, 250u8, 254u8, 64u8, + 215u8, 33u8, 223u8, 205u8, 117u8, 209u8, 138u8, 115u8, 174u8, 181u8, + ], + ) + } + #[doc = "Set or remove a pool's commission claim permission."] + #[doc = ""] + #[doc = "Determines who can claim the pool's pending commission. Only the `Root` role of the pool"] + #[doc = "is able to conifigure commission claim permissions."] + pub fn set_commission_claim_permission( + &self, + pool_id: types::set_commission_claim_permission::PoolId, + permission: types::set_commission_claim_permission::Permission, + ) -> ::subxt_core::tx::payload::StaticPayload + { + ::subxt_core::tx::payload::StaticPayload::new_static( + "Lst", + "set_commission_claim_permission", + types::SetCommissionClaimPermission { pool_id, permission }, + [ + 2u8, 140u8, 135u8, 31u8, 180u8, 2u8, 245u8, 33u8, 34u8, 204u8, 192u8, + 30u8, 131u8, 4u8, 108u8, 194u8, 154u8, 65u8, 104u8, 252u8, 84u8, 58u8, + 10u8, 47u8, 238u8, 185u8, 91u8, 162u8, 190u8, 239u8, 74u8, 38u8, + ], + ) + } + } + } + #[doc = "Events of this pallet."] + pub type Event = runtime_types::pallet_tangle_lst::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool has been created."] + pub struct Created { + pub depositor: created::Depositor, + pub pool_id: created::PoolId, + } + pub mod created { + use super::runtime_types; + pub type Depositor = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Created { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "Created"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has became bonded in a pool."] + pub struct Bonded { + pub member: bonded::Member, + pub pool_id: bonded::PoolId, + pub bonded: bonded::Bonded, + pub joined: bonded::Joined, + } + pub mod bonded { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Bonded = ::core::primitive::u128; + pub type Joined = ::core::primitive::bool; + } + impl ::subxt_core::events::StaticEvent for Bonded { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "Bonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A payout has been made to a member."] + pub struct PaidOut { + pub member: paid_out::Member, + pub pool_id: paid_out::PoolId, + pub payout: paid_out::Payout, + } + pub mod paid_out { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Payout = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for PaidOut { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PaidOut"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + pub struct Unbonded { + pub member: unbonded::Member, + pub pool_id: unbonded::PoolId, + pub balance: unbonded::Balance, + pub points: unbonded::Points, + pub era: unbonded::Era, + } + pub mod unbonded { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + pub type Points = ::core::primitive::u128; + pub type Era = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Unbonded { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "Unbonded"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + pub struct Withdrawn { + pub member: withdrawn::Member, + pub pool_id: withdrawn::PoolId, + pub balance: withdrawn::Balance, + pub points: withdrawn::Points, + } + pub mod withdrawn { + use super::runtime_types; + pub type Member = ::subxt_core::utils::AccountId32; + pub type PoolId = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + pub type Points = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for Withdrawn { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "Withdrawn"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool has been destroyed."] + pub struct Destroyed { + pub pool_id: destroyed::PoolId, + } + pub mod destroyed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + } + impl ::subxt_core::events::StaticEvent for Destroyed { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "Destroyed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The state of a pool has changed"] + pub struct StateChanged { + pub pool_id: state_changed::PoolId, + pub new_state: state_changed::NewState, + } + pub mod state_changed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type NewState = runtime_types::pallet_tangle_lst::types::pools::PoolState; + } + impl ::subxt_core::events::StaticEvent for StateChanged { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "StateChanged"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + pub struct MemberRemoved { + pub pool_id: member_removed::PoolId, + pub member: member_removed::Member, + } + pub mod member_removed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Member = ::subxt_core::utils::AccountId32; + } + impl ::subxt_core::events::StaticEvent for MemberRemoved { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "MemberRemoved"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + pub struct RolesUpdated { + pub root: roles_updated::Root, + pub bouncer: roles_updated::Bouncer, + pub nominator: roles_updated::Nominator, + } + pub mod roles_updated { + use super::runtime_types; + pub type Root = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type Bouncer = ::core::option::Option<::subxt_core::utils::AccountId32>; + pub type Nominator = ::core::option::Option<::subxt_core::utils::AccountId32>; + } + impl ::subxt_core::events::StaticEvent for RolesUpdated { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "RolesUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + pub struct PoolSlashed { + pub pool_id: pool_slashed::PoolId, + pub balance: pool_slashed::Balance, + } + pub mod pool_slashed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for PoolSlashed { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PoolSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + pub struct UnbondingPoolSlashed { + pub pool_id: unbonding_pool_slashed::PoolId, + pub era: unbonding_pool_slashed::Era, + pub balance: unbonding_pool_slashed::Balance, + } + pub mod unbonding_pool_slashed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Era = ::core::primitive::u32; + pub type Balance = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for UnbondingPoolSlashed { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "UnbondingPoolSlashed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool's commission setting has been changed."] + pub struct PoolCommissionUpdated { + pub pool_id: pool_commission_updated::PoolId, + pub current: pool_commission_updated::Current, + } + pub mod pool_commission_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Current = ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionUpdated { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PoolCommissionUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool's maximum commission setting has been changed."] + pub struct PoolMaxCommissionUpdated { + pub pool_id: pool_max_commission_updated::PoolId, + pub max_commission: pool_max_commission_updated::MaxCommission, + } + pub mod pool_max_commission_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type MaxCommission = runtime_types::sp_arithmetic::per_things::Perbill; + } + impl ::subxt_core::events::StaticEvent for PoolMaxCommissionUpdated { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PoolMaxCommissionUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "A pool's commission `change_rate` has been changed."] + pub struct PoolCommissionChangeRateUpdated { + pub pool_id: pool_commission_change_rate_updated::PoolId, + pub change_rate: pool_commission_change_rate_updated::ChangeRate, + } + pub mod pool_commission_change_rate_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type ChangeRate = + runtime_types::pallet_tangle_lst::types::commission::CommissionChangeRate< + ::core::primitive::u64, + >; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionChangeRateUpdated { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PoolCommissionChangeRateUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pool commission claim permission has been updated."] + pub struct PoolCommissionClaimPermissionUpdated { + pub pool_id: pool_commission_claim_permission_updated::PoolId, + pub permission: pool_commission_claim_permission_updated::Permission, + } + pub mod pool_commission_claim_permission_updated { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Permission = ::core::option::Option< + runtime_types::pallet_tangle_lst::types::commission::CommissionClaimPermission< + ::subxt_core::utils::AccountId32, + >, + >; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionClaimPermissionUpdated { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PoolCommissionClaimPermissionUpdated"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Pool commission has been claimed."] + pub struct PoolCommissionClaimed { + pub pool_id: pool_commission_claimed::PoolId, + pub commission: pool_commission_claimed::Commission, + } + pub mod pool_commission_claimed { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Commission = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for PoolCommissionClaimed { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "PoolCommissionClaimed"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Topped up deficit in frozen ED of the reward pool."] + pub struct MinBalanceDeficitAdjusted { + pub pool_id: min_balance_deficit_adjusted::PoolId, + pub amount: min_balance_deficit_adjusted::Amount, + } + pub mod min_balance_deficit_adjusted { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for MinBalanceDeficitAdjusted { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "MinBalanceDeficitAdjusted"; + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Claimed excess frozen ED of af the reward pool."] + pub struct MinBalanceExcessAdjusted { + pub pool_id: min_balance_excess_adjusted::PoolId, + pub amount: min_balance_excess_adjusted::Amount, + } + pub mod min_balance_excess_adjusted { + use super::runtime_types; + pub type PoolId = ::core::primitive::u32; + pub type Amount = ::core::primitive::u128; + } + impl ::subxt_core::events::StaticEvent for MinBalanceExcessAdjusted { + const PALLET: &'static str = "Lst"; + const EVENT: &'static str = "MinBalanceExcessAdjusted"; + } + } + pub mod storage { + use super::runtime_types; + pub mod types { + use super::runtime_types; + pub mod total_value_locked { + use super::runtime_types; + pub type TotalValueLocked = ::core::primitive::u128; + } + pub mod min_join_bond { + use super::runtime_types; + pub type MinJoinBond = ::core::primitive::u128; + } + pub mod min_create_bond { + use super::runtime_types; + pub type MinCreateBond = ::core::primitive::u128; + } + pub mod max_pools { + use super::runtime_types; + pub type MaxPools = ::core::primitive::u32; + } + pub mod global_max_commission { + use super::runtime_types; + pub type GlobalMaxCommission = + runtime_types::sp_arithmetic::per_things::Perbill; + } + pub mod bonded_pools { + use super::runtime_types; + pub type BondedPools = + runtime_types::pallet_tangle_lst::types::bonded_pool::BondedPoolInner; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_bonded_pools { + use super::runtime_types; + pub type CounterForBondedPools = ::core::primitive::u32; + } + pub mod reward_pools { + use super::runtime_types; + pub type RewardPools = + runtime_types::pallet_tangle_lst::types::sub_pools::RewardPool; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_reward_pools { + use super::runtime_types; + pub type CounterForRewardPools = ::core::primitive::u32; + } + pub mod sub_pools_storage { + use super::runtime_types; + pub type SubPoolsStorage = + runtime_types::pallet_tangle_lst::types::sub_pools::SubPools; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_sub_pools_storage { + use super::runtime_types; + pub type CounterForSubPoolsStorage = ::core::primitive::u32; + } + pub mod metadata { + use super::runtime_types; + pub type Metadata = runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >; + pub type Param0 = ::core::primitive::u32; + } + pub mod counter_for_metadata { + use super::runtime_types; + pub type CounterForMetadata = ::core::primitive::u32; + } + pub mod last_pool_id { + use super::runtime_types; + pub type LastPoolId = ::core::primitive::u32; + } + pub mod unbonding_members { + use super::runtime_types; + pub type UnbondingMembers = + runtime_types::pallet_tangle_lst::types::pools::PoolMember; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_unbonding_members { + use super::runtime_types; + pub type CounterForUnbondingMembers = ::core::primitive::u32; + } + pub mod reverse_pool_id_lookup { + use super::runtime_types; + pub type ReversePoolIdLookup = ::core::primitive::u32; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + pub mod counter_for_reverse_pool_id_lookup { + use super::runtime_types; + pub type CounterForReversePoolIdLookup = ::core::primitive::u32; + } + pub mod claim_permissions { + use super::runtime_types; + pub type ClaimPermissions = + runtime_types::pallet_tangle_lst::types::ClaimPermission; + pub type Param0 = ::subxt_core::utils::AccountId32; + } + } + pub struct StorageApi; + impl StorageApi { + #[doc = " The sum of funds across all pools."] + #[doc = ""] + #[doc = " This might be lower but never higher than the sum of `total_balance` of all [`PoolMembers`]"] + #[doc = " because calling `pool_withdraw_unbonded` might decrease the total stake of the pool's"] + #[doc = " `bonded_account` without adjusting the pallet-internal `UnbondingPool`'s."] + pub fn total_value_locked( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::total_value_locked::TotalValueLocked, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "TotalValueLocked", + (), + [ + 141u8, 23u8, 101u8, 59u8, 165u8, 8u8, 41u8, 252u8, 239u8, 72u8, 142u8, + 19u8, 186u8, 29u8, 131u8, 8u8, 113u8, 64u8, 82u8, 158u8, 26u8, 87u8, + 142u8, 39u8, 80u8, 231u8, 46u8, 40u8, 71u8, 186u8, 35u8, 104u8, + ], + ) + } + #[doc = " Minimum amount to bond to join a pool."] + pub fn min_join_bond( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_join_bond::MinJoinBond, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "MinJoinBond", + (), + [ + 64u8, 180u8, 71u8, 185u8, 81u8, 46u8, 155u8, 26u8, 251u8, 84u8, 108u8, + 80u8, 128u8, 44u8, 163u8, 118u8, 107u8, 79u8, 250u8, 211u8, 194u8, + 71u8, 87u8, 16u8, 247u8, 9u8, 76u8, 95u8, 103u8, 227u8, 180u8, 231u8, + ], + ) + } + #[doc = " Minimum bond required to create a pool."] + #[doc = ""] + #[doc = " This is the amount that the depositor must put as their initial stake in the pool, as an"] + #[doc = " indication of \"skin in the game\"."] + #[doc = ""] + #[doc = " This is the value that will always exist in the staking ledger of the pool bonded account"] + #[doc = " while all other accounts leave."] + pub fn min_create_bond( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::min_create_bond::MinCreateBond, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "MinCreateBond", + (), + [ + 210u8, 67u8, 92u8, 230u8, 231u8, 105u8, 54u8, 249u8, 154u8, 192u8, + 29u8, 217u8, 233u8, 79u8, 170u8, 126u8, 133u8, 98u8, 253u8, 153u8, + 248u8, 189u8, 63u8, 107u8, 170u8, 224u8, 12u8, 42u8, 198u8, 185u8, + 85u8, 46u8, + ], + ) + } + #[doc = " Maximum number of nomination pools that can exist. If `None`, then an unbounded number of"] + #[doc = " pools can exist."] + pub fn max_pools( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::max_pools::MaxPools, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "MaxPools", + (), + [ + 230u8, 184u8, 242u8, 91u8, 118u8, 111u8, 90u8, 204u8, 136u8, 61u8, + 228u8, 50u8, 212u8, 40u8, 83u8, 49u8, 121u8, 161u8, 245u8, 80u8, 46u8, + 184u8, 105u8, 134u8, 249u8, 225u8, 39u8, 3u8, 123u8, 137u8, 156u8, + 240u8, + ], + ) + } + #[doc = " The maximum commission that can be charged by a pool. Used on commission payouts to bound"] + #[doc = " pool commissions that are > `GlobalMaxCommission`, necessary if a future"] + #[doc = " `GlobalMaxCommission` is lower than some current pool commissions."] + pub fn global_max_commission( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::global_max_commission::GlobalMaxCommission, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "GlobalMaxCommission", + (), + [ + 2u8, 112u8, 8u8, 116u8, 114u8, 97u8, 250u8, 106u8, 170u8, 215u8, 218u8, + 217u8, 80u8, 235u8, 149u8, 81u8, 85u8, 185u8, 201u8, 127u8, 107u8, + 251u8, 191u8, 231u8, 142u8, 74u8, 8u8, 70u8, 151u8, 238u8, 117u8, + 173u8, + ], + ) + } + #[doc = " Storage for bonded pools."] + pub fn bonded_pools_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::bonded_pools::BondedPools, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "BondedPools", + (), + [ + 74u8, 250u8, 235u8, 10u8, 153u8, 148u8, 26u8, 163u8, 198u8, 48u8, 57u8, + 147u8, 9u8, 101u8, 63u8, 185u8, 86u8, 216u8, 172u8, 144u8, 173u8, + 182u8, 7u8, 146u8, 15u8, 57u8, 198u8, 90u8, 218u8, 31u8, 203u8, 29u8, + ], + ) + } + #[doc = " Storage for bonded pools."] + pub fn bonded_pools( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::bonded_pools::BondedPools, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "BondedPools", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 74u8, 250u8, 235u8, 10u8, 153u8, 148u8, 26u8, 163u8, 198u8, 48u8, 57u8, + 147u8, 9u8, 101u8, 63u8, 185u8, 86u8, 216u8, 172u8, 144u8, 173u8, + 182u8, 7u8, 146u8, 15u8, 57u8, 198u8, 90u8, 218u8, 31u8, 203u8, 29u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_bonded_pools( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_bonded_pools::CounterForBondedPools, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "CounterForBondedPools", + (), + [ + 198u8, 6u8, 213u8, 92u8, 4u8, 114u8, 164u8, 244u8, 51u8, 55u8, 157u8, + 20u8, 224u8, 183u8, 40u8, 236u8, 115u8, 86u8, 171u8, 207u8, 31u8, + 111u8, 0u8, 210u8, 48u8, 198u8, 243u8, 153u8, 5u8, 216u8, 107u8, 113u8, + ], + ) + } + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout is"] + #[doc = " claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reward_pools::RewardPools, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "RewardPools", + (), + [ + 9u8, 12u8, 53u8, 236u8, 133u8, 154u8, 71u8, 150u8, 220u8, 31u8, 130u8, + 126u8, 208u8, 240u8, 214u8, 66u8, 16u8, 43u8, 202u8, 222u8, 94u8, + 136u8, 76u8, 60u8, 174u8, 197u8, 130u8, 138u8, 253u8, 239u8, 89u8, + 46u8, + ], + ) + } + #[doc = " Reward pools. This is where there rewards for each pool accumulate. When a members payout is"] + #[doc = " claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account."] + pub fn reward_pools( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::reward_pools::RewardPools, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "RewardPools", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 9u8, 12u8, 53u8, 236u8, 133u8, 154u8, 71u8, 150u8, 220u8, 31u8, 130u8, + 126u8, 208u8, 240u8, 214u8, 66u8, 16u8, 43u8, 202u8, 222u8, 94u8, + 136u8, 76u8, 60u8, 174u8, 197u8, 130u8, 138u8, 253u8, 239u8, 89u8, + 46u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reward_pools( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_reward_pools::CounterForRewardPools, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "CounterForRewardPools", + (), + [ + 218u8, 186u8, 28u8, 97u8, 205u8, 249u8, 187u8, 10u8, 127u8, 190u8, + 213u8, 152u8, 103u8, 20u8, 157u8, 183u8, 86u8, 104u8, 186u8, 236u8, + 84u8, 159u8, 117u8, 78u8, 5u8, 242u8, 193u8, 59u8, 112u8, 200u8, 34u8, + 166u8, + ], + ) + } + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a"] + #[doc = " bonded pool, hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::sub_pools_storage::SubPoolsStorage, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "SubPoolsStorage", + (), + [ + 43u8, 35u8, 94u8, 197u8, 201u8, 86u8, 21u8, 118u8, 230u8, 10u8, 66u8, + 180u8, 104u8, 146u8, 250u8, 207u8, 159u8, 153u8, 203u8, 58u8, 20u8, + 247u8, 102u8, 155u8, 47u8, 58u8, 136u8, 150u8, 167u8, 83u8, 81u8, 44u8, + ], + ) + } + #[doc = " Groups of unbonding pools. Each group of unbonding pools belongs to a"] + #[doc = " bonded pool, hence the name sub-pools. Keyed by the bonded pools account."] + pub fn sub_pools_storage( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::sub_pools_storage::Param0, + >, + types::sub_pools_storage::SubPoolsStorage, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "SubPoolsStorage", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 43u8, 35u8, 94u8, 197u8, 201u8, 86u8, 21u8, 118u8, 230u8, 10u8, 66u8, + 180u8, 104u8, 146u8, 250u8, 207u8, 159u8, 153u8, 203u8, 58u8, 20u8, + 247u8, 102u8, 155u8, 47u8, 58u8, 136u8, 150u8, 167u8, 83u8, 81u8, 44u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_sub_pools_storage( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_sub_pools_storage::CounterForSubPoolsStorage, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "CounterForSubPoolsStorage", + (), + [ + 137u8, 162u8, 32u8, 44u8, 163u8, 30u8, 54u8, 158u8, 169u8, 118u8, + 196u8, 101u8, 78u8, 28u8, 184u8, 78u8, 185u8, 225u8, 226u8, 207u8, + 14u8, 119u8, 0u8, 116u8, 140u8, 141u8, 116u8, 106u8, 71u8, 161u8, + 200u8, 228u8, + ], + ) + } + #[doc = " Metadata for the pool."] + pub fn metadata_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::metadata::Metadata, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "Metadata", + (), + [ + 10u8, 171u8, 251u8, 5u8, 72u8, 74u8, 86u8, 144u8, 59u8, 67u8, 92u8, + 111u8, 217u8, 111u8, 175u8, 107u8, 119u8, 206u8, 199u8, 78u8, 182u8, + 84u8, 12u8, 102u8, 10u8, 124u8, 103u8, 9u8, 86u8, 199u8, 233u8, 54u8, + ], + ) + } + #[doc = " Metadata for the pool."] + pub fn metadata( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey, + types::metadata::Metadata, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "Metadata", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 10u8, 171u8, 251u8, 5u8, 72u8, 74u8, 86u8, 144u8, 59u8, 67u8, 92u8, + 111u8, 217u8, 111u8, 175u8, 107u8, 119u8, 206u8, 199u8, 78u8, 182u8, + 84u8, 12u8, 102u8, 10u8, 124u8, 103u8, 9u8, 86u8, 199u8, 233u8, 54u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_metadata( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_metadata::CounterForMetadata, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "CounterForMetadata", + (), + [ + 49u8, 76u8, 175u8, 236u8, 99u8, 120u8, 156u8, 116u8, 153u8, 173u8, + 10u8, 102u8, 194u8, 139u8, 25u8, 149u8, 109u8, 195u8, 150u8, 21u8, + 43u8, 24u8, 196u8, 180u8, 231u8, 101u8, 69u8, 98u8, 82u8, 159u8, 183u8, + 174u8, + ], + ) + } + #[doc = " Ever increasing number of all pools created so far."] + pub fn last_pool_id( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::last_pool_id::LastPoolId, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "LastPoolId", + (), + [ + 178u8, 198u8, 245u8, 157u8, 176u8, 45u8, 214u8, 86u8, 73u8, 154u8, + 217u8, 39u8, 191u8, 53u8, 233u8, 145u8, 57u8, 100u8, 31u8, 13u8, 202u8, + 122u8, 115u8, 16u8, 205u8, 69u8, 157u8, 250u8, 216u8, 180u8, 113u8, + 30u8, + ], + ) + } + #[doc = " Unbonding members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn unbonding_members_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::unbonding_members::UnbondingMembers, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "UnbondingMembers", + (), + [ + 46u8, 91u8, 211u8, 29u8, 83u8, 17u8, 148u8, 26u8, 183u8, 226u8, 240u8, + 39u8, 186u8, 86u8, 198u8, 55u8, 43u8, 125u8, 83u8, 249u8, 203u8, 33u8, + 123u8, 108u8, 179u8, 237u8, 193u8, 63u8, 85u8, 230u8, 194u8, 173u8, + ], + ) + } + #[doc = " Unbonding members."] + #[doc = ""] + #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."] + pub fn unbonding_members( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::unbonding_members::Param0, + >, + types::unbonding_members::UnbondingMembers, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "UnbondingMembers", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 46u8, 91u8, 211u8, 29u8, 83u8, 17u8, 148u8, 26u8, 183u8, 226u8, 240u8, + 39u8, 186u8, 86u8, 198u8, 55u8, 43u8, 125u8, 83u8, 249u8, 203u8, 33u8, + 123u8, 108u8, 179u8, 237u8, 193u8, 63u8, 85u8, 230u8, 194u8, 173u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_unbonding_members( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_unbonding_members::CounterForUnbondingMembers, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "CounterForUnbondingMembers", + (), + [ + 35u8, 214u8, 51u8, 61u8, 101u8, 166u8, 164u8, 204u8, 50u8, 204u8, + 242u8, 138u8, 241u8, 35u8, 149u8, 204u8, 180u8, 250u8, 178u8, 148u8, + 199u8, 139u8, 206u8, 218u8, 200u8, 76u8, 130u8, 213u8, 186u8, 30u8, + 68u8, 79u8, + ], + ) + } + #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = ""] + #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] + #[doc = " accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::reverse_pool_id_lookup::ReversePoolIdLookup, + (), + (), + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "ReversePoolIdLookup", + (), + [ + 76u8, 76u8, 150u8, 33u8, 64u8, 81u8, 90u8, 75u8, 212u8, 221u8, 59u8, + 83u8, 178u8, 45u8, 86u8, 206u8, 196u8, 221u8, 117u8, 94u8, 229u8, + 160u8, 52u8, 54u8, 11u8, 64u8, 0u8, 103u8, 85u8, 86u8, 5u8, 71u8, + ], + ) + } + #[doc = " A reverse lookup from the pool's account id to its id."] + #[doc = ""] + #[doc = " This is only used for slashing. In all other instances, the pool id is used, and the"] + #[doc = " accounts are deterministically derived from it."] + pub fn reverse_pool_id_lookup( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::reverse_pool_id_lookup::Param0, + >, + types::reverse_pool_id_lookup::ReversePoolIdLookup, + ::subxt_core::utils::Yes, + (), + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "ReversePoolIdLookup", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 76u8, 76u8, 150u8, 33u8, 64u8, 81u8, 90u8, 75u8, 212u8, 221u8, 59u8, + 83u8, 178u8, 45u8, 86u8, 206u8, 196u8, 221u8, 117u8, 94u8, 229u8, + 160u8, 52u8, 54u8, 11u8, 64u8, 0u8, 103u8, 85u8, 86u8, 5u8, 71u8, + ], + ) + } + #[doc = "Counter for the related counted storage map"] + pub fn counter_for_reverse_pool_id_lookup( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::counter_for_reverse_pool_id_lookup::CounterForReversePoolIdLookup, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "CounterForReversePoolIdLookup", + (), + [ + 135u8, 72u8, 203u8, 197u8, 101u8, 135u8, 114u8, 202u8, 122u8, 231u8, + 128u8, 17u8, 81u8, 70u8, 22u8, 146u8, 100u8, 138u8, 16u8, 74u8, 31u8, + 250u8, 110u8, 184u8, 250u8, 75u8, 249u8, 71u8, 171u8, 77u8, 95u8, + 251u8, + ], + ) + } + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions_iter( + &self, + ) -> ::subxt_core::storage::address::StaticAddress< + (), + types::claim_permissions::ClaimPermissions, + (), + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "ClaimPermissions", + (), + [ + 98u8, 241u8, 185u8, 102u8, 61u8, 53u8, 215u8, 105u8, 2u8, 148u8, 197u8, + 17u8, 107u8, 253u8, 74u8, 159u8, 14u8, 30u8, 213u8, 38u8, 35u8, 163u8, + 249u8, 19u8, 140u8, 201u8, 182u8, 106u8, 0u8, 21u8, 102u8, 15u8, + ], + ) + } + #[doc = " Map from a pool member account to their opted claim permission."] + pub fn claim_permissions( + &self, + _0: impl ::core::borrow::Borrow, + ) -> ::subxt_core::storage::address::StaticAddress< + ::subxt_core::storage::address::StaticStorageKey< + types::claim_permissions::Param0, + >, + types::claim_permissions::ClaimPermissions, + ::subxt_core::utils::Yes, + ::subxt_core::utils::Yes, + (), + > { + ::subxt_core::storage::address::StaticAddress::new_static( + "Lst", + "ClaimPermissions", + ::subxt_core::storage::address::StaticStorageKey::new(_0.borrow()), + [ + 98u8, 241u8, 185u8, 102u8, 61u8, 53u8, 215u8, 105u8, 2u8, 148u8, 197u8, + 17u8, 107u8, 253u8, 74u8, 159u8, 14u8, 30u8, 213u8, 38u8, 35u8, 163u8, + 249u8, 19u8, 140u8, 201u8, 182u8, 106u8, 0u8, 21u8, 102u8, 15u8, + ], + ) + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + #[doc = " The nomination pool's pallet id."] + pub fn pallet_id( + &self, + ) -> ::subxt_core::constants::address::StaticAddress< + runtime_types::frame_support::PalletId, + > { + ::subxt_core::constants::address::StaticAddress::new_static( + "Lst", + "PalletId", + [ + 56u8, 243u8, 53u8, 83u8, 154u8, 179u8, 170u8, 80u8, 133u8, 173u8, 61u8, + 161u8, 47u8, 225u8, 146u8, 21u8, 50u8, 229u8, 248u8, 27u8, 104u8, 58u8, + 129u8, 197u8, 102u8, 160u8, 168u8, 205u8, 154u8, 42u8, 217u8, 53u8, + ], + ) + } + #[doc = " The maximum pool points-to-balance ratio that an `open` pool can have."] + #[doc = ""] + #[doc = " This is important in the event slashing takes place and the pool's points-to-balance"] + #[doc = " ratio becomes disproportional."] + #[doc = ""] + #[doc = " Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations"] + #[doc = " are a function of number of points, and by setting this value to e.g. 10, you ensure"] + #[doc = " that the total number of points in the system are at most 10 times the total_issuance of"] + #[doc = " the chain, in the absolute worse case."] + #[doc = ""] + #[doc = " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1."] + #[doc = " Such a scenario would also be the equivalent of the pool being 90% slashed."] + pub fn max_points_to_balance( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u8> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Lst", + "MaxPointsToBalance", + [ + 141u8, 130u8, 11u8, 35u8, 226u8, 114u8, 92u8, 179u8, 168u8, 110u8, + 28u8, 91u8, 221u8, 64u8, 4u8, 148u8, 201u8, 193u8, 185u8, 66u8, 226u8, + 114u8, 97u8, 79u8, 62u8, 212u8, 202u8, 114u8, 237u8, 228u8, 183u8, + 165u8, + ], + ) + } + #[doc = " The maximum number of simultaneous unbonding chunks that can exist per member."] + pub fn max_unbonding( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Lst", + "MaxUnbonding", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum length of a pool name."] + pub fn max_name_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Lst", + "MaxNameLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + #[doc = " The maximum length of a pool icon."] + pub fn max_icon_length( + &self, + ) -> ::subxt_core::constants::address::StaticAddress<::core::primitive::u32> { + ::subxt_core::constants::address::StaticAddress::new_static( + "Lst", + "MaxIconLength", + [ + 98u8, 252u8, 116u8, 72u8, 26u8, 180u8, 225u8, 83u8, 200u8, 157u8, + 125u8, 151u8, 53u8, 76u8, 168u8, 26u8, 10u8, 9u8, 98u8, 68u8, 9u8, + 178u8, 197u8, 113u8, 31u8, 79u8, 200u8, 90u8, 203u8, 100u8, 41u8, + 145u8, + ], + ) + } + } + } + } + pub mod runtime_types { + use super::runtime_types; + pub mod bounded_collections { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BoundedBTreeMap<_0, _1>(pub ::subxt_core::utils::KeyedVec<_0, _1>); + } + pub mod bounded_btree_set { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BoundedBTreeSet<_0>(pub ::subxt_core::alloc::vec::Vec<_0>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BoundedVec<_0>(pub ::subxt_core::alloc::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct WeakBoundedVec<_0>(pub ::subxt_core::alloc::vec::Vec<_0>); + } + } + pub mod ethbloom { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Bloom(pub [::core::primitive::u8; 256usize]); + } + pub mod ethereum { + use super::runtime_types; + pub mod block { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Block<_0> { + pub header: runtime_types::ethereum::header::Header, + pub transactions: ::subxt_core::alloc::vec::Vec<_0>, + pub ommers: + ::subxt_core::alloc::vec::Vec, + } + } + pub mod header { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Header { + pub parent_hash: ::subxt_core::utils::H256, + pub ommers_hash: ::subxt_core::utils::H256, + pub beneficiary: ::subxt_core::utils::H160, + pub state_root: ::subxt_core::utils::H256, + pub transactions_root: ::subxt_core::utils::H256, + pub receipts_root: ::subxt_core::utils::H256, + pub logs_bloom: runtime_types::ethbloom::Bloom, + pub difficulty: runtime_types::primitive_types::U256, + pub number: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub gas_used: runtime_types::primitive_types::U256, + pub timestamp: ::core::primitive::u64, + pub extra_data: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + pub mix_hash: ::subxt_core::utils::H256, + pub nonce: runtime_types::ethereum_types::hash::H64, + } + } + pub mod log { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Log { + pub address: ::subxt_core::utils::H160, + pub topics: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + pub data: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + } + } + pub mod receipt { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EIP658ReceiptData { + pub status_code: ::core::primitive::u8, + pub used_gas: runtime_types::primitive_types::U256, + pub logs_bloom: runtime_types::ethbloom::Bloom, + pub logs: ::subxt_core::alloc::vec::Vec, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ReceiptV3 { + #[codec(index = 0)] + Legacy(runtime_types::ethereum::receipt::EIP658ReceiptData), + #[codec(index = 1)] + EIP2930(runtime_types::ethereum::receipt::EIP658ReceiptData), + #[codec(index = 2)] + EIP1559(runtime_types::ethereum::receipt::EIP658ReceiptData), + } + } + pub mod transaction { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AccessListItem { + pub address: ::subxt_core::utils::H160, + pub storage_keys: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EIP1559Transaction { + pub chain_id: ::core::primitive::u64, + pub nonce: runtime_types::primitive_types::U256, + pub max_priority_fee_per_gas: runtime_types::primitive_types::U256, + pub max_fee_per_gas: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub action: runtime_types::ethereum::transaction::TransactionAction, + pub value: runtime_types::primitive_types::U256, + pub input: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + pub access_list: ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::transaction::AccessListItem, + >, + pub odd_y_parity: ::core::primitive::bool, + pub r: ::subxt_core::utils::H256, + pub s: ::subxt_core::utils::H256, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EIP2930Transaction { + pub chain_id: ::core::primitive::u64, + pub nonce: runtime_types::primitive_types::U256, + pub gas_price: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub action: runtime_types::ethereum::transaction::TransactionAction, + pub value: runtime_types::primitive_types::U256, + pub input: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + pub access_list: ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::transaction::AccessListItem, + >, + pub odd_y_parity: ::core::primitive::bool, + pub r: ::subxt_core::utils::H256, + pub s: ::subxt_core::utils::H256, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct LegacyTransaction { + pub nonce: runtime_types::primitive_types::U256, + pub gas_price: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub action: runtime_types::ethereum::transaction::TransactionAction, + pub value: runtime_types::primitive_types::U256, + pub input: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + pub signature: runtime_types::ethereum::transaction::TransactionSignature, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TransactionAction { + #[codec(index = 0)] + Call(::subxt_core::utils::H160), + #[codec(index = 1)] + Create, + } + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TransactionRecoveryId(pub ::core::primitive::u64); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TransactionSignature { + pub v: runtime_types::ethereum::transaction::TransactionRecoveryId, + pub r: ::subxt_core::utils::H256, + pub s: ::subxt_core::utils::H256, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TransactionV2 { + #[codec(index = 0)] + Legacy(runtime_types::ethereum::transaction::LegacyTransaction), + #[codec(index = 1)] + EIP2930(runtime_types::ethereum::transaction::EIP2930Transaction), + #[codec(index = 2)] + EIP1559(runtime_types::ethereum::transaction::EIP1559Transaction), + } + } + } + pub mod ethereum_types { + use super::runtime_types; + pub mod hash { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct H64(pub [::core::primitive::u8; 8usize]); + } + } + pub mod evm { + use super::runtime_types; + pub mod backend { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Basic { + pub balance: runtime_types::primitive_types::U256, + pub nonce: runtime_types::primitive_types::U256, + } + } + } + pub mod evm_core { + use super::runtime_types; + pub mod error { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExitError { + #[codec(index = 0)] + StackUnderflow, + #[codec(index = 1)] + StackOverflow, + #[codec(index = 2)] + InvalidJump, + #[codec(index = 3)] + InvalidRange, + #[codec(index = 4)] + DesignatedInvalid, + #[codec(index = 5)] + CallTooDeep, + #[codec(index = 6)] + CreateCollision, + #[codec(index = 7)] + CreateContractLimit, + #[codec(index = 15)] + InvalidCode(runtime_types::evm_core::opcode::Opcode), + #[codec(index = 8)] + OutOfOffset, + #[codec(index = 9)] + OutOfGas, + #[codec(index = 10)] + OutOfFund, + #[codec(index = 11)] + PCUnderflow, + #[codec(index = 12)] + CreateEmpty, + #[codec(index = 13)] + Other(::subxt_core::alloc::string::String), + #[codec(index = 14)] + MaxNonce, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExitFatal { + #[codec(index = 0)] + NotSupported, + #[codec(index = 1)] + UnhandledInterrupt, + #[codec(index = 2)] + CallErrorAsFatal(runtime_types::evm_core::error::ExitError), + #[codec(index = 3)] + Other(::subxt_core::alloc::string::String), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExitReason { + #[codec(index = 0)] + Succeed(runtime_types::evm_core::error::ExitSucceed), + #[codec(index = 1)] + Error(runtime_types::evm_core::error::ExitError), + #[codec(index = 2)] + Revert(runtime_types::evm_core::error::ExitRevert), + #[codec(index = 3)] + Fatal(runtime_types::evm_core::error::ExitFatal), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExitRevert { + #[codec(index = 0)] + Reverted, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExitSucceed { + #[codec(index = 0)] + Stopped, + #[codec(index = 1)] + Returned, + #[codec(index = 2)] + Suicided, + } + } + pub mod opcode { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Opcode(pub ::core::primitive::u8); + } + } + pub mod finality_grandpa { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Equivocation<_0, _1, _2> { + pub round_number: ::core::primitive::u64, + pub identity: _0, + pub first: (_1, _2), + pub second: (_1, _2), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + } + pub mod fp_evm { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ExecutionInfoV2<_0> { + pub exit_reason: runtime_types::evm_core::error::ExitReason, + pub value: _0, + pub used_gas: runtime_types::fp_evm::UsedGas, + pub weight_info: ::core::option::Option, + pub logs: ::subxt_core::alloc::vec::Vec, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UsedGas { + pub standard: runtime_types::primitive_types::U256, + pub effective: runtime_types::primitive_types::U256, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct WeightInfo { + pub ref_time_limit: ::core::option::Option<::core::primitive::u64>, + pub proof_size_limit: ::core::option::Option<::core::primitive::u64>, + pub ref_time_usage: ::core::option::Option<::core::primitive::u64>, + pub proof_size_usage: ::core::option::Option<::core::primitive::u64>, + } + } + pub mod fp_rpc { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TransactionStatus { + pub transaction_hash: ::subxt_core::utils::H256, + pub transaction_index: ::core::primitive::u32, + pub from: ::subxt_core::utils::H160, + pub to: ::core::option::Option<::subxt_core::utils::H160>, + pub contract_address: ::core::option::Option<::subxt_core::utils::H160>, + pub logs: ::subxt_core::alloc::vec::Vec, + pub logs_bloom: runtime_types::ethbloom::Bloom, + } + } + pub mod fp_self_contained { + use super::runtime_types; + pub mod unchecked_extrinsic { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + pub ::subxt_core::utils::UncheckedExtrinsic<_0, _1, _2, _3>, + ); + } + } + pub mod frame_metadata_hash_extension { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckMetadataHash { + pub mode: runtime_types::frame_metadata_hash_extension::Mode, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Mode { + #[codec(index = 0)] + Disabled, + #[codec(index = 1)] + Enabled, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod dispatch { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct DispatchInfo { + pub weight: runtime_types::sp_weights::weight_v2::Weight, + pub class: runtime_types::frame_support::dispatch::DispatchClass, + pub pays_fee: runtime_types::frame_support::dispatch::Pays, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } + pub mod traits { + use super::runtime_types; + pub mod preimages { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Bounded<_0, _1> { + #[codec(index = 0)] + Legacy { + hash: ::subxt_core::utils::H256, + }, + #[codec(index = 1)] + Inline( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Lookup { + hash: ::subxt_core::utils::H256, + len: ::core::primitive::u32, + }, + __Ignore(::core::marker::PhantomData<(_0, _1)>), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct IdAmount<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); + } + pub mod frame_system { + use super::runtime_types; + pub mod extensions { + use super::runtime_types; + pub mod check_genesis { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckGenesis; + } + pub mod check_mortality { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); + } + pub mod check_non_zero_sender { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckNonZeroSender; + } + pub mod check_nonce { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckSpecVersion; + } + pub mod check_tx_version { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckWeight; + } + } + pub mod limits { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BlockLength { + pub max: runtime_types::frame_support::dispatch::PerDispatchClass< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BlockWeights { + pub base_block: runtime_types::sp_weights::weight_v2::Weight, + pub max_block: runtime_types::sp_weights::weight_v2::Weight, + pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct WeightsPerClass { + pub base_extrinsic: runtime_types::sp_weights::weight_v2::Weight, + pub max_extrinsic: + ::core::option::Option, + pub max_total: + ::core::option::Option, + pub reserved: + ::core::option::Option, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Make some on-chain remark."] + #[doc = ""] + #[doc = "Can be executed by every `origin`."] + remark { remark: ::subxt_core::alloc::vec::Vec<::core::primitive::u8> }, + #[codec(index = 1)] + #[doc = "Set the number of pages in the WebAssembly environment's heap."] + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 2)] + #[doc = "Set the new runtime code."] + set_code { code: ::subxt_core::alloc::vec::Vec<::core::primitive::u8> }, + #[codec(index = 3)] + #[doc = "Set the new runtime code without doing any checks of the given `code`."] + #[doc = ""] + #[doc = "Note that runtime upgrades will not run if this is called with a not-increasing spec"] + #[doc = "version!"] + set_code_without_checks { + code: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + #[doc = "Set some items of storage."] + set_storage { + items: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 5)] + #[doc = "Kill some items from storage."] + kill_storage { + keys: ::subxt_core::alloc::vec::Vec< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + }, + #[codec(index = 6)] + #[doc = "Kill all storage items with a key that starts with the given prefix."] + #[doc = ""] + #[doc = "**NOTE:** We rely on the Root origin to provide us the number of subkeys under"] + #[doc = "the prefix we are removing to accurately calculate the weight of this function."] + kill_prefix { + prefix: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 7)] + #[doc = "Make some on-chain remark and emit event."] + remark_with_event { + remark: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 9)] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "This call requires Root origin."] + authorize_upgrade { code_hash: ::subxt_core::utils::H256 }, + #[codec(index = 10)] + #[doc = "Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied"] + #[doc = "later."] + #[doc = ""] + #[doc = "WARNING: This authorizes an upgrade that will take place without any safety checks, for"] + #[doc = "example that the spec name remains the same and that the version number increases. Not"] + #[doc = "recommended for normal use. Use `authorize_upgrade` instead."] + #[doc = ""] + #[doc = "This call requires Root origin."] + authorize_upgrade_without_checks { code_hash: ::subxt_core::utils::H256 }, + #[codec(index = 11)] + #[doc = "Provide the preimage (runtime binary) `code` for an upgrade that has been authorized."] + #[doc = ""] + #[doc = "If the authorization required a version check, this call will ensure the spec name"] + #[doc = "remains unchanged and that the spec version has increased."] + #[doc = ""] + #[doc = "Depending on the runtime's `OnSetCode` configuration, this function may directly apply"] + #[doc = "the new `code` in the same block or attempt to schedule the upgrade."] + #[doc = ""] + #[doc = "All origins are allowed."] + apply_authorized_upgrade { + code: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Error for the System pallet"] + pub enum Error { + #[codec(index = 0)] + #[doc = "The name of specification does not match between the current runtime"] + #[doc = "and the new runtime."] + InvalidSpecName, + #[codec(index = 1)] + #[doc = "The specification version is not allowed to decrease between the current runtime"] + #[doc = "and the new runtime."] + SpecVersionNeedsToIncrease, + #[codec(index = 2)] + #[doc = "Failed to extract the runtime version from the new runtime."] + #[doc = ""] + #[doc = "Either calling `Core_version` or decoding `RuntimeVersion` failed."] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + #[doc = "Suicide called when the account has non-default composite data."] + NonDefaultComposite, + #[codec(index = 4)] + #[doc = "There is a non-zero reference count preventing the account from being purged."] + NonZeroRefCount, + #[codec(index = 5)] + #[doc = "The origin filter prevent the call to be dispatched."] + CallFiltered, + #[codec(index = 6)] + #[doc = "A multi-block migration is ongoing and prevents the current code from being replaced."] + MultiBlockMigrationsOngoing, + #[codec(index = 7)] + #[doc = "No upgrade authorized."] + NothingAuthorized, + #[codec(index = 8)] + #[doc = "The submitted code is not authorized."] + Unauthorized, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Event for the System pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "An extrinsic completed successfully."] + ExtrinsicSuccess { + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 1)] + #[doc = "An extrinsic failed."] + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 2)] + #[doc = "`:code` was updated."] + CodeUpdated, + #[codec(index = 3)] + #[doc = "A new account was created."] + NewAccount { account: ::subxt_core::utils::AccountId32 }, + #[codec(index = 4)] + #[doc = "An account was reaped."] + KilledAccount { account: ::subxt_core::utils::AccountId32 }, + #[codec(index = 5)] + #[doc = "On on-chain remark happened."] + Remarked { + sender: ::subxt_core::utils::AccountId32, + hash: ::subxt_core::utils::H256, + }, + #[codec(index = 6)] + #[doc = "An upgrade was authorized."] + UpgradeAuthorized { + code_hash: ::subxt_core::utils::H256, + check_version: ::core::primitive::bool, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: ::core::primitive::u32, + pub providers: ::core::primitive::u32, + pub sufficients: ::core::primitive::u32, + pub data: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CodeUpgradeAuthorization { + pub code_hash: ::subxt_core::utils::H256, + pub check_version: ::core::primitive::bool, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::subxt_core::alloc::vec::Vec<_1>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::subxt_core::alloc::string::String, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } + } + pub mod pallet_airdrop_claims { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Make a claim to collect your tokens."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to claim is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] + #[doc = ""] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)"] + #[doc = ""] + #[doc = "and `address` matches the `dest` account."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message matching the format"] + #[doc = " described above."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + claim { + dest: ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >, + signer: ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >, + signature: + runtime_types::pallet_airdrop_claims::utils::MultiAddressSignature, + }, + #[codec(index = 1)] + #[doc = "Mint a new claim to collect native tokens."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `who`: The Ethereum address allowed to collect this claim."] + #[doc = "- `value`: The number of native tokens that will be claimed."] + #[doc = "- `vesting_schedule`: An optional vesting schedule for these native tokens."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "We assume worst case that both vesting and statement is being inserted."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + mint_claim { + who: runtime_types::pallet_airdrop_claims::utils::MultiAddress, + value: ::core::primitive::u128, + vesting_schedule: ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u128, + ::core::primitive::u128, + ::core::primitive::u64, + )>, + >, + statement: ::core::option::Option< + runtime_types::pallet_airdrop_claims::StatementKind, + >, + }, + #[codec(index = 2)] + #[doc = "Make a claim to collect your native tokens by signing a statement."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "Unsigned Validation:"] + #[doc = "A call to `claim_attest` is deemed valid if the signature provided matches"] + #[doc = "the expected signed message of:"] + #[doc = ""] + #[doc = "> Ethereum Signed Message:"] + #[doc = "> (configured prefix string)(address)(statement)"] + #[doc = ""] + #[doc = "and `address` matches the `dest` account; the `statement` must match that which is"] + #[doc = "expected according to your purchase arrangement."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `dest`: The destination account to payout the claim."] + #[doc = "- `ethereum_signature`: The signature of an ethereum signed message matching the format"] + #[doc = " described above."] + #[doc = "- `statement`: The identity of the statement which is being attested to in the"] + #[doc = " signature."] + #[doc = ""] + #[doc = ""] + #[doc = "The weight of this call is invariant over the input parameters."] + #[doc = "Weight includes logic to validate unsigned `claim_attest` call."] + #[doc = ""] + #[doc = "Total Complexity: O(1)"] + #[doc = ""] + claim_attest { + dest: ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >, + signer: ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >, + signature: + runtime_types::pallet_airdrop_claims::utils::MultiAddressSignature, + statement: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + move_claim { + old: runtime_types::pallet_airdrop_claims::utils::MultiAddress, + new: runtime_types::pallet_airdrop_claims::utils::MultiAddress, + }, + #[codec(index = 5)] + #[doc = "Set the value for expiryconfig"] + #[doc = "Can only be called by ForceOrigin"] + force_set_expiry_config { + expiry_block: ::core::primitive::u64, + dest: runtime_types::pallet_airdrop_claims::utils::MultiAddress, + }, + #[codec(index = 6)] + #[doc = "Claim from signed origin"] + claim_signed { + dest: ::core::option::Option< + runtime_types::pallet_airdrop_claims::utils::MultiAddress, + >, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Invalid Ethereum signature."] + InvalidEthereumSignature, + #[codec(index = 1)] + #[doc = "Invalid Native (sr25519) signature"] + InvalidNativeSignature, + #[codec(index = 2)] + #[doc = "Invalid Native account decoding"] + InvalidNativeAccount, + #[codec(index = 3)] + #[doc = "Ethereum address has no claim."] + SignerHasNoClaim, + #[codec(index = 4)] + #[doc = "Account ID sending transaction has no claim."] + SenderHasNoClaim, + #[codec(index = 5)] + #[doc = "There's not enough in the pot to pay out some unvested amount. Generally implies a"] + #[doc = "logic error."] + PotUnderflow, + #[codec(index = 6)] + #[doc = "A needed statement was not included."] + InvalidStatement, + #[codec(index = 7)] + #[doc = "The account already has a vested balance."] + VestedBalanceExists, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Someone claimed some native tokens."] + Claimed { + recipient: ::subxt_core::utils::AccountId32, + source: runtime_types::pallet_airdrop_claims::utils::MultiAddress, + amount: ::core::primitive::u128, + }, + } + } + pub mod utils { + use super::runtime_types; + pub mod ethereum_address { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EthereumAddress(pub [::core::primitive::u8; 20usize]); + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum MultiAddress { + # [codec (index = 0)] EVM (runtime_types :: pallet_airdrop_claims :: utils :: ethereum_address :: EthereumAddress ,) , # [codec (index = 1)] Native (:: subxt_core :: utils :: AccountId32 ,) , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum MultiAddressSignature { + # [codec (index = 0)] EVM (runtime_types :: pallet_airdrop_claims :: utils :: ethereum_address :: EcdsaSignature ,) , # [codec (index = 1)] Native (runtime_types :: pallet_airdrop_claims :: utils :: Sr25519Signature ,) , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Sr25519Signature(pub [::core::primitive::u8; 64usize]); + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum StatementKind { + #[codec(index = 0)] + Regular, + #[codec(index = 1)] + Safe, + } + } + pub mod pallet_assets { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Issue a new class of fungible assets from a public origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially and its owner is the origin."] + #[doc = ""] + #[doc = "The origin must conform to the configured `CreateOrigin` and have sufficient funds free."] + #[doc = ""] + #[doc = "Funds of sender are reserved by `AssetDeposit`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] + #[doc = "- `admin`: The admin of this class of assets. The admin is the initial address of each"] + #[doc = "member of the asset class's admin team."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `Created` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + create { + #[codec(compact)] + id: ::core::primitive::u128, + admin: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + min_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Issue a new class of fungible assets from a privileged origin."] + #[doc = ""] + #[doc = "This new asset class has no assets initially."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin`."] + #[doc = ""] + #[doc = "Unlike `create`, no funds are reserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the new asset. This must not be currently in use to identify"] + #[doc = "an existing asset. If [`NextAssetId`] is set, then this must be equal to it."] + #[doc = "- `owner`: The owner of this class of assets. The owner has full superuser permissions"] + #[doc = "over this asset, but may later change and configure the permissions using"] + #[doc = "`transfer_ownership` and `set_team`."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = ""] + #[doc = "Emits `ForceCreated` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_create { + #[codec(compact)] + id: ::core::primitive::u128, + owner: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + is_sufficient: ::core::primitive::bool, + #[codec(compact)] + min_balance: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Start the process of destroying a fungible asset class."] + #[doc = ""] + #[doc = "`start_destroy` is the first in a series of extrinsics that should be called, to allow"] + #[doc = "destruction of an asset class."] + #[doc = ""] + #[doc = "The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "The asset class must be frozen before calling `start_destroy`."] + start_destroy { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Destroy all accounts associated with a given asset."] + #[doc = ""] + #[doc = "`destroy_accounts` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedAccounts` event."] + destroy_accounts { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit)."] + #[doc = ""] + #[doc = "`destroy_approvals` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state."] + #[doc = ""] + #[doc = "Due to weight restrictions, this function may need to be called multiple times to fully"] + #[doc = "destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each call emits the `Event::DestroyedApprovals` event."] + destroy_approvals { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "Complete destroying asset and unreserve currency."] + #[doc = ""] + #[doc = "`finish_destroy` should only be called after `start_destroy` has been called, and the"] + #[doc = "asset is in a `Destroying` state. All accounts or approvals should be destroyed before"] + #[doc = "hand."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be destroyed. This must identify an existing"] + #[doc = " asset."] + #[doc = ""] + #[doc = "Each successful call emits the `Event::Destroyed` event."] + finish_destroy { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "Mint assets of a particular class."] + #[doc = ""] + #[doc = "The origin must be Signed and the sender must be the Issuer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount minted."] + #[doc = "- `beneficiary`: The account to be credited with the minted assets."] + #[doc = "- `amount`: The amount of the asset to be minted."] + #[doc = ""] + #[doc = "Emits `Issued` event when successful."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`."] + mint { + #[codec(compact)] + id: ::core::primitive::u128, + beneficiary: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "Reduce the balance of `who` by as much as possible up to `amount` assets of `id`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Manager of the asset `id`."] + #[doc = ""] + #[doc = "Bails with `NoAccount` if the `who` is already dead."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount burned."] + #[doc = "- `who`: The account to be debited from."] + #[doc = "- `amount`: The maximum amount by which `who`'s balance should be reduced."] + #[doc = ""] + #[doc = "Emits `Burned` with the actual amount burned. If this takes the balance to below the"] + #[doc = "minimum for the asset, then the amount burned is increased to take it to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Post-existence of `who`; Pre & post Zombie-status of `who`."] + burn { + #[codec(compact)] + id: ::core::primitive::u128, + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "Move some assets from the sender account to another."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + transfer { + #[codec(compact)] + id: ::core::primitive::u128, + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "Move some assets from the sender account to another, keeping the sender account alive."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `target`: The account to be credited."] + #[doc = "- `amount`: The amount by which the sender's balance of assets should be reduced and"] + #[doc = "`target`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the sender balance above zero but below"] + #[doc = "the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of"] + #[doc = "`target`."] + transfer_keep_alive { + #[codec(compact)] + id: ::core::primitive::u128, + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "Move some assets from one account to another."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to have some amount transferred."] + #[doc = "- `source`: The account to be debited."] + #[doc = "- `dest`: The account to be credited."] + #[doc = "- `amount`: The amount by which the `source`'s balance of assets should be reduced and"] + #[doc = "`dest`'s balance increased. The amount actually transferred may be slightly greater in"] + #[doc = "the case that the transfer would otherwise take the `source` balance above zero but"] + #[doc = "below the minimum balance. Must be greater than zero."] + #[doc = ""] + #[doc = "Emits `Transferred` with the actual amount transferred. If this takes the source balance"] + #[doc = "to below the minimum for the asset, then the amount transferred is increased to take it"] + #[doc = "to zero."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + #[doc = "Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of"] + #[doc = "`dest`."] + force_transfer { + #[codec(compact)] + id: ::core::primitive::u128, + source: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + dest: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "Disallow further unprivileged transfers of an asset `id` from an account `who`. `who`"] + #[doc = "must already exist as an entry in `Account`s of the asset. If you want to freeze an"] + #[doc = "account that does not have an entry, use `touch_other` first."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + freeze { + #[codec(compact)] + id: ::core::primitive::u128, + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 12)] + #[doc = "Allow unprivileged transfers to and from an account again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `who`: The account to be unfrozen."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + thaw { + #[codec(compact)] + id: ::core::primitive::u128, + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 13)] + #[doc = "Disallow further unprivileged transfers for the asset class."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = ""] + #[doc = "Emits `Frozen`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + freeze_asset { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 14)] + #[doc = "Allow unprivileged transfers for the asset again."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Admin of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be thawed."] + #[doc = ""] + #[doc = "Emits `Thawed`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + thaw_asset { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 15)] + #[doc = "Change the Owner of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = ""] + #[doc = "Emits `OwnerChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + transfer_ownership { + #[codec(compact)] + id: ::core::primitive::u128, + owner: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 16)] + #[doc = "Change the Issuer, Admin and Freezer of an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to be frozen."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = ""] + #[doc = "Emits `TeamChanged`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_team { + #[codec(compact)] + id: ::core::primitive::u128, + issuer: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 17)] + #[doc = "Set the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Funds of sender are reserved according to the formula:"] + #[doc = "`MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into"] + #[doc = "account any already reserved funds."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + set_metadata { + #[codec(compact)] + id: ::core::primitive::u128, + name: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + symbol: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + }, + #[codec(index = 18)] + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Owner of the asset `id`."] + #[doc = ""] + #[doc = "Any deposit is freed for the asset owner."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + clear_metadata { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 19)] + #[doc = "Force the metadata for an asset to some value."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is left alone."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to update."] + #[doc = "- `name`: The user friendly name of this asset. Limited in length by `StringLimit`."] + #[doc = "- `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`."] + #[doc = "- `decimals`: The number of decimals this asset uses to represent one unit."] + #[doc = ""] + #[doc = "Emits `MetadataSet`."] + #[doc = ""] + #[doc = "Weight: `O(N + S)` where N and S are the length of the name and symbol respectively."] + force_set_metadata { + #[codec(compact)] + id: ::core::primitive::u128, + name: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + symbol: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 20)] + #[doc = "Clear the metadata for an asset."] + #[doc = ""] + #[doc = "Origin must be ForceOrigin."] + #[doc = ""] + #[doc = "Any deposit is returned."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset to clear."] + #[doc = ""] + #[doc = "Emits `MetadataCleared`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_clear_metadata { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 21)] + #[doc = "Alter the attributes of a given asset."] + #[doc = ""] + #[doc = "Origin must be `ForceOrigin`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The new Owner of this asset."] + #[doc = "- `issuer`: The new Issuer of this asset."] + #[doc = "- `admin`: The new Admin of this asset."] + #[doc = "- `freezer`: The new Freezer of this asset."] + #[doc = "- `min_balance`: The minimum balance of this new asset that any single account must"] + #[doc = "have. If an account's balance is reduced below this, then it collapses to zero."] + #[doc = "- `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient"] + #[doc = "value to account for the state bloat associated with its balance storage. If set to"] + #[doc = "`true`, then non-zero balances may be stored without a `consumer` reference (and thus"] + #[doc = "an ED in the Balances pallet or whatever else is used to control user-account state"] + #[doc = "growth)."] + #[doc = "- `is_frozen`: Whether this asset class is frozen except for permissioned/admin"] + #[doc = "instructions."] + #[doc = ""] + #[doc = "Emits `AssetStatusChanged` with the identity of the asset."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_asset_status { + #[codec(compact)] + id: ::core::primitive::u128, + owner: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + issuer: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + admin: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + freezer: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + min_balance: ::core::primitive::u128, + is_sufficient: ::core::primitive::bool, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 22)] + #[doc = "Approve an amount of asset for transfer by a delegated third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed."] + #[doc = ""] + #[doc = "Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account"] + #[doc = "for the purpose of holding the approval. If some non-zero amount of assets is already"] + #[doc = "approved from signing account to `delegate`, then it is topped up or unreserved to"] + #[doc = "meet the right value."] + #[doc = ""] + #[doc = "NOTE: The signing account does not need to own `amount` of assets at the point of"] + #[doc = "making this call."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account to delegate permission to transfer asset."] + #[doc = "- `amount`: The amount of asset that may be transferred by `delegate`. If there is"] + #[doc = "already an approval in place, then this acts additively."] + #[doc = ""] + #[doc = "Emits `ApprovedTransfer` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + approve_transfer { + #[codec(compact)] + id: ::core::primitive::u128, + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 23)] + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place between signer and"] + #[doc = "`delegate`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + cancel_approval { + #[codec(compact)] + id: ::core::primitive::u128, + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 24)] + #[doc = "Cancel all of some asset approved for delegated transfer by a third-party account."] + #[doc = ""] + #[doc = "Origin must be either ForceOrigin or Signed origin with the signer being the Admin"] + #[doc = "account of the asset `id`."] + #[doc = ""] + #[doc = "Unreserves any deposit previously reserved by `approve_transfer` for the approval."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `delegate`: The account delegated permission to transfer asset."] + #[doc = ""] + #[doc = "Emits `ApprovalCancelled` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + force_cancel_approval { + #[codec(compact)] + id: ::core::primitive::u128, + owner: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 25)] + #[doc = "Transfer some asset balance from a previously delegated account to some third-party"] + #[doc = "account."] + #[doc = ""] + #[doc = "Origin must be Signed and there must be an approval in place by the `owner` to the"] + #[doc = "signer."] + #[doc = ""] + #[doc = "If the entire amount approved for transfer is transferred, then any deposit previously"] + #[doc = "reserved by `approve_transfer` is unreserved."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `owner`: The account which previously approved for a transfer of at least `amount` and"] + #[doc = "from which the asset balance will be withdrawn."] + #[doc = "- `destination`: The account to which the asset balance of `amount` will be transferred."] + #[doc = "- `amount`: The amount of assets to transfer."] + #[doc = ""] + #[doc = "Emits `TransferredApproved` on success."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + transfer_approved { + #[codec(compact)] + id: ::core::primitive::u128, + owner: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + destination: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 26)] + #[doc = "Create an asset account for non-provider assets."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed; the signer account must have sufficient funds for a deposit"] + #[doc = " to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + touch { + #[codec(compact)] + id: ::core::primitive::u128, + }, + #[codec(index = 27)] + #[doc = "Return the deposit (if any) of an asset account or a consumer reference (if any) of an"] + #[doc = "account."] + #[doc = ""] + #[doc = "The origin must be Signed."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for which the caller would like the deposit"] + #[doc = " refunded."] + #[doc = "- `allow_burn`: If `true` then assets may be destroyed in order to complete the refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + refund { + #[codec(compact)] + id: ::core::primitive::u128, + allow_burn: ::core::primitive::bool, + }, + #[codec(index = 28)] + #[doc = "Sets the minimum balance of an asset."] + #[doc = ""] + #[doc = "Only works if there aren't any accounts that are holding the asset or if"] + #[doc = "the new value of `min_balance` is less than the old one."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender has to be the Owner of the"] + #[doc = "asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset."] + #[doc = "- `min_balance`: The new value of `min_balance`."] + #[doc = ""] + #[doc = "Emits `AssetMinBalanceChanged` event when successful."] + set_min_balance { + #[codec(compact)] + id: ::core::primitive::u128, + min_balance: ::core::primitive::u128, + }, + #[codec(index = 29)] + #[doc = "Create an asset account for `who`."] + #[doc = ""] + #[doc = "A deposit will be taken from the signer account."] + #[doc = ""] + #[doc = "- `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account"] + #[doc = " must have sufficient funds for a deposit to be taken."] + #[doc = "- `id`: The identifier of the asset for the account to be created."] + #[doc = "- `who`: The account to be created."] + #[doc = ""] + #[doc = "Emits `Touched` event when successful."] + touch_other { + #[codec(compact)] + id: ::core::primitive::u128, + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 30)] + #[doc = "Return the deposit (if any) of a target asset account. Useful if you are the depositor."] + #[doc = ""] + #[doc = "The origin must be Signed and either the account owner, depositor, or asset `Admin`. In"] + #[doc = "order to burn a non-zero balance of the asset, the caller must be the account and should"] + #[doc = "use `refund`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the asset for the account holding a deposit."] + #[doc = "- `who`: The account to refund."] + #[doc = ""] + #[doc = "Emits `Refunded` event when successful."] + refund_other { + #[codec(compact)] + id: ::core::primitive::u128, + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 31)] + #[doc = "Disallow further unprivileged transfers of an asset `id` to and from an account `who`."] + #[doc = ""] + #[doc = "Origin must be Signed and the sender should be the Freezer of the asset `id`."] + #[doc = ""] + #[doc = "- `id`: The identifier of the account's asset."] + #[doc = "- `who`: The account to be unblocked."] + #[doc = ""] + #[doc = "Emits `Blocked`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + block { + #[codec(compact)] + id: ::core::primitive::u128, + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Account balance must be greater than or equal to the transfer amount."] + BalanceLow, + #[codec(index = 1)] + #[doc = "The account to alter does not exist."] + NoAccount, + #[codec(index = 2)] + #[doc = "The signing account has no permission to do the operation."] + NoPermission, + #[codec(index = 3)] + #[doc = "The given asset ID is unknown."] + Unknown, + #[codec(index = 4)] + #[doc = "The origin account is frozen."] + Frozen, + #[codec(index = 5)] + #[doc = "The asset ID is already taken."] + InUse, + #[codec(index = 6)] + #[doc = "Invalid witness data given."] + BadWitness, + #[codec(index = 7)] + #[doc = "Minimum balance should be non-zero."] + MinBalanceZero, + #[codec(index = 8)] + #[doc = "Unable to increment the consumer reference counters on the account. Either no provider"] + #[doc = "reference exists to allow a non-zero balance of a non-self-sufficient asset, or one"] + #[doc = "fewer then the maximum number of consumers has been reached."] + UnavailableConsumer, + #[codec(index = 9)] + #[doc = "Invalid metadata given."] + BadMetadata, + #[codec(index = 10)] + #[doc = "No approval exists that would allow the transfer."] + Unapproved, + #[codec(index = 11)] + #[doc = "The source account would not survive the transfer and it needs to stay alive."] + WouldDie, + #[codec(index = 12)] + #[doc = "The asset-account already exists."] + AlreadyExists, + #[codec(index = 13)] + #[doc = "The asset-account doesn't have an associated deposit."] + NoDeposit, + #[codec(index = 14)] + #[doc = "The operation would result in funds being burned."] + WouldBurn, + #[codec(index = 15)] + #[doc = "The asset is a live asset and is actively being used. Usually emit for operations such"] + #[doc = "as `start_destroy` which require the asset to be in a destroying state."] + LiveAsset, + #[codec(index = 16)] + #[doc = "The asset is not live, and likely being destroyed."] + AssetNotLive, + #[codec(index = 17)] + #[doc = "The asset status is not the expected status."] + IncorrectStatus, + #[codec(index = 18)] + #[doc = "The asset should be frozen before the given operation."] + NotFrozen, + #[codec(index = 19)] + #[doc = "Callback action resulted in error"] + CallbackFailed, + #[codec(index = 20)] + #[doc = "The asset ID must be equal to the [`NextAssetId`]."] + BadAssetId, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Some asset class was created."] + Created { + asset_id: ::core::primitive::u128, + creator: ::subxt_core::utils::AccountId32, + owner: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 1)] + #[doc = "Some assets were issued."] + Issued { + asset_id: ::core::primitive::u128, + owner: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Some assets were transferred."] + Transferred { + asset_id: ::core::primitive::u128, + from: ::subxt_core::utils::AccountId32, + to: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Some assets were destroyed."] + Burned { + asset_id: ::core::primitive::u128, + owner: ::subxt_core::utils::AccountId32, + balance: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "The management team changed."] + TeamChanged { + asset_id: ::core::primitive::u128, + issuer: ::subxt_core::utils::AccountId32, + admin: ::subxt_core::utils::AccountId32, + freezer: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "The owner changed."] + OwnerChanged { + asset_id: ::core::primitive::u128, + owner: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 6)] + #[doc = "Some account `who` was frozen."] + Frozen { + asset_id: ::core::primitive::u128, + who: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 7)] + #[doc = "Some account `who` was thawed."] + Thawed { + asset_id: ::core::primitive::u128, + who: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "Some asset `asset_id` was frozen."] + AssetFrozen { asset_id: ::core::primitive::u128 }, + #[codec(index = 9)] + #[doc = "Some asset `asset_id` was thawed."] + AssetThawed { asset_id: ::core::primitive::u128 }, + #[codec(index = 10)] + #[doc = "Accounts were destroyed for given asset."] + AccountsDestroyed { + asset_id: ::core::primitive::u128, + accounts_destroyed: ::core::primitive::u32, + accounts_remaining: ::core::primitive::u32, + }, + #[codec(index = 11)] + #[doc = "Approvals were destroyed for given asset."] + ApprovalsDestroyed { + asset_id: ::core::primitive::u128, + approvals_destroyed: ::core::primitive::u32, + approvals_remaining: ::core::primitive::u32, + }, + #[codec(index = 12)] + #[doc = "An asset class is in the process of being destroyed."] + DestructionStarted { asset_id: ::core::primitive::u128 }, + #[codec(index = 13)] + #[doc = "An asset class was destroyed."] + Destroyed { asset_id: ::core::primitive::u128 }, + #[codec(index = 14)] + #[doc = "Some asset class was force-created."] + ForceCreated { + asset_id: ::core::primitive::u128, + owner: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 15)] + #[doc = "New metadata has been set for an asset."] + MetadataSet { + asset_id: ::core::primitive::u128, + name: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + symbol: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + decimals: ::core::primitive::u8, + is_frozen: ::core::primitive::bool, + }, + #[codec(index = 16)] + #[doc = "Metadata has been cleared for an asset."] + MetadataCleared { asset_id: ::core::primitive::u128 }, + #[codec(index = 17)] + #[doc = "(Additional) funds have been approved for transfer to a destination account."] + ApprovedTransfer { + asset_id: ::core::primitive::u128, + source: ::subxt_core::utils::AccountId32, + delegate: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 18)] + #[doc = "An approval for account `delegate` was cancelled by `owner`."] + ApprovalCancelled { + asset_id: ::core::primitive::u128, + owner: ::subxt_core::utils::AccountId32, + delegate: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 19)] + #[doc = "An `amount` was transferred in its entirety from `owner` to `destination` by"] + #[doc = "the approved `delegate`."] + TransferredApproved { + asset_id: ::core::primitive::u128, + owner: ::subxt_core::utils::AccountId32, + delegate: ::subxt_core::utils::AccountId32, + destination: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 20)] + #[doc = "An asset has had its attributes changed by the `Force` origin."] + AssetStatusChanged { asset_id: ::core::primitive::u128 }, + #[codec(index = 21)] + #[doc = "The min_balance of an asset has been updated by the asset owner."] + AssetMinBalanceChanged { + asset_id: ::core::primitive::u128, + new_min_balance: ::core::primitive::u128, + }, + #[codec(index = 22)] + #[doc = "Some account `who` was created with a deposit from `depositor`."] + Touched { + asset_id: ::core::primitive::u128, + who: ::subxt_core::utils::AccountId32, + depositor: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 23)] + #[doc = "Some account `who` was blocked."] + Blocked { + asset_id: ::core::primitive::u128, + who: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 24)] + #[doc = "Some assets were deposited (e.g. for transaction fees)."] + Deposited { + asset_id: ::core::primitive::u128, + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 25)] + #[doc = "Some assets were withdrawn from the account (e.g. for transaction fees)."] + Withdrawn { + asset_id: ::core::primitive::u128, + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum AccountStatus { + #[codec(index = 0)] + Liquid, + #[codec(index = 1)] + Frozen, + #[codec(index = 2)] + Blocked, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Approval<_0, _1> { + pub amount: _0, + pub deposit: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AssetAccount<_0, _1, _2, _3> { + pub balance: _0, + pub status: runtime_types::pallet_assets::types::AccountStatus, + pub reason: runtime_types::pallet_assets::types::ExistenceReason<_0, _3>, + pub extra: _2, + #[codec(skip)] + pub __ignore: ::core::marker::PhantomData<_1>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AssetDetails<_0, _1, _2> { + pub owner: _1, + pub issuer: _1, + pub admin: _1, + pub freezer: _1, + pub supply: _0, + pub deposit: _2, + pub min_balance: _0, + pub is_sufficient: ::core::primitive::bool, + pub accounts: ::core::primitive::u32, + pub sufficients: ::core::primitive::u32, + pub approvals: ::core::primitive::u32, + pub status: runtime_types::pallet_assets::types::AssetStatus, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AssetMetadata<_0, _1> { + pub deposit: _0, + pub name: _1, + pub symbol: _1, + pub decimals: ::core::primitive::u8, + pub is_frozen: ::core::primitive::bool, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum AssetStatus { + #[codec(index = 0)] + Live, + #[codec(index = 1)] + Frozen, + #[codec(index = 2)] + Destroying, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExistenceReason<_0, _1> { + #[codec(index = 0)] + Consumer, + #[codec(index = 1)] + Sufficient, + #[codec(index = 2)] + DepositHeld(_0), + #[codec(index = 3)] + DepositRefunded, + #[codec(index = 4)] + DepositFrom(_1, _0), + } + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + report_equivocation { + equivocation_proof: ::subxt_core::alloc::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u64, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 1)] + #[doc = "Report authority equivocation/misbehavior. This method will verify"] + #[doc = "the equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence will"] + #[doc = "be reported."] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + report_equivocation_unsigned { + equivocation_proof: ::subxt_core::alloc::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u64, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 2)] + #[doc = "Plan an epoch config change. The epoch config change is recorded and will be enacted on"] + #[doc = "the next call to `enact_epoch_change`. The config will be activated one epoch after."] + #[doc = "Multiple calls to this method will replace any existing planned config change that had"] + #[doc = "not been enacted yet."] + plan_config_change { + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "An equivocation proof provided as part of an equivocation report is invalid."] + InvalidEquivocationProof, + #[codec(index = 1)] + #[doc = "A key ownership proof provided as part of an equivocation report is invalid."] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + #[doc = "A given equivocation report is valid but already previously reported."] + DuplicateOffenceReport, + #[codec(index = 3)] + #[doc = "Submitted configuration is invalid."] + InvalidConfiguration, + } + } + } + pub mod pallet_bags_list { + use super::runtime_types; + pub mod list { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Bag { + pub head: ::core::option::Option<::subxt_core::utils::AccountId32>, + pub tail: ::core::option::Option<::subxt_core::utils::AccountId32>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ListError { + #[codec(index = 0)] + Duplicate, + #[codec(index = 1)] + NotHeavier, + #[codec(index = 2)] + NotInSameBag, + #[codec(index = 3)] + NodeNotFound, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Node { + pub id: ::subxt_core::utils::AccountId32, + pub prev: ::core::option::Option<::subxt_core::utils::AccountId32>, + pub next: ::core::option::Option<::subxt_core::utils::AccountId32>, + pub bag_upper: ::core::primitive::u64, + pub score: ::core::primitive::u64, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Declare that some `dislocated` account has, through rewards or penalties, sufficiently"] + #[doc = "changed its score that it should properly fall into a different bag than its current"] + #[doc = "one."] + #[doc = ""] + #[doc = "Anyone can call this function about any potentially dislocated account."] + #[doc = ""] + #[doc = "Will always update the stored score of `dislocated` to the correct score, based on"] + #[doc = "`ScoreProvider`."] + #[doc = ""] + #[doc = "If `dislocated` does not exists, it returns an error."] + rebag { + dislocated: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Move the caller's Id directly in front of `lighter`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and can only be called by the Id of"] + #[doc = "the account going in front of `lighter`. Fee is payed by the origin under all"] + #[doc = "circumstances."] + #[doc = ""] + #[doc = "Only works if:"] + #[doc = ""] + #[doc = "- both nodes are within the same bag,"] + #[doc = "- and `origin` has a greater `Score` than `lighter`."] + put_in_front_of { + lighter: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 2)] + #[doc = "Same as [`Pallet::put_in_front_of`], but it can be called by anyone."] + #[doc = ""] + #[doc = "Fee is paid by the origin under all circumstances."] + put_in_front_of_other { + heavier: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + lighter: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "A error in the list interface implementation."] + List(runtime_types::pallet_bags_list::list::ListError), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Moved an account from one bag to another."] + Rebagged { + who: ::subxt_core::utils::AccountId32, + from: ::core::primitive::u64, + to: ::core::primitive::u64, + }, + #[codec(index = 1)] + #[doc = "Updated the score of some account to the given amount."] + ScoreUpdated { + who: ::subxt_core::utils::AccountId32, + new_score: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_balances { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Transfer some liquid free balance to another account."] + #[doc = ""] + #[doc = "`transfer_allow_death` will set the `FreeBalance` of the sender and receiver."] + #[doc = "If the sender's account is below the existential deposit as a result"] + #[doc = "of the transfer, the account will be reaped."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `Signed` by the transactor."] + transfer_allow_death { + dest: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Exactly as `transfer_allow_death`, except the origin must be root and the source account"] + #[doc = "may be specified."] + force_transfer { + source: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + dest: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Same as the [`transfer_allow_death`] call, but with a check that the transfer will not"] + #[doc = "kill the origin account."] + #[doc = ""] + #[doc = "99% of the time you want [`transfer_allow_death`] instead."] + #[doc = ""] + #[doc = "[`transfer_allow_death`]: struct.Pallet.html#method.transfer"] + transfer_keep_alive { + dest: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Transfer the entire transferable balance from the caller account."] + #[doc = ""] + #[doc = "NOTE: This function only attempts to transfer _transferable_ balances. This means that"] + #[doc = "any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be"] + #[doc = "transferred by this function. To ensure that this function results in a killed account,"] + #[doc = "you might need to prepare the account by removing any reference counters, storage"] + #[doc = "deposits, etc..."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be Signed."] + #[doc = ""] + #[doc = "- `dest`: The recipient of the transfer."] + #[doc = "- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all"] + #[doc = " of the funds the account has, causing the sender account to be killed (false), or"] + #[doc = " transfer everything except at least the existential deposit, which will guarantee to"] + #[doc = " keep the sender account alive (true)."] + transfer_all { + dest: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + keep_alive: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "Unreserve some balance from a user by force."] + #[doc = ""] + #[doc = "Can only be called by ROOT."] + force_unreserve { + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "Upgrade a specified account."] + #[doc = ""] + #[doc = "- `origin`: Must be `Signed`."] + #[doc = "- `who`: The account to be upgraded."] + #[doc = ""] + #[doc = "This will waive the transaction fee if at least all but 10% of the accounts needed to"] + #[doc = "be upgraded. (We let some not have to be upgraded just in order to allow for the"] + #[doc = "possibility of churn)."] + upgrade_accounts { + who: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + }, + #[codec(index = 8)] + #[doc = "Set the regular balance of a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call is `root`."] + force_set_balance { + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + new_free: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "Adjust the total issuance in a saturating way."] + #[doc = ""] + #[doc = "Can only be called by root and always needs a positive `delta`."] + #[doc = ""] + #[doc = "# Example"] + force_adjust_total_issuance { + direction: runtime_types::pallet_balances::types::AdjustmentDirection, + #[codec(compact)] + delta: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "Burn the specified liquid free balance from the origin account."] + #[doc = ""] + #[doc = "If the origin's account ends up below the existential deposit as a result"] + #[doc = "of the burn and `keep_alive` is false, the account will be reaped."] + #[doc = ""] + #[doc = "Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible,"] + #[doc = "this `burn` operation will reduce total issuance by the amount _burned_."] + burn { + #[codec(compact)] + value: ::core::primitive::u128, + keep_alive: ::core::primitive::bool, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Vesting balance too high to send value."] + VestingBalance, + #[codec(index = 1)] + #[doc = "Account liquidity restrictions prevent withdrawal."] + LiquidityRestrictions, + #[codec(index = 2)] + #[doc = "Balance too low to send value."] + InsufficientBalance, + #[codec(index = 3)] + #[doc = "Value too low to create account due to existential deposit."] + ExistentialDeposit, + #[codec(index = 4)] + #[doc = "Transfer/payment would kill account."] + Expendability, + #[codec(index = 5)] + #[doc = "A vesting schedule already exists for this account."] + ExistingVestingSchedule, + #[codec(index = 6)] + #[doc = "Beneficiary account must pre-exist."] + DeadAccount, + #[codec(index = 7)] + #[doc = "Number of named reserves exceed `MaxReserves`."] + TooManyReserves, + #[codec(index = 8)] + #[doc = "Number of holds exceed `VariantCountOf`."] + TooManyHolds, + #[codec(index = 9)] + #[doc = "Number of freezes exceed `MaxFreezes`."] + TooManyFreezes, + #[codec(index = 10)] + #[doc = "The issuance cannot be modified since it is already deactivated."] + IssuanceDeactivated, + #[codec(index = 11)] + #[doc = "The delta cannot be zero."] + DeltaZero, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "An account was created with some free balance."] + Endowed { + account: ::subxt_core::utils::AccountId32, + free_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"] + #[doc = "resulting in an outright loss."] + DustLost { + account: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Transfer succeeded."] + Transfer { + from: ::subxt_core::utils::AccountId32, + to: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A balance was set by root."] + BalanceSet { + who: ::subxt_core::utils::AccountId32, + free: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Some balance was reserved (moved from free to reserved)."] + Reserved { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "Some balance was unreserved (moved from reserved to free)."] + Unreserved { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "Some balance was moved from the reserve of the first account to the second account."] + #[doc = "Final argument indicates the destination balance type."] + ReserveRepatriated { + from: ::subxt_core::utils::AccountId32, + to: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + destination_status: + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + }, + #[codec(index = 7)] + #[doc = "Some amount was deposited (e.g. for transaction fees)."] + Deposit { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."] + Withdraw { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "Some amount was removed from the account (e.g. for misbehavior)."] + Slashed { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "Some amount was minted into an account."] + Minted { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "Some amount was burned from an account."] + Burned { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 12)] + #[doc = "Some amount was suspended from an account (it can be restored later)."] + Suspended { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 13)] + #[doc = "Some amount was restored into an account."] + Restored { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 14)] + #[doc = "An account was upgraded."] + Upgraded { who: ::subxt_core::utils::AccountId32 }, + #[codec(index = 15)] + #[doc = "Total issuance was increased by `amount`, creating a credit to be balanced."] + Issued { amount: ::core::primitive::u128 }, + #[codec(index = 16)] + #[doc = "Total issuance was decreased by `amount`, creating a debt to be balanced."] + Rescinded { amount: ::core::primitive::u128 }, + #[codec(index = 17)] + #[doc = "Some balance was locked."] + Locked { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 18)] + #[doc = "Some balance was unlocked."] + Unlocked { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 19)] + #[doc = "Some balance was frozen."] + Frozen { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 20)] + #[doc = "Some balance was thawed."] + Thawed { + who: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 21)] + #[doc = "The `TotalIssuance` was forcefully changed."] + TotalIssuanceForced { + old: ::core::primitive::u128, + new: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub frozen: _0, + pub flags: runtime_types::pallet_balances::types::ExtraFlags, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum AdjustmentDirection { + #[codec(index = 0)] + Increase, + #[codec(index = 1)] + Decrease, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::types::Reasons, + } + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ExtraFlags(pub ::core::primitive::u128); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + } + pub mod pallet_base_fee { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + set_base_fee_per_gas { fee: runtime_types::primitive_types::U256 }, + #[codec(index = 1)] + set_elasticity { elasticity: runtime_types::sp_arithmetic::per_things::Permill }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + NewBaseFeePerGas { fee: runtime_types::primitive_types::U256 }, + #[codec(index = 1)] + BaseFeeOverflow, + #[codec(index = 2)] + NewElasticity { elasticity: runtime_types::sp_arithmetic::per_things::Permill }, + } + } + } + pub mod pallet_bounties { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Propose a new bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Payment: `TipReportDepositBase` will be reserved from the origin account, as well as"] + #[doc = "`DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval,"] + #[doc = "or slashed when rejected."] + #[doc = ""] + #[doc = "- `curator`: The curator account whom will manage this bounty."] + #[doc = "- `fee`: The curator fee."] + #[doc = "- `value`: The total payment amount of this bounty, curator fee included."] + #[doc = "- `description`: The description of this bounty."] + propose_bounty { + #[codec(compact)] + value: ::core::primitive::u128, + description: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Approve a bounty proposal. At a later time, the bounty will be funded and become active"] + #[doc = "and the original deposit will be returned."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + approve_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Propose a curator to a funded bounty."] + #[doc = ""] + #[doc = "May only be called from `T::SpendOrigin`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + propose_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + curator: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Unassign curator from a bounty."] + #[doc = ""] + #[doc = "This function can only be called by the `RejectOrigin` a signed origin."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin`, we assume that the curator is"] + #[doc = "malicious or inactive. As a result, we will slash the curator when possible."] + #[doc = ""] + #[doc = "If the origin is the curator, we take this as a sign they are unable to do their job and"] + #[doc = "they willingly give up. We could slash them, but for now we allow them to recover their"] + #[doc = "deposit and exit without issue. (We may want to change this if it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone if and only if the curator is \"inactive\". This allows"] + #[doc = "anyone in the community to call out that a curator is not doing their due diligence, and"] + #[doc = "we should pick a new curator. In this case the curator should also be slashed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + unassign_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Accept the curator role for a bounty."] + #[doc = "A deposit will be reserved from curator and refund upon successful payout."] + #[doc = ""] + #[doc = "May only be called from the curator."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + accept_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Award bounty to a beneficiary account. The beneficiary will be able to claim the funds"] + #[doc = "after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to award."] + #[doc = "- `beneficiary`: The beneficiary account whom will receive the payout."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + award_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 6)] + #[doc = "Claim the payout from an awarded bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the beneficiary of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to claim."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + claim_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 7)] + #[doc = "Cancel a proposed or active bounty. All the funds will be sent to treasury and"] + #[doc = "the curator deposit will be unreserved if possible."] + #[doc = ""] + #[doc = "Only `T::RejectOrigin` is able to cancel a bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to cancel."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + close_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Extend the expiry time of an active bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this bounty."] + #[doc = ""] + #[doc = "- `bounty_id`: Bounty ID to extend."] + #[doc = "- `remark`: additional information."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + extend_bounty_expiry { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + remark: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Proposer's balance is too low."] + InsufficientProposersBalance, + #[codec(index = 1)] + #[doc = "No proposal or bounty at that index."] + InvalidIndex, + #[codec(index = 2)] + #[doc = "The reason given is just too big."] + ReasonTooBig, + #[codec(index = 3)] + #[doc = "The bounty status is unexpected."] + UnexpectedStatus, + #[codec(index = 4)] + #[doc = "Require bounty curator."] + RequireCurator, + #[codec(index = 5)] + #[doc = "Invalid bounty value."] + InvalidValue, + #[codec(index = 6)] + #[doc = "Invalid bounty fee."] + InvalidFee, + #[codec(index = 7)] + #[doc = "A bounty payout is pending."] + #[doc = "To cancel the bounty, you must unassign and slash the curator."] + PendingPayout, + #[codec(index = 8)] + #[doc = "The bounties cannot be claimed/closed because it's still in the countdown period."] + Premature, + #[codec(index = 9)] + #[doc = "The bounty cannot be closed because it has active child bounties."] + HasActiveChildBounty, + #[codec(index = 10)] + #[doc = "Too many approvals are already queued."] + TooManyQueued, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New bounty proposal."] + BountyProposed { index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "A bounty proposal was rejected; funds were slashed."] + BountyRejected { index: ::core::primitive::u32, bond: ::core::primitive::u128 }, + #[codec(index = 2)] + #[doc = "A bounty proposal is funded and became active."] + BountyBecameActive { index: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "A bounty is awarded to a beneficiary."] + BountyAwarded { + index: ::core::primitive::u32, + beneficiary: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 4)] + #[doc = "A bounty is claimed by beneficiary."] + BountyClaimed { + index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 5)] + #[doc = "A bounty is cancelled."] + BountyCanceled { index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "A bounty expiry is extended."] + BountyExtended { index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "A bounty is approved."] + BountyApproved { index: ::core::primitive::u32 }, + #[codec(index = 8)] + #[doc = "A bounty curator is proposed."] + CuratorProposed { + bounty_id: ::core::primitive::u32, + curator: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 9)] + #[doc = "A bounty curator is unassigned."] + CuratorUnassigned { bounty_id: ::core::primitive::u32 }, + #[codec(index = 10)] + #[doc = "A bounty curator is accepted."] + CuratorAccepted { + bounty_id: ::core::primitive::u32, + curator: ::subxt_core::utils::AccountId32, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Bounty<_0, _1, _2> { + pub proposer: _0, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub bond: _1, + pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum BountyStatus<_0, _1> { + #[codec(index = 0)] + Proposed, + #[codec(index = 1)] + Approved, + #[codec(index = 2)] + Funded, + #[codec(index = 3)] + CuratorProposed { curator: _0 }, + #[codec(index = 4)] + Active { curator: _0, update_due: _1 }, + #[codec(index = 5)] + PendingPayout { curator: _0, beneficiary: _0, unlock_at: _1 }, + } + } + pub mod pallet_child_bounties { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a new child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of parent"] + #[doc = "bounty and the parent bounty must be in \"active\" state."] + #[doc = ""] + #[doc = "Child-bounty gets added successfully & fund gets transferred from"] + #[doc = "parent bounty to child-bounty account, if parent bounty has enough"] + #[doc = "funds, else the call fails."] + #[doc = ""] + #[doc = "Upper bound to maximum number of active child bounties that can be"] + #[doc = "added are managed via runtime trait config"] + #[doc = "[`Config::MaxActiveChildBountyCount`]."] + #[doc = ""] + #[doc = "If the call is success, the status of child-bounty is updated to"] + #[doc = "\"Added\"."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty for which child-bounty is being added."] + #[doc = "- `value`: Value for executing the proposal."] + #[doc = "- `description`: Text description for the child-bounty."] + add_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + value: ::core::primitive::u128, + description: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Propose curator for funded child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be curator of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"Added\" state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"CuratorProposed\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `curator`: Address of child-bounty curator."] + #[doc = "- `fee`: payment fee to child-bounty curator for execution."] + propose_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + curator: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Accept the curator role for the child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the curator of this"] + #[doc = "child-bounty."] + #[doc = ""] + #[doc = "A deposit will be reserved from the curator and refund upon"] + #[doc = "successful payout or cancellation."] + #[doc = ""] + #[doc = "Fee for curator is deducted from curator fee of parent bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in \"CuratorProposed\" state, for processing the"] + #[doc = "call. And state of child-bounty is moved to \"Active\" on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + accept_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Unassign curator from a child-bounty."] + #[doc = ""] + #[doc = "The dispatch origin for this call can be either `RejectOrigin`, or"] + #[doc = "the curator of the parent bounty, or any signed origin."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin and the child-bounty"] + #[doc = "curator, parent bounty must be in active state, for this call to"] + #[doc = "work. We allow child-bounty curator and T::RejectOrigin to execute"] + #[doc = "this call irrespective of the parent bounty state."] + #[doc = ""] + #[doc = "If this function is called by the `RejectOrigin` or the"] + #[doc = "parent bounty curator, we assume that the child-bounty curator is"] + #[doc = "malicious or inactive. As a result, child-bounty curator deposit is"] + #[doc = "slashed."] + #[doc = ""] + #[doc = "If the origin is the child-bounty curator, we take this as a sign"] + #[doc = "that they are unable to do their job, and are willingly giving up."] + #[doc = "We could slash the deposit, but for now we allow them to unreserve"] + #[doc = "their deposit and exit without issue. (We may want to change this if"] + #[doc = "it is abused.)"] + #[doc = ""] + #[doc = "Finally, the origin can be anyone iff the child-bounty curator is"] + #[doc = "\"inactive\". Expiry update due of parent bounty is used to estimate"] + #[doc = "inactive state of child-bounty curator."] + #[doc = ""] + #[doc = "This allows anyone in the community to call out that a child-bounty"] + #[doc = "curator is not doing their due diligence, and we should pick a new"] + #[doc = "one. In this case the child-bounty curator deposit is slashed."] + #[doc = ""] + #[doc = "State of child-bounty is moved to Added state on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + unassign_curator { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "Award child-bounty to a beneficiary."] + #[doc = ""] + #[doc = "The beneficiary will be able to claim the funds after a delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be the parent curator or"] + #[doc = "curator of this child-bounty."] + #[doc = ""] + #[doc = "Parent bounty must be in active state, for this child-bounty call to"] + #[doc = "work."] + #[doc = ""] + #[doc = "Child-bounty must be in active state, for processing the call. And"] + #[doc = "state of child-bounty is moved to \"PendingPayout\" on successful call"] + #[doc = "completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + #[doc = "- `beneficiary`: Beneficiary account."] + award_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + beneficiary: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 5)] + #[doc = "Claim the payout from an awarded child-bounty after payout delay."] + #[doc = ""] + #[doc = "The dispatch origin for this call may be any signed origin."] + #[doc = ""] + #[doc = "Call works independent of parent bounty state, No need for parent"] + #[doc = "bounty to be in active state."] + #[doc = ""] + #[doc = "The Beneficiary is paid out with agreed bounty value. Curator fee is"] + #[doc = "paid & curator deposit is unreserved."] + #[doc = ""] + #[doc = "Child-bounty must be in \"PendingPayout\" state, for processing the"] + #[doc = "call. And instance of child-bounty is removed from the state on"] + #[doc = "successful call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + claim_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Cancel a proposed or active child-bounty. Child-bounty account funds"] + #[doc = "are transferred to parent bounty account. The child-bounty curator"] + #[doc = "deposit may be unreserved if possible."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be either parent curator or"] + #[doc = "`T::RejectOrigin`."] + #[doc = ""] + #[doc = "If the state of child-bounty is `Active`, curator deposit is"] + #[doc = "unreserved."] + #[doc = ""] + #[doc = "If the state of child-bounty is `PendingPayout`, call fails &"] + #[doc = "returns `PendingPayout` error."] + #[doc = ""] + #[doc = "For the origin other than T::RejectOrigin, parent bounty must be in"] + #[doc = "active state, for this child-bounty call to work. For origin"] + #[doc = "T::RejectOrigin execution is forced."] + #[doc = ""] + #[doc = "Instance of child-bounty is removed from the state on successful"] + #[doc = "call completion."] + #[doc = ""] + #[doc = "- `parent_bounty_id`: Index of parent bounty."] + #[doc = "- `child_bounty_id`: Index of child bounty."] + close_child_bounty { + #[codec(compact)] + parent_bounty_id: ::core::primitive::u32, + #[codec(compact)] + child_bounty_id: ::core::primitive::u32, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The parent bounty is not in active state."] + ParentBountyNotActive, + #[codec(index = 1)] + #[doc = "The bounty balance is not enough to add new child-bounty."] + InsufficientBountyBalance, + #[codec(index = 2)] + #[doc = "Number of child bounties exceeds limit `MaxActiveChildBountyCount`."] + TooManyChildBounties, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A child-bounty is added."] + Added { index: ::core::primitive::u32, child_index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "A child-bounty is awarded to a beneficiary."] + Awarded { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + beneficiary: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "A child-bounty is claimed by beneficiary."] + Claimed { + index: ::core::primitive::u32, + child_index: ::core::primitive::u32, + payout: ::core::primitive::u128, + beneficiary: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 3)] + #[doc = "A child-bounty is cancelled."] + Canceled { index: ::core::primitive::u32, child_index: ::core::primitive::u32 }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ChildBounty<_0, _1, _2> { + pub parent_bounty: ::core::primitive::u32, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub status: runtime_types::pallet_child_bounties::ChildBountyStatus<_0, _2>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ChildBountyStatus<_0, _1> { + #[codec(index = 0)] + Added, + #[codec(index = 1)] + CuratorProposed { curator: _0 }, + #[codec(index = 2)] + Active { curator: _0 }, + #[codec(index = 3)] + PendingPayout { curator: _0, beneficiary: _0, unlock_at: _1 }, + } + } + pub mod pallet_collective { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Set the collective's membership."] + #[doc = ""] + #[doc = "- `new_members`: The new member list. Be nice to the chain and provide it sorted."] + #[doc = "- `prime`: The prime member whose vote sets the default."] + #[doc = "- `old_count`: The upper bound for the previous number of members in storage. Used for"] + #[doc = " weight estimation."] + #[doc = ""] + #[doc = "The dispatch of this call must be `SetMembersOrigin`."] + #[doc = ""] + #[doc = "NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but"] + #[doc = " the weight estimations rely on it to estimate dispatchable weight."] + #[doc = ""] + #[doc = "# WARNING:"] + #[doc = ""] + #[doc = "The `pallet-collective` can also be managed by logic outside of the pallet through the"] + #[doc = "implementation of the trait [`ChangeMembers`]."] + #[doc = "Any call to `set_members` must be careful that the member set doesn't get out of sync"] + #[doc = "with other logic managing the member set."] + #[doc = ""] + #[doc = "## Complexity:"] + #[doc = "- `O(MP + N)` where:"] + #[doc = " - `M` old-members-count (code- and governance-bounded)"] + #[doc = " - `N` new-members-count (code- and governance-bounded)"] + #[doc = " - `P` proposals-count (code-bounded)"] + set_members { + new_members: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + prime: ::core::option::Option<::subxt_core::utils::AccountId32>, + old_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Dispatch a proposal from a member using the `Member` origin."] + #[doc = ""] + #[doc = "Origin must be a member of the collective."] + #[doc = ""] + #[doc = "## Complexity:"] + #[doc = "- `O(B + M + P)` where:"] + #[doc = "- `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = "- `M` members-count (code-bounded)"] + #[doc = "- `P` complexity of dispatching `proposal`"] + execute { + proposal: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Add a new proposal to either be voted on or executed directly."] + #[doc = ""] + #[doc = "Requires the sender to be member."] + #[doc = ""] + #[doc = "`threshold` determines whether `proposal` is executed directly (`threshold < 2`)"] + #[doc = "or put up for voting."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(B + M + P1)` or `O(B + M + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - branching is influenced by `threshold` where:"] + #[doc = " - `P1` is proposal execution complexity (`threshold < 2`)"] + #[doc = " - `P2` is proposals-count (code-bounded) (`threshold >= 2`)"] + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Add an aye or nay vote for the sender to the given proposal."] + #[doc = ""] + #[doc = "Requires the sender to be a member."] + #[doc = ""] + #[doc = "Transaction fees will be waived if the member is voting on any particular proposal"] + #[doc = "for the first time and the call is successful. Subsequent vote changes will charge a"] + #[doc = "fee."] + #[doc = "## Complexity"] + #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"] + vote { + proposal: ::subxt_core::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "Disapprove a proposal, close, and remove it from the system, regardless of its current"] + #[doc = "state."] + #[doc = ""] + #[doc = "Must be called by the Root origin."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "* `proposal_hash`: The hash of the proposal that should be disapproved."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(P) where P is the number of max proposals"] + disapprove_proposal { proposal_hash: ::subxt_core::utils::H256 }, + #[codec(index = 6)] + #[doc = "Close a vote that is either approved, disapproved or whose voting period has ended."] + #[doc = ""] + #[doc = "May be called by any signed account in order to finish voting and close the proposal."] + #[doc = ""] + #[doc = "If called before the end of the voting period it will only close the vote if it is"] + #[doc = "has enough votes to be approved or disapproved."] + #[doc = ""] + #[doc = "If called after the end of the voting period abstentions are counted as rejections"] + #[doc = "unless there is a prime member set and the prime member cast an approval."] + #[doc = ""] + #[doc = "If the close operation completes successfully with disapproval, the transaction fee will"] + #[doc = "be waived. Otherwise execution of the approved operation will be charged to the caller."] + #[doc = ""] + #[doc = "+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed"] + #[doc = "proposal."] + #[doc = "+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via"] + #[doc = "`storage::read` so it is `size_of::() == 4` larger than the pure length."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(B + M + P1 + P2)` where:"] + #[doc = " - `B` is `proposal` size in bytes (length-fee-bounded)"] + #[doc = " - `M` is members-count (code- and governance-bounded)"] + #[doc = " - `P1` is the complexity of `proposal` preimage."] + #[doc = " - `P2` is proposal-count (code-bounded)"] + close { + proposal_hash: ::subxt_core::utils::H256, + #[codec(compact)] + index: ::core::primitive::u32, + proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Account is not a member"] + NotMember, + #[codec(index = 1)] + #[doc = "Duplicate proposals not allowed"] + DuplicateProposal, + #[codec(index = 2)] + #[doc = "Proposal must exist"] + ProposalMissing, + #[codec(index = 3)] + #[doc = "Mismatched index"] + WrongIndex, + #[codec(index = 4)] + #[doc = "Duplicate vote ignored"] + DuplicateVote, + #[codec(index = 5)] + #[doc = "Members are already initialized!"] + AlreadyInitialized, + #[codec(index = 6)] + #[doc = "The close call was made too early, before the end of the voting."] + TooEarly, + #[codec(index = 7)] + #[doc = "There can only be a maximum of `MaxProposals` active proposals."] + TooManyProposals, + #[codec(index = 8)] + #[doc = "The given weight bound for the proposal was too low."] + WrongProposalWeight, + #[codec(index = 9)] + #[doc = "The given length bound for the proposal was too low."] + WrongProposalLength, + #[codec(index = 10)] + #[doc = "Prime account is not a member"] + PrimeAccountNotMember, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"] + #[doc = "`MemberCount`)."] + Proposed { + account: ::subxt_core::utils::AccountId32, + proposal_index: ::core::primitive::u32, + proposal_hash: ::subxt_core::utils::H256, + threshold: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A motion (given hash) has been voted on by given account, leaving"] + #[doc = "a tally (yes votes and no votes given respectively as `MemberCount`)."] + Voted { + account: ::subxt_core::utils::AccountId32, + proposal_hash: ::subxt_core::utils::H256, + voted: ::core::primitive::bool, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "A motion was approved by the required threshold."] + Approved { proposal_hash: ::subxt_core::utils::H256 }, + #[codec(index = 3)] + #[doc = "A motion was not approved by the required threshold."] + Disapproved { proposal_hash: ::subxt_core::utils::H256 }, + #[codec(index = 4)] + #[doc = "A motion was executed; result will be `Ok` if it returned without error."] + Executed { + proposal_hash: ::subxt_core::utils::H256, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 5)] + #[doc = "A single member did some action; result will be `Ok` if it returned without error."] + MemberExecuted { + proposal_hash: ::subxt_core::utils::H256, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 6)] + #[doc = "A proposal was closed because its threshold was reached or after its duration was up."] + Closed { + proposal_hash: ::subxt_core::utils::H256, + yes: ::core::primitive::u32, + no: ::core::primitive::u32, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Members(::core::primitive::u32, ::core::primitive::u32), + #[codec(index = 1)] + Member(_0), + #[codec(index = 2)] + _Phantom, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Votes<_0, _1> { + pub index: ::core::primitive::u32, + pub threshold: ::core::primitive::u32, + pub ayes: ::subxt_core::alloc::vec::Vec<_0>, + pub nays: ::subxt_core::alloc::vec::Vec<_0>, + pub end: _1, + } + } + pub mod pallet_democracy { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Conviction { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Locked1x, + #[codec(index = 2)] + Locked2x, + #[codec(index = 3)] + Locked3x, + #[codec(index = 4)] + Locked4x, + #[codec(index = 5)] + Locked5x, + #[codec(index = 6)] + Locked6x, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Propose a sensitive action to be taken."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender must"] + #[doc = "have funds to cover the deposit."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the proposal preimage."] + #[doc = "- `value`: The amount of deposit (must be at least `MinimumDeposit`)."] + #[doc = ""] + #[doc = "Emits `Proposed`."] + propose { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Signals agreement with a particular proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the sender"] + #[doc = "must have funds to cover the deposit, equal to the original deposit."] + #[doc = ""] + #[doc = "- `proposal`: The index of the proposal to second."] + second { + #[codec(compact)] + proposal: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;"] + #[doc = "otherwise it is a vote to keep the status quo."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to vote for."] + #[doc = "- `vote`: The vote configuration."] + vote { + #[codec(compact)] + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, + >, + }, + #[codec(index = 3)] + #[doc = "Schedule an emergency cancellation of a referendum. Cannot happen twice to the same"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancellationOrigin`."] + #[doc = ""] + #[doc = "-`ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + emergency_cancel { ref_index: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "Schedule a referendum to be tabled once it is legal to schedule an external"] + #[doc = "referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `ExternalOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + external_propose { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + }, + #[codec(index = 5)] + #[doc = "Schedule a majority-carries referendum to be tabled next once it is legal to schedule"] + #[doc = "an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalMajorityOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + external_propose_majority { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + }, + #[codec(index = 6)] + #[doc = "Schedule a negative-turnout-bias referendum to be tabled next once it is legal to"] + #[doc = "schedule an external referendum."] + #[doc = ""] + #[doc = "The dispatch of this call must be `ExternalDefaultOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal."] + #[doc = ""] + #[doc = "Unlike `external_propose`, blacklisting has no effect on this and it may replace a"] + #[doc = "pre-scheduled `external_propose` call."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + external_propose_default { + proposal: runtime_types::frame_support::traits::preimages::Bounded< + runtime_types::tangle_testnet_runtime::RuntimeCall, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + }, + #[codec(index = 7)] + #[doc = "Schedule the currently externally-proposed majority-carries referendum to be tabled"] + #[doc = "immediately. If there is no externally-proposed referendum currently, or if there is one"] + #[doc = "but it is not a majority-carries referendum then it fails."] + #[doc = ""] + #[doc = "The dispatch of this call must be `FastTrackOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The hash of the current external proposal."] + #[doc = "- `voting_period`: The period that is allowed for voting on this proposal. Increased to"] + #[doc = "\tMust be always greater than zero."] + #[doc = "\tFor `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`."] + #[doc = "- `delay`: The number of block after voting has ended in approval and this should be"] + #[doc = " enacted. This doesn't have a minimum amount."] + #[doc = ""] + #[doc = "Emits `Started`."] + #[doc = ""] + #[doc = "Weight: `O(1)`"] + fast_track { + proposal_hash: ::subxt_core::utils::H256, + voting_period: ::core::primitive::u64, + delay: ::core::primitive::u64, + }, + #[codec(index = 8)] + #[doc = "Veto and blacklist the external proposal hash."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `VetoOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The preimage hash of the proposal to veto and blacklist."] + #[doc = ""] + #[doc = "Emits `Vetoed`."] + #[doc = ""] + #[doc = "Weight: `O(V + log(V))` where V is number of `existing vetoers`"] + veto_external { proposal_hash: ::subxt_core::utils::H256 }, + #[codec(index = 9)] + #[doc = "Remove a referendum."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "- `ref_index`: The index of the referendum to cancel."] + #[doc = ""] + #[doc = "# Weight: `O(1)`."] + cancel_referendum { + #[codec(compact)] + ref_index: ::core::primitive::u32, + }, + #[codec(index = 10)] + #[doc = "Delegate the voting power (with some given conviction) of the sending account."] + #[doc = ""] + #[doc = "The balance delegated is locked for as long as it's delegated, and thereafter for the"] + #[doc = "time appropriate for the conviction's lock period."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signing account must either:"] + #[doc = " - be delegating already; or"] + #[doc = " - have no voting activity (if there is, then it will need to be removed/consolidated"] + #[doc = " through `reap_vote` or `unvote`)."] + #[doc = ""] + #[doc = "- `to`: The account whose voting the `target` account's voting power will follow."] + #[doc = "- `conviction`: The conviction that will be attached to the delegated votes. When the"] + #[doc = " account is undelegated, the funds will be locked for the corresponding period."] + #[doc = "- `balance`: The amount of the account's balance to be used in delegating. This must not"] + #[doc = " be more than the account's current balance."] + #[doc = ""] + #[doc = "Emits `Delegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + delegate { + to: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + balance: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "Undelegate the voting power of the sending account."] + #[doc = ""] + #[doc = "Tokens may be unlocked following once an amount of time consistent with the lock period"] + #[doc = "of the conviction with which the delegation was issued."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_ and the signing account must be"] + #[doc = "currently delegating."] + #[doc = ""] + #[doc = "Emits `Undelegated`."] + #[doc = ""] + #[doc = "Weight: `O(R)` where R is the number of referendums the voter delegating to has"] + #[doc = " voted on. Weight is charged as if maximum votes."] + undelegate, + #[codec(index = 12)] + #[doc = "Clears all public proposals."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Root_."] + #[doc = ""] + #[doc = "Weight: `O(1)`."] + clear_public_proposals, + #[codec(index = 13)] + #[doc = "Unlock tokens that have an expired lock."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account to remove the lock on."] + #[doc = ""] + #[doc = "Weight: `O(R)` with R number of vote of target."] + unlock { + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If:"] + #[doc = "- the referendum was cancelled, or"] + #[doc = "- the referendum is ongoing, or"] + #[doc = "- the referendum has ended such that"] + #[doc = " - the vote of the account was in opposition to the result; or"] + #[doc = " - there was no conviction to the account's vote; or"] + #[doc = " - the account made a split vote"] + #[doc = "...then the vote is removed cleanly and a following call to `unlock` may result in more"] + #[doc = "funds being available."] + #[doc = ""] + #[doc = "If, however, the referendum has ended and:"] + #[doc = "- it finished corresponding to the vote of the account, and"] + #[doc = "- the account made a standard vote with conviction, and"] + #[doc = "- the lock period of the conviction is not over"] + #[doc = "...then the lock will be aggregated into the overall account's lock, which may involve"] + #[doc = "*overlocking* (where the two locks are combined into a single lock that is the maximum"] + #[doc = "of both the amount locked and the time is it locked for)."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_, and the signer must have a vote"] + #[doc = "registered for referendum `index`."] + #[doc = ""] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + remove_vote { index: ::core::primitive::u32 }, + #[codec(index = 15)] + #[doc = "Remove a vote for a referendum."] + #[doc = ""] + #[doc = "If the `target` is equal to the signer, then this function is exactly equivalent to"] + #[doc = "`remove_vote`. If not equal to the signer, then the vote must have expired,"] + #[doc = "either because the referendum was cancelled, because the voter lost the referendum or"] + #[doc = "because the conviction period is over."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account of the vote to be removed; this account must have voted for"] + #[doc = " referendum `index`."] + #[doc = "- `index`: The index of referendum of the vote to be removed."] + #[doc = ""] + #[doc = "Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on."] + #[doc = " Weight is calculated for the maximum number of vote."] + remove_other_vote { + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + }, + #[codec(index = 16)] + #[doc = "Permanently place a proposal into the blacklist. This prevents it from ever being"] + #[doc = "proposed again."] + #[doc = ""] + #[doc = "If called on a queued public or external proposal, then this will result in it being"] + #[doc = "removed. If the `ref_index` supplied is an active referendum with the proposal hash,"] + #[doc = "then it will be cancelled."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `BlacklistOrigin`."] + #[doc = ""] + #[doc = "- `proposal_hash`: The proposal hash to blacklist permanently."] + #[doc = "- `ref_index`: An ongoing referendum whose hash is `proposal_hash`, which will be"] + #[doc = "cancelled."] + #[doc = ""] + #[doc = "Weight: `O(p)` (though as this is an high-privilege dispatch, we assume it has a"] + #[doc = " reasonable value)."] + blacklist { + proposal_hash: ::subxt_core::utils::H256, + maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 17)] + #[doc = "Remove a proposal."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be `CancelProposalOrigin`."] + #[doc = ""] + #[doc = "- `prop_index`: The index of the proposal to cancel."] + #[doc = ""] + #[doc = "Weight: `O(p)` where `p = PublicProps::::decode_len()`"] + cancel_proposal { + #[codec(compact)] + prop_index: ::core::primitive::u32, + }, + #[codec(index = 18)] + #[doc = "Set or clear a metadata of a proposal or a referendum."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `origin`: Must correspond to the `MetadataOwner`."] + #[doc = " - `ExternalOrigin` for an external proposal with the `SuperMajorityApprove`"] + #[doc = " threshold."] + #[doc = " - `ExternalDefaultOrigin` for an external proposal with the `SuperMajorityAgainst`"] + #[doc = " threshold."] + #[doc = " - `ExternalMajorityOrigin` for an external proposal with the `SimpleMajority`"] + #[doc = " threshold."] + #[doc = " - `Signed` by a creator for a public proposal."] + #[doc = " - `Signed` to clear a metadata for a finished referendum."] + #[doc = " - `Root` to set a metadata for an ongoing referendum."] + #[doc = "- `owner`: an identifier of a metadata owner."] + #[doc = "- `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata."] + set_metadata { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + maybe_hash: ::core::option::Option<::subxt_core::utils::H256>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Value too low"] + ValueLow, + #[codec(index = 1)] + #[doc = "Proposal does not exist"] + ProposalMissing, + #[codec(index = 2)] + #[doc = "Cannot cancel the same proposal twice"] + AlreadyCanceled, + #[codec(index = 3)] + #[doc = "Proposal already made"] + DuplicateProposal, + #[codec(index = 4)] + #[doc = "Proposal still blacklisted"] + ProposalBlacklisted, + #[codec(index = 5)] + #[doc = "Next external proposal not simple majority"] + NotSimpleMajority, + #[codec(index = 6)] + #[doc = "Invalid hash"] + InvalidHash, + #[codec(index = 7)] + #[doc = "No external proposal"] + NoProposal, + #[codec(index = 8)] + #[doc = "Identity may not veto a proposal twice"] + AlreadyVetoed, + #[codec(index = 9)] + #[doc = "Vote given for invalid referendum"] + ReferendumInvalid, + #[codec(index = 10)] + #[doc = "No proposals waiting"] + NoneWaiting, + #[codec(index = 11)] + #[doc = "The given account did not vote on the referendum."] + NotVoter, + #[codec(index = 12)] + #[doc = "The actor has no permission to conduct the action."] + NoPermission, + #[codec(index = 13)] + #[doc = "The account is already delegating."] + AlreadyDelegating, + #[codec(index = 14)] + #[doc = "Too high a balance was provided that the account cannot afford."] + InsufficientFunds, + #[codec(index = 15)] + #[doc = "The account is not currently delegating."] + NotDelegating, + #[codec(index = 16)] + #[doc = "The account currently has votes attached to it and the operation cannot succeed until"] + #[doc = "these are removed, either through `unvote` or `reap_vote`."] + VotesExist, + #[codec(index = 17)] + #[doc = "The instant referendum origin is currently disallowed."] + InstantNotAllowed, + #[codec(index = 18)] + #[doc = "Delegation to oneself makes no sense."] + Nonsense, + #[codec(index = 19)] + #[doc = "Invalid upper bound."] + WrongUpperBound, + #[codec(index = 20)] + #[doc = "Maximum number of votes reached."] + MaxVotesReached, + #[codec(index = 21)] + #[doc = "Maximum number of items reached."] + TooMany, + #[codec(index = 22)] + #[doc = "Voting period too low"] + VotingPeriodLow, + #[codec(index = 23)] + #[doc = "The preimage does not exist."] + PreimageNotExist, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A motion has been proposed by a public account."] + Proposed { + proposal_index: ::core::primitive::u32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "A public proposal has been tabled for referendum vote."] + Tabled { + proposal_index: ::core::primitive::u32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "An external proposal has been tabled."] + ExternalTabled, + #[codec(index = 3)] + #[doc = "A referendum has begun."] + Started { + ref_index: ::core::primitive::u32, + threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + }, + #[codec(index = 4)] + #[doc = "A proposal has been approved by referendum."] + Passed { ref_index: ::core::primitive::u32 }, + #[codec(index = 5)] + #[doc = "A proposal has been rejected by referendum."] + NotPassed { ref_index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "A referendum has been cancelled."] + Cancelled { ref_index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "An account has delegated their vote to another account."] + Delegated { + who: ::subxt_core::utils::AccountId32, + target: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "An account has cancelled a previous delegation operation."] + Undelegated { account: ::subxt_core::utils::AccountId32 }, + #[codec(index = 9)] + #[doc = "An external proposal has been vetoed."] + Vetoed { + who: ::subxt_core::utils::AccountId32, + proposal_hash: ::subxt_core::utils::H256, + until: ::core::primitive::u64, + }, + #[codec(index = 10)] + #[doc = "A proposal_hash has been blacklisted permanently."] + Blacklisted { proposal_hash: ::subxt_core::utils::H256 }, + #[codec(index = 11)] + #[doc = "An account has voted in a referendum"] + Voted { + voter: ::subxt_core::utils::AccountId32, + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, + >, + }, + #[codec(index = 12)] + #[doc = "An account has seconded a proposal"] + Seconded { + seconder: ::subxt_core::utils::AccountId32, + prop_index: ::core::primitive::u32, + }, + #[codec(index = 13)] + #[doc = "A proposal got canceled."] + ProposalCanceled { prop_index: ::core::primitive::u32 }, + #[codec(index = 14)] + #[doc = "Metadata for a proposal or a referendum has been set."] + MetadataSet { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt_core::utils::H256, + }, + #[codec(index = 15)] + #[doc = "Metadata for a proposal or a referendum has been cleared."] + MetadataCleared { + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt_core::utils::H256, + }, + #[codec(index = 16)] + #[doc = "Metadata has been transferred to new owner."] + MetadataTransferred { + prev_owner: runtime_types::pallet_democracy::types::MetadataOwner, + owner: runtime_types::pallet_democracy::types::MetadataOwner, + hash: ::subxt_core::utils::H256, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum MetadataOwner { + #[codec(index = 0)] + External, + #[codec(index = 1)] + Proposal(::core::primitive::u32), + #[codec(index = 2)] + Referendum(::core::primitive::u32), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ReferendumInfo<_0, _1, _2> { + #[codec(index = 0)] + Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), + #[codec(index = 1)] + Finished { approved: ::core::primitive::bool, end: _0 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal: _1, + pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { vote: runtime_types::pallet_democracy::vote::Vote, balance: _0 }, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Voting<_0, _1, _2> { + #[codec(index = 0)] + Direct { + votes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_democracy::vote::AccountVote<_0>, + )>, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + #[codec(index = 1)] + Delegating { + balance: _0, + target: _1, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + } + } + pub mod vote_threshold { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum VoteThreshold { + #[codec(index = 0)] + SuperMajorityApprove, + #[codec(index = 1)] + SuperMajorityAgainst, + #[codec(index = 2)] + SimpleMajority, + } + } + } + pub mod pallet_dynamic_fee { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + note_min_gas_price_target { target: runtime_types::primitive_types::U256 }, + } + } + } + pub mod pallet_election_provider_multi_phase { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + # [codec (index = 0)] # [doc = "Submit a solution for the unsigned phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __none__."] # [doc = ""] # [doc = "This submission is checked on the fly. Moreover, this unsigned solution is only"] # [doc = "validated when submitted to the pool from the **local** node. Effectively, this means"] # [doc = "that only active validators can submit this transaction when authoring a block (similar"] # [doc = "to an inherent)."] # [doc = ""] # [doc = "To prevent any incorrect solution (and thus wasted time/weight), this transaction will"] # [doc = "panic if the solution submitted by the validator is invalid in any way, effectively"] # [doc = "putting their authoring reward at risk."] # [doc = ""] # [doc = "No deposit or reward is associated with this submission."] submit_unsigned { raw_solution : :: subxt_core :: alloc :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: tangle_testnet_runtime :: NposSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] # [doc = "Set a new value for `MinimumUntrustedScore`."] # [doc = ""] # [doc = "Dispatch origin must be aligned with `T::ForceOrigin`."] # [doc = ""] # [doc = "This check can be turned off by setting the value to `None`."] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] # [doc = "Set a solution in the queue, to be handed out to the client of this pallet in the next"] # [doc = "call to `ElectionProvider::elect`."] # [doc = ""] # [doc = "This can only be set by `T::ForceOrigin`, and only when the phase is `Emergency`."] # [doc = ""] # [doc = "The solution is not checked for any feasibility and is assumed to be trustworthy, as any"] # [doc = "feasibility check itself can in principle cause the election process to fail (due to"] # [doc = "memory/weight constrains)."] set_emergency_election_result { supports : :: subxt_core :: alloc :: vec :: Vec < (:: subxt_core :: utils :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt_core :: utils :: AccountId32 > ,) > , } , # [codec (index = 3)] # [doc = "Submit a solution for the signed phase."] # [doc = ""] # [doc = "The dispatch origin fo this call must be __signed__."] # [doc = ""] # [doc = "The solution is potentially queued, based on the claimed score and processed at the end"] # [doc = "of the signed phase."] # [doc = ""] # [doc = "A deposit is reserved and recorded for the solution. Based on the outcome, the solution"] # [doc = "might be rewarded, slashed, or get all or a part of the deposit back."] submit { raw_solution : :: subxt_core :: alloc :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: tangle_testnet_runtime :: NposSolution16 > > , } , # [codec (index = 4)] # [doc = "Trigger the governance fallback."] # [doc = ""] # [doc = "This can only be called when [`Phase::Emergency`] is enabled, as an alternative to"] # [doc = "calling [`Call::set_emergency_election_result`]."] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Error of the pallet that can be returned in response to dispatches."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Submission was too early."] + PreDispatchEarlySubmission, + #[codec(index = 1)] + #[doc = "Wrong number of winners presented."] + PreDispatchWrongWinnerCount, + #[codec(index = 2)] + #[doc = "Submission was too weak, score-wise."] + PreDispatchWeakSubmission, + #[codec(index = 3)] + #[doc = "The queue was full, and the solution was not better than any of the existing ones."] + SignedQueueFull, + #[codec(index = 4)] + #[doc = "The origin failed to pay the deposit."] + SignedCannotPayDeposit, + #[codec(index = 5)] + #[doc = "Witness data to dispatchable is invalid."] + SignedInvalidWitness, + #[codec(index = 6)] + #[doc = "The signed submission consumes too much weight"] + SignedTooMuchWeight, + #[codec(index = 7)] + #[doc = "OCW submitted solution for wrong round"] + OcwCallWrongEra, + #[codec(index = 8)] + #[doc = "Snapshot metadata should exist but didn't."] + MissingSnapshotMetadata, + #[codec(index = 9)] + #[doc = "`Self::insert_submission` returned an invalid index."] + InvalidSubmissionIndex, + #[codec(index = 10)] + #[doc = "The call is not allowed at this point."] + CallNotAllowed, + #[codec(index = 11)] + #[doc = "The fallback failed"] + FallbackFailed, + #[codec(index = 12)] + #[doc = "Some bound not met"] + BoundNotMet, + #[codec(index = 13)] + #[doc = "Submitted solution has too many winners"] + TooManyWinners, + #[codec(index = 14)] + #[doc = "Submission was prepared for a different round."] + PreDispatchDifferentRound, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A solution was stored with the given compute."] + #[doc = ""] + #[doc = "The `origin` indicates the origin of the solution. If `origin` is `Some(AccountId)`,"] + #[doc = "the stored solution was submitted in the signed phase by a miner with the `AccountId`."] + #[doc = "Otherwise, the solution was stored either during the unsigned phase or by"] + #[doc = "`T::ForceOrigin`. The `bool` is `true` when a previous solution was ejected to make"] + #[doc = "room for this one."] + SolutionStored { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + origin: ::core::option::Option<::subxt_core::utils::AccountId32>, + prev_ejected: ::core::primitive::bool, + }, + #[codec(index = 1)] + #[doc = "The election has been finalized, with the given computation and score."] + ElectionFinalized { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + score: runtime_types::sp_npos_elections::ElectionScore, + }, + #[codec(index = 2)] + #[doc = "An election failed."] + #[doc = ""] + #[doc = "Not much can be said about which computes failed in the process."] + ElectionFailed, + #[codec(index = 3)] + #[doc = "An account has been rewarded for their signed submission being finalized."] + Rewarded { + account: ::subxt_core::utils::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "An account has been slashed for submitting an invalid signed submission."] + Slashed { + account: ::subxt_core::utils::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "There was a phase transition in a given round."] + PhaseTransitioned { + from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u64, + >, + to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u64, + >, + round: ::core::primitive::u32, + }, + } + } + pub mod signed { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SignedSubmission<_0, _1, _2> { + pub who: _0, + pub deposit: _1, + pub raw_solution: + runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, + pub call_fee: _1, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RawSolution<_0> { + pub solution: _0, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub round: ::core::primitive::u32, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ReadySolution { + pub supports: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::subxt_core::utils::AccountId32, + runtime_types::sp_npos_elections::Support<::subxt_core::utils::AccountId32>, + )>, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RoundSnapshot<_0, _1> { + pub voters: ::subxt_core::alloc::vec::Vec<_1>, + pub targets: ::subxt_core::alloc::vec::Vec<_0>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, + } + } + pub mod pallet_elections_phragmen { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Vote for a set of candidates for the upcoming round of election. This can be called to"] + #[doc = "set the initial votes, or update already existing votes."] + #[doc = ""] + #[doc = "Upon initial voting, `value` units of `who`'s balance is locked and a deposit amount is"] + #[doc = "reserved. The deposit is based on the number of votes and can be updated over time."] + #[doc = ""] + #[doc = "The `votes` should:"] + #[doc = " - not be empty."] + #[doc = " - be less than the number of possible candidates. Note that all current members and"] + #[doc = " runners-up are also automatically candidates for the next round."] + #[doc = ""] + #[doc = "If `value` is more than `who`'s free balance, then the maximum of the two is used."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "It is the responsibility of the caller to **NOT** place all of their balance into the"] + #[doc = "lock and keep some for further operations."] + vote { + votes: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "Remove `origin` as a voter."] + #[doc = ""] + #[doc = "This removes the lock and returns the deposit."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed and be a voter."] + remove_voter, + #[codec(index = 2)] + #[doc = "Submit oneself for candidacy. A fixed amount of deposit is recorded."] + #[doc = ""] + #[doc = "All candidates are wiped at the end of the term. They either become a member/runner-up,"] + #[doc = "or leave the system while their deposit is slashed."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed."] + #[doc = ""] + #[doc = "### Warning"] + #[doc = ""] + #[doc = "Even if a candidate ends up being a member, they must call [`Call::renounce_candidacy`]"] + #[doc = "to get their deposit back. Losing the spot in an election will always lead to a slash."] + #[doc = ""] + #[doc = "The number of current candidates must be provided as witness data."] + #[doc = "## Complexity"] + #[doc = "O(C + log(C)) where C is candidate_count."] + submit_candidacy { + #[codec(compact)] + candidate_count: ::core::primitive::u32, + }, + #[codec(index = 3)] + #[doc = "Renounce one's intention to be a candidate for the next election round. 3 potential"] + #[doc = "outcomes exist:"] + #[doc = ""] + #[doc = "- `origin` is a candidate and not elected in any set. In this case, the deposit is"] + #[doc = " unreserved, returned and origin is removed as a candidate."] + #[doc = "- `origin` is a current runner-up. In this case, the deposit is unreserved, returned and"] + #[doc = " origin is removed as a runner-up."] + #[doc = "- `origin` is a current member. In this case, the deposit is unreserved and origin is"] + #[doc = " removed as a member, consequently not being a candidate for the next round anymore."] + #[doc = " Similar to [`remove_member`](Self::remove_member), if replacement runners exists, they"] + #[doc = " are immediately used. If the prime is renouncing, then no prime will exist until the"] + #[doc = " next round."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed, and have one of the above roles."] + #[doc = "The type of renouncing must be provided as witness data."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = " - Renouncing::Candidate(count): O(count + log(count))"] + #[doc = " - Renouncing::Member: O(1)"] + #[doc = " - Renouncing::RunnerUp: O(1)"] + renounce_candidacy { + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + }, + #[codec(index = 4)] + #[doc = "Remove a particular member from the set. This is effective immediately and the bond of"] + #[doc = "the outgoing member is slashed."] + #[doc = ""] + #[doc = "If a runner-up is available, then the best runner-up will be removed and replaces the"] + #[doc = "outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is"] + #[doc = "started, else, nothing happens."] + #[doc = ""] + #[doc = "If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,"] + #[doc = "it is returned."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "Note that this does not affect the designated block number of the next election."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Check details of remove_and_replace_member() and do_phragmen()."] + remove_member { + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + slash_bond: ::core::primitive::bool, + rerun_election: ::core::primitive::bool, + }, + #[codec(index = 5)] + #[doc = "Clean all voters who are defunct (i.e. they do not serve any purpose at all). The"] + #[doc = "deposit of the removed voters are returned."] + #[doc = ""] + #[doc = "This is an root function to be used only for cleaning the state."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Check is_defunct_voter() details."] + clean_defunct_voters { + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Cannot vote when no candidates or members exist."] + UnableToVote, + #[codec(index = 1)] + #[doc = "Must vote for at least one candidate."] + NoVotes, + #[codec(index = 2)] + #[doc = "Cannot vote more than candidates."] + TooManyVotes, + #[codec(index = 3)] + #[doc = "Cannot vote more than maximum allowed."] + MaximumVotesExceeded, + #[codec(index = 4)] + #[doc = "Cannot vote with stake less than minimum balance."] + LowBalance, + #[codec(index = 5)] + #[doc = "Voter can not pay voting bond."] + UnableToPayBond, + #[codec(index = 6)] + #[doc = "Must be a voter."] + MustBeVoter, + #[codec(index = 7)] + #[doc = "Duplicated candidate submission."] + DuplicatedCandidate, + #[codec(index = 8)] + #[doc = "Too many candidates have been created."] + TooManyCandidates, + #[codec(index = 9)] + #[doc = "Member cannot re-submit candidacy."] + MemberSubmit, + #[codec(index = 10)] + #[doc = "Runner cannot re-submit candidacy."] + RunnerUpSubmit, + #[codec(index = 11)] + #[doc = "Candidate does not have enough funds."] + InsufficientCandidateFunds, + #[codec(index = 12)] + #[doc = "Not a member."] + NotMember, + #[codec(index = 13)] + #[doc = "The provided count of number of candidates is incorrect."] + InvalidWitnessData, + #[codec(index = 14)] + #[doc = "The provided count of number of votes is incorrect."] + InvalidVoteCount, + #[codec(index = 15)] + #[doc = "The renouncing origin presented a wrong `Renouncing` parameter."] + InvalidRenouncing, + #[codec(index = 16)] + #[doc = "Prediction regarding replacement after member removal is wrong."] + InvalidReplacement, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new term with new_members. This indicates that enough candidates existed to run"] + #[doc = "the election, not that enough have has been elected. The inner value must be examined"] + #[doc = "for this purpose. A `NewTerm(\\[\\])` indicates that some candidates got their bond"] + #[doc = "slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to"] + #[doc = "begin with."] + NewTerm { + new_members: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + )>, + }, + #[codec(index = 1)] + #[doc = "No (or not enough) candidates existed for this round. This is different from"] + #[doc = "`NewTerm(\\[\\])`. See the description of `NewTerm`."] + EmptyTerm, + #[codec(index = 2)] + #[doc = "Internal error happened while trying to perform election."] + ElectionError, + #[codec(index = 3)] + #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"] + #[doc = "`EmptyTerm`."] + MemberKicked { member: ::subxt_core::utils::AccountId32 }, + #[codec(index = 4)] + #[doc = "Someone has renounced their candidacy."] + Renounced { candidate: ::subxt_core::utils::AccountId32 }, + #[codec(index = 5)] + #[doc = "A candidate was slashed by amount due to failing to obtain a seat as member or"] + #[doc = "runner-up."] + #[doc = ""] + #[doc = "Note that old members and runners-up are also candidates."] + CandidateSlashed { + candidate: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."] + SeatHolderSlashed { + seat_holder: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Renouncing { + #[codec(index = 0)] + Member, + #[codec(index = 1)] + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::core::primitive::u32), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Voter<_0, _1> { + pub votes: ::subxt_core::alloc::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, + } + } + pub mod pallet_ethereum { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Transact an Ethereum transaction."] + transact { transaction: runtime_types::ethereum::transaction::TransactionV2 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Signature is invalid."] + InvalidSignature, + #[codec(index = 1)] + #[doc = "Pre-log is present, therefore transact is not allowed."] + PreLogExists, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "An ethereum transaction was successfully executed."] + Executed { + from: ::subxt_core::utils::H160, + to: ::subxt_core::utils::H160, + transaction_hash: ::subxt_core::utils::H256, + exit_reason: runtime_types::evm_core::error::ExitReason, + extra_data: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RawOrigin { + #[codec(index = 0)] + EthereumTransaction(::subxt_core::utils::H160), + } + } + pub mod pallet_evm { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Withdraw balance from EVM into currency/balances pallet."] + withdraw { address: ::subxt_core::utils::H160, value: ::core::primitive::u128 }, + #[codec(index = 1)] + #[doc = "Issue an EVM call operation. This is similar to a message call transaction in Ethereum."] + call { + source: ::subxt_core::utils::H160, + target: ::subxt_core::utils::H160, + input: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + value: runtime_types::primitive_types::U256, + gas_limit: ::core::primitive::u64, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: + ::core::option::Option, + nonce: ::core::option::Option, + access_list: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>, + }, + #[codec(index = 2)] + #[doc = "Issue an EVM create operation. This is similar to a contract creation transaction in"] + #[doc = "Ethereum."] + create { + source: ::subxt_core::utils::H160, + init: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + value: runtime_types::primitive_types::U256, + gas_limit: ::core::primitive::u64, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: + ::core::option::Option, + nonce: ::core::option::Option, + access_list: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>, + }, + #[codec(index = 3)] + #[doc = "Issue an EVM create2 operation."] + create2 { + source: ::subxt_core::utils::H160, + init: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + salt: ::subxt_core::utils::H256, + value: runtime_types::primitive_types::U256, + gas_limit: ::core::primitive::u64, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: + ::core::option::Option, + nonce: ::core::option::Option, + access_list: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::H160, + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + )>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Not enough balance to perform action"] + BalanceLow, + #[codec(index = 1)] + #[doc = "Calculating total fee overflowed"] + FeeOverflow, + #[codec(index = 2)] + #[doc = "Calculating total payment overflowed"] + PaymentOverflow, + #[codec(index = 3)] + #[doc = "Withdraw fee failed"] + WithdrawFailed, + #[codec(index = 4)] + #[doc = "Gas price is too low."] + GasPriceTooLow, + #[codec(index = 5)] + #[doc = "Nonce is invalid"] + InvalidNonce, + #[codec(index = 6)] + #[doc = "Gas limit is too low."] + GasLimitTooLow, + #[codec(index = 7)] + #[doc = "Gas limit is too high."] + GasLimitTooHigh, + #[codec(index = 8)] + #[doc = "The chain id is invalid."] + InvalidChainId, + #[codec(index = 9)] + #[doc = "the signature is invalid."] + InvalidSignature, + #[codec(index = 10)] + #[doc = "EVM reentrancy"] + Reentrancy, + #[codec(index = 11)] + #[doc = "EIP-3607,"] + TransactionMustComeFromEOA, + #[codec(index = 12)] + #[doc = "Undefined error."] + Undefined, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Ethereum events from contracts."] + Log { log: runtime_types::ethereum::log::Log }, + #[codec(index = 1)] + #[doc = "A contract has been created at given address."] + Created { address: ::subxt_core::utils::H160 }, + #[codec(index = 2)] + #[doc = "A contract was attempted to be created, but the execution failed."] + CreatedFailed { address: ::subxt_core::utils::H160 }, + #[codec(index = 3)] + #[doc = "A contract has been executed successfully with states applied."] + Executed { address: ::subxt_core::utils::H160 }, + #[codec(index = 4)] + #[doc = "A contract has been executed with errors. States are reverted with only gas fees applied."] + ExecutedFailed { address: ::subxt_core::utils::H160 }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CodeMetadata { + pub size: ::core::primitive::u64, + pub hash: ::subxt_core::utils::H256, + } + } + pub mod pallet_grandpa { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + report_equivocation { + equivocation_proof: ::subxt_core::alloc::boxed::Box< + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt_core::utils::H256, + ::core::primitive::u64, + >, + >, + key_owner_proof: runtime_types::sp_core::Void, + }, + #[codec(index = 1)] + #[doc = "Report voter equivocation/misbehavior. This method will verify the"] + #[doc = "equivocation proof and validate the given key ownership proof"] + #[doc = "against the extracted offender. If both are valid, the offence"] + #[doc = "will be reported."] + #[doc = ""] + #[doc = "This extrinsic must be called unsigned and it is expected that only"] + #[doc = "block authors will call it (validated in `ValidateUnsigned`), as such"] + #[doc = "if the block author is defined it will be defined as the equivocation"] + #[doc = "reporter."] + report_equivocation_unsigned { + equivocation_proof: ::subxt_core::alloc::boxed::Box< + runtime_types::sp_consensus_grandpa::EquivocationProof< + ::subxt_core::utils::H256, + ::core::primitive::u64, + >, + >, + key_owner_proof: runtime_types::sp_core::Void, + }, + #[codec(index = 2)] + #[doc = "Note that the current authority set of the GRANDPA finality gadget has stalled."] + #[doc = ""] + #[doc = "This will trigger a forced authority set change at the beginning of the next session, to"] + #[doc = "be enacted `delay` blocks after that. The `delay` should be high enough to safely assume"] + #[doc = "that the block signalling the forced change will not be re-orged e.g. 1000 blocks."] + #[doc = "The block production rate (which may be slowed down because of finality lagging) should"] + #[doc = "be taken into account when choosing the `delay`. The GRANDPA voters based on the new"] + #[doc = "authority will start voting on top of `best_finalized_block_number` for new finalized"] + #[doc = "blocks. `best_finalized_block_number` should be the highest of the latest finalized"] + #[doc = "block of all validators of the new authority set."] + #[doc = ""] + #[doc = "Only callable by root."] + note_stalled { + delay: ::core::primitive::u64, + best_finalized_block_number: ::core::primitive::u64, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Attempt to signal GRANDPA pause when the authority set isn't live"] + #[doc = "(either paused or already pending pause)."] + PauseFailed, + #[codec(index = 1)] + #[doc = "Attempt to signal GRANDPA resume when the authority set isn't paused"] + #[doc = "(either live or already pending resume)."] + ResumeFailed, + #[codec(index = 2)] + #[doc = "Attempt to signal GRANDPA change with one already pending."] + ChangePending, + #[codec(index = 3)] + #[doc = "Cannot signal forced change so soon after last."] + TooSoon, + #[codec(index = 4)] + #[doc = "A key ownership proof provided as part of an equivocation report is invalid."] + InvalidKeyOwnershipProof, + #[codec(index = 5)] + #[doc = "An equivocation proof provided as part of an equivocation report is invalid."] + InvalidEquivocationProof, + #[codec(index = 6)] + #[doc = "A given equivocation report is valid but already previously reported."] + DuplicateOffenceReport, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New authority set has been applied."] + NewAuthorities { + authority_set: ::subxt_core::alloc::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + }, + #[codec(index = 1)] + #[doc = "Current authority set has been paused."] + Paused, + #[codec(index = 2)] + #[doc = "Current authority set has been resumed."] + Resumed, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct StoredPendingChange<_0> { + pub scheduled_at: _0, + pub delay: _0, + pub next_authorities: + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, + _0, + )>, + pub forced: ::core::option::Option<_0>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum StoredState<_0> { + #[codec(index = 0)] + Live, + #[codec(index = 1)] + PendingPause { scheduled_at: _0, delay: _0 }, + #[codec(index = 2)] + Paused, + #[codec(index = 3)] + PendingResume { scheduled_at: _0, delay: _0 }, + } + } + pub mod pallet_hotfix_sufficients { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Increment `sufficients` for existing accounts having a nonzero `nonce` but zero `sufficients`, `consumers` and `providers` value."] + #[doc = "This state was caused by a previous bug in EVM create account dispatchable."] + #[doc = ""] + #[doc = "Any accounts in the input list not satisfying the above condition will remain unaffected."] + hotfix_inc_account_sufficients { + addresses: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H160>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Maximum address count exceeded"] + MaxAddressCountExceeded, + } + } + } + pub mod pallet_identity { + use super::runtime_types; + pub mod legacy { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct IdentityInfo { + pub additional: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::pallet_identity::types::Data, + runtime_types::pallet_identity::types::Data, + )>, + pub display: runtime_types::pallet_identity::types::Data, + pub legal: runtime_types::pallet_identity::types::Data, + pub web: runtime_types::pallet_identity::types::Data, + pub riot: runtime_types::pallet_identity::types::Data, + pub email: runtime_types::pallet_identity::types::Data, + pub pgp_fingerprint: ::core::option::Option<[::core::primitive::u8; 20usize]>, + pub image: runtime_types::pallet_identity::types::Data, + pub twitter: runtime_types::pallet_identity::types::Data, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Identity pallet declaration."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Add a registrar to the system."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be `T::RegistrarOrigin`."] + #[doc = ""] + #[doc = "- `account`: the account of the registrar."] + #[doc = ""] + #[doc = "Emits `RegistrarAdded` if successful."] + add_registrar { + account: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 1)] + #[doc = "Set an account's identity information and reserve the appropriate deposit."] + #[doc = ""] + #[doc = "If the account already has identity information, the deposit is taken as part payment"] + #[doc = "for the new deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `info`: The identity information."] + #[doc = ""] + #[doc = "Emits `IdentitySet` if successful."] + set_identity { + info: ::subxt_core::alloc::boxed::Box< + runtime_types::pallet_identity::legacy::IdentityInfo, + >, + }, + #[codec(index = 2)] + #[doc = "Set the sub-accounts of the sender."] + #[doc = ""] + #[doc = "Payment: Any aggregate balance reserved by previous `set_subs` calls will be returned"] + #[doc = "and an amount `SubAccountDeposit` will be reserved for each item in `subs`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "- `subs`: The identity's (new) sub-accounts."] + set_subs { + subs: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + }, + #[codec(index = 3)] + #[doc = "Clear an account's identity info and all sub-accounts and return all deposits."] + #[doc = ""] + #[doc = "Payment: All reserved balances on the account are returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "identity."] + #[doc = ""] + #[doc = "Emits `IdentityCleared` if successful."] + clear_identity, + #[codec(index = 4)] + #[doc = "Request a judgement from a registrar."] + #[doc = ""] + #[doc = "Payment: At most `max_fee` will be reserved for payment to the registrar if judgement"] + #[doc = "given."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is requested."] + #[doc = "- `max_fee`: The maximum fee that may be paid. This should just be auto-populated as:"] + #[doc = ""] + #[doc = "```nocompile"] + #[doc = "Self::registrars().get(reg_index).unwrap().fee"] + #[doc = "```"] + #[doc = ""] + #[doc = "Emits `JudgementRequested` if successful."] + request_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + #[codec(compact)] + max_fee: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "Cancel a previous request."] + #[doc = ""] + #[doc = "Payment: A previously reserved deposit is returned on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a"] + #[doc = "registered identity."] + #[doc = ""] + #[doc = "- `reg_index`: The index of the registrar whose judgement is no longer requested."] + #[doc = ""] + #[doc = "Emits `JudgementUnrequested` if successful."] + cancel_request { reg_index: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "Set the fee required for a judgement to be requested from a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fee`: the new fee."] + set_fee { + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "Change the account associated with a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `new`: the new account ID."] + set_account_id { + #[codec(compact)] + index: ::core::primitive::u32, + new: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 8)] + #[doc = "Set the field information for a registrar."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `index`."] + #[doc = ""] + #[doc = "- `index`: the index of the registrar whose fee is to be set."] + #[doc = "- `fields`: the fields that the registrar concerns themselves with."] + set_fields { + #[codec(compact)] + index: ::core::primitive::u32, + fields: ::core::primitive::u64, + }, + #[codec(index = 9)] + #[doc = "Provide a judgement for an account's identity."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must be the account"] + #[doc = "of the registrar whose index is `reg_index`."] + #[doc = ""] + #[doc = "- `reg_index`: the index of the registrar whose judgement is being made."] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = "- `judgement`: the judgement of the registrar of index `reg_index` about `target`."] + #[doc = "- `identity`: The hash of the [`IdentityInformationProvider`] for that the judgement is"] + #[doc = " provided."] + #[doc = ""] + #[doc = "Note: Judgements do not apply to a username."] + #[doc = ""] + #[doc = "Emits `JudgementGiven` if successful."] + provide_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, + >, + identity: ::subxt_core::utils::H256, + }, + #[codec(index = 10)] + #[doc = "Remove an account's identity and sub-account information and slash the deposits."] + #[doc = ""] + #[doc = "Payment: Reserved balances from `set_subs` and `set_identity` are slashed and handled by"] + #[doc = "`Slash`. Verification request deposits are not returned; they should be cancelled"] + #[doc = "manually using `cancel_request`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must match `T::ForceOrigin`."] + #[doc = ""] + #[doc = "- `target`: the account whose identity the judgement is upon. This must be an account"] + #[doc = " with a registered identity."] + #[doc = ""] + #[doc = "Emits `IdentityKilled` if successful."] + kill_identity { + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 11)] + #[doc = "Add the given account to the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + add_sub { + sub: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 12)] + #[doc = "Alter the associated name of the given sub-account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + rename_sub { + sub: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 13)] + #[doc = "Remove the given account from the sender's subs."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "sub identity of `sub`."] + remove_sub { + sub: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + #[doc = "Remove the sender as a sub-account."] + #[doc = ""] + #[doc = "Payment: Balance reserved by a previous `set_subs` call for one sub will be repatriated"] + #[doc = "to the sender (*not* the original depositor)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have a registered"] + #[doc = "super-identity."] + #[doc = ""] + #[doc = "NOTE: This should not normally be used, but is provided in the case that the non-"] + #[doc = "controller of an account is maliciously registered as a sub-account."] + quit_sub, + #[codec(index = 15)] + #[doc = "Add an `AccountId` with permission to grant usernames with a given `suffix` appended."] + #[doc = ""] + #[doc = "The authority can grant up to `allocation` usernames. To top up their allocation, they"] + #[doc = "should just issue (or request via governance) a new `add_username_authority` call."] + add_username_authority { + authority: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + suffix: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + allocation: ::core::primitive::u32, + }, + #[codec(index = 16)] + #[doc = "Remove `authority` from the username authorities."] + remove_username_authority { + authority: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 17)] + #[doc = "Set the username for `who`. Must be called by a username authority."] + #[doc = ""] + #[doc = "The authority must have an `allocation`. Users can either pre-sign their usernames or"] + #[doc = "accept them later."] + #[doc = ""] + #[doc = "Usernames must:"] + #[doc = " - Only contain lowercase ASCII characters or digits."] + #[doc = " - When combined with the suffix of the issuing authority be _less than_ the"] + #[doc = " `MaxUsernameLength`."] + set_username_for { + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + username: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + signature: + ::core::option::Option, + }, + #[codec(index = 18)] + #[doc = "Accept a given username that an `authority` granted. The call must include the full"] + #[doc = "username, as in `username.suffix`."] + accept_username { + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 19)] + #[doc = "Remove an expired username approval. The username was approved by an authority but never"] + #[doc = "accepted by the user and must now be beyond its expiration. The call must include the"] + #[doc = "full username, as in `username.suffix`."] + remove_expired_approval { + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 20)] + #[doc = "Set a given username as the primary. The username should include the suffix."] + set_primary_username { + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 21)] + #[doc = "Remove a username that corresponds to an account with no identity. Exists when a user"] + #[doc = "gets a username but then calls `clear_identity`."] + remove_dangling_username { + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Too many subs-accounts."] + TooManySubAccounts, + #[codec(index = 1)] + #[doc = "Account isn't found."] + NotFound, + #[codec(index = 2)] + #[doc = "Account isn't named."] + NotNamed, + #[codec(index = 3)] + #[doc = "Empty index."] + EmptyIndex, + #[codec(index = 4)] + #[doc = "Fee is changed."] + FeeChanged, + #[codec(index = 5)] + #[doc = "No identity found."] + NoIdentity, + #[codec(index = 6)] + #[doc = "Sticky judgement."] + StickyJudgement, + #[codec(index = 7)] + #[doc = "Judgement given."] + JudgementGiven, + #[codec(index = 8)] + #[doc = "Invalid judgement."] + InvalidJudgement, + #[codec(index = 9)] + #[doc = "The index is invalid."] + InvalidIndex, + #[codec(index = 10)] + #[doc = "The target is invalid."] + InvalidTarget, + #[codec(index = 11)] + #[doc = "Maximum amount of registrars reached. Cannot add any more."] + TooManyRegistrars, + #[codec(index = 12)] + #[doc = "Account ID is already named."] + AlreadyClaimed, + #[codec(index = 13)] + #[doc = "Sender is not a sub-account."] + NotSub, + #[codec(index = 14)] + #[doc = "Sub-account isn't owned by sender."] + NotOwned, + #[codec(index = 15)] + #[doc = "The provided judgement was for a different identity."] + JudgementForDifferentIdentity, + #[codec(index = 16)] + #[doc = "Error that occurs when there is an issue paying for judgement."] + JudgementPaymentFailed, + #[codec(index = 17)] + #[doc = "The provided suffix is too long."] + InvalidSuffix, + #[codec(index = 18)] + #[doc = "The sender does not have permission to issue a username."] + NotUsernameAuthority, + #[codec(index = 19)] + #[doc = "The authority cannot allocate any more usernames."] + NoAllocation, + #[codec(index = 20)] + #[doc = "The signature on a username was not valid."] + InvalidSignature, + #[codec(index = 21)] + #[doc = "Setting this username requires a signature, but none was provided."] + RequiresSignature, + #[codec(index = 22)] + #[doc = "The username does not meet the requirements."] + InvalidUsername, + #[codec(index = 23)] + #[doc = "The username is already taken."] + UsernameTaken, + #[codec(index = 24)] + #[doc = "The requested username does not exist."] + NoUsername, + #[codec(index = 25)] + #[doc = "The username cannot be forcefully removed because it can still be accepted."] + NotExpired, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A name was set or reset (which will remove all judgements)."] + IdentitySet { who: ::subxt_core::utils::AccountId32 }, + #[codec(index = 1)] + #[doc = "A name was cleared, and the given balance returned."] + IdentityCleared { + who: ::subxt_core::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "A name was removed and the given balance slashed."] + IdentityKilled { + who: ::subxt_core::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A judgement was asked from a registrar."] + JudgementRequested { + who: ::subxt_core::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A judgement request was retracted."] + JudgementUnrequested { + who: ::subxt_core::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "A judgement was given by a registrar."] + JudgementGiven { + target: ::subxt_core::utils::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "A registrar was added."] + RegistrarAdded { registrar_index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "A sub-identity was added to an identity and the deposit paid."] + SubIdentityAdded { + sub: ::subxt_core::utils::AccountId32, + main: ::subxt_core::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "A sub-identity was removed from an identity and the deposit freed."] + SubIdentityRemoved { + sub: ::subxt_core::utils::AccountId32, + main: ::subxt_core::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "A sub-identity was cleared, and the given deposit repatriated from the"] + #[doc = "main identity account to the sub-identity account."] + SubIdentityRevoked { + sub: ::subxt_core::utils::AccountId32, + main: ::subxt_core::utils::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "A username authority was added."] + AuthorityAdded { authority: ::subxt_core::utils::AccountId32 }, + #[codec(index = 11)] + #[doc = "A username authority was removed."] + AuthorityRemoved { authority: ::subxt_core::utils::AccountId32 }, + #[codec(index = 12)] + #[doc = "A username was set for `who`."] + UsernameSet { + who: ::subxt_core::utils::AccountId32, + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 13)] + #[doc = "A username was queued, but `who` must accept it prior to `expiration`."] + UsernameQueued { + who: ::subxt_core::utils::AccountId32, + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + expiration: ::core::primitive::u64, + }, + #[codec(index = 14)] + #[doc = "A queued username passed its expiration without being claimed and was removed."] + PreapprovalExpired { whose: ::subxt_core::utils::AccountId32 }, + #[codec(index = 15)] + #[doc = "A username was set as a primary and can be looked up from `who`."] + PrimaryUsernameSet { + who: ::subxt_core::utils::AccountId32, + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + #[codec(index = 16)] + #[doc = "A dangling username (as in, a username corresponding to an account that has removed its"] + #[doc = "identity) has been removed."] + DanglingUsernameRemoved { + who: ::subxt_core::utils::AccountId32, + username: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct AuthorityProperties<_0> { + pub suffix: _0, + pub allocation: ::core::primitive::u32, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Data { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Raw0([::core::primitive::u8; 0usize]), + #[codec(index = 2)] + Raw1([::core::primitive::u8; 1usize]), + #[codec(index = 3)] + Raw2([::core::primitive::u8; 2usize]), + #[codec(index = 4)] + Raw3([::core::primitive::u8; 3usize]), + #[codec(index = 5)] + Raw4([::core::primitive::u8; 4usize]), + #[codec(index = 6)] + Raw5([::core::primitive::u8; 5usize]), + #[codec(index = 7)] + Raw6([::core::primitive::u8; 6usize]), + #[codec(index = 8)] + Raw7([::core::primitive::u8; 7usize]), + #[codec(index = 9)] + Raw8([::core::primitive::u8; 8usize]), + #[codec(index = 10)] + Raw9([::core::primitive::u8; 9usize]), + #[codec(index = 11)] + Raw10([::core::primitive::u8; 10usize]), + #[codec(index = 12)] + Raw11([::core::primitive::u8; 11usize]), + #[codec(index = 13)] + Raw12([::core::primitive::u8; 12usize]), + #[codec(index = 14)] + Raw13([::core::primitive::u8; 13usize]), + #[codec(index = 15)] + Raw14([::core::primitive::u8; 14usize]), + #[codec(index = 16)] + Raw15([::core::primitive::u8; 15usize]), + #[codec(index = 17)] + Raw16([::core::primitive::u8; 16usize]), + #[codec(index = 18)] + Raw17([::core::primitive::u8; 17usize]), + #[codec(index = 19)] + Raw18([::core::primitive::u8; 18usize]), + #[codec(index = 20)] + Raw19([::core::primitive::u8; 19usize]), + #[codec(index = 21)] + Raw20([::core::primitive::u8; 20usize]), + #[codec(index = 22)] + Raw21([::core::primitive::u8; 21usize]), + #[codec(index = 23)] + Raw22([::core::primitive::u8; 22usize]), + #[codec(index = 24)] + Raw23([::core::primitive::u8; 23usize]), + #[codec(index = 25)] + Raw24([::core::primitive::u8; 24usize]), + #[codec(index = 26)] + Raw25([::core::primitive::u8; 25usize]), + #[codec(index = 27)] + Raw26([::core::primitive::u8; 26usize]), + #[codec(index = 28)] + Raw27([::core::primitive::u8; 27usize]), + #[codec(index = 29)] + Raw28([::core::primitive::u8; 28usize]), + #[codec(index = 30)] + Raw29([::core::primitive::u8; 29usize]), + #[codec(index = 31)] + Raw30([::core::primitive::u8; 30usize]), + #[codec(index = 32)] + Raw31([::core::primitive::u8; 31usize]), + #[codec(index = 33)] + Raw32([::core::primitive::u8; 32usize]), + #[codec(index = 34)] + BlakeTwo256([::core::primitive::u8; 32usize]), + #[codec(index = 35)] + Sha256([::core::primitive::u8; 32usize]), + #[codec(index = 36)] + Keccak256([::core::primitive::u8; 32usize]), + #[codec(index = 37)] + ShaThree256([::core::primitive::u8; 32usize]), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Judgement<_0> { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + FeePaid(_0), + #[codec(index = 2)] + Reasonable, + #[codec(index = 3)] + KnownGood, + #[codec(index = 4)] + OutOfDate, + #[codec(index = 5)] + LowQuality, + #[codec(index = 6)] + Erroneous, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RegistrarInfo<_0, _1, _2> { + pub account: _1, + pub fee: _0, + pub fields: _2, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Registration<_0, _2> { + pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_identity::types::Judgement<_0>, + )>, + pub deposit: _0, + pub info: _2, + } + } + } + pub mod pallet_im_online { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "## Complexity:"] + #[doc = "- `O(K)` where K is length of `Keys` (heartbeat.validators_len)"] + #[doc = " - `O(K)`: decoding of length `K`"] + heartbeat { + heartbeat: + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u64>, + signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Non existent public key."] + InvalidKey, + #[codec(index = 1)] + #[doc = "Duplicated heartbeat."] + DuplicatedHeartbeat, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new heartbeat was received from `AuthorityId`."] + HeartbeatReceived { + authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, + #[codec(index = 1)] + #[doc = "At the end of the session, no offence was committed."] + AllGood, + #[codec(index = 2)] + #[doc = "At the end of the session, at least one validator was found to be offline."] + SomeOffline { + offline: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::utils::AccountId32, + runtime_types::sp_staking::Exposure< + ::subxt_core::utils::AccountId32, + ::core::primitive::u128, + >, + )>, + }, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod app_sr25519 { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Heartbeat<_0> { + pub block_number: _0, + pub session_index: ::core::primitive::u32, + pub authority_index: ::core::primitive::u32, + pub validators_len: ::core::primitive::u32, + } + } + pub mod pallet_indices { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Assign an previously unassigned index."] + #[doc = ""] + #[doc = "Payment: `Deposit` is reserved from the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be claimed. This must not be in use."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + claim { index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "Assign an index already owned by the sender to another account. The balance reservation"] + #[doc = "is effectively transferred to the new account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `index`: the index to be re-assigned. This must be owned by the sender."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + transfer { + new: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + #[doc = "Free up an index owned by the sender."] + #[doc = ""] + #[doc = "Payment: Any previous deposit placed for the index is unreserved in the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must own the index."] + #[doc = ""] + #[doc = "- `index`: the index to be freed. This must be owned by the sender."] + #[doc = ""] + #[doc = "Emits `IndexFreed` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + free { index: ::core::primitive::u32 }, + #[codec(index = 3)] + #[doc = "Force an index to an account. This doesn't require a deposit. If the index is already"] + #[doc = "held, then any deposit is reimbursed to its current owner."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `index`: the index to be (re-)assigned."] + #[doc = "- `new`: the new owner of the index. This function is a no-op if it is equal to sender."] + #[doc = "- `freeze`: if set to `true`, will freeze the index so it cannot be transferred."] + #[doc = ""] + #[doc = "Emits `IndexAssigned` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + force_transfer { + new: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + index: ::core::primitive::u32, + freeze: ::core::primitive::bool, + }, + #[codec(index = 4)] + #[doc = "Freeze an index so it will always point to the sender account. This consumes the"] + #[doc = "deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must have a"] + #[doc = "non-frozen account `index`."] + #[doc = ""] + #[doc = "- `index`: the index to be frozen in place."] + #[doc = ""] + #[doc = "Emits `IndexFrozen` if successful."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + freeze { index: ::core::primitive::u32 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The index was not already assigned."] + NotAssigned, + #[codec(index = 1)] + #[doc = "The index is assigned to another account."] + NotOwner, + #[codec(index = 2)] + #[doc = "The index was not available."] + InUse, + #[codec(index = 3)] + #[doc = "The source and destination accounts are identical."] + NotTransfer, + #[codec(index = 4)] + #[doc = "The index is permanent and may not be freed/changed."] + Permanent, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A account index was assigned."] + IndexAssigned { + who: ::subxt_core::utils::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A account index has been freed up (unassigned)."] + IndexFreed { index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "A account index has been frozen to its current account ID."] + IndexFrozen { + index: ::core::primitive::u32, + who: ::subxt_core::utils::AccountId32, + }, + } + } + } + pub mod pallet_multi_asset_delegation { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The callable functions (extrinsics) of the pallet."] + pub enum Call { + # [codec (index = 0)] # [doc = "Allows an account to join as an operator by providing a stake."] join_operators { bond_amount : :: core :: primitive :: u128 , } , # [codec (index = 1)] # [doc = "Schedules an operator to leave."] schedule_leave_operators , # [codec (index = 2)] # [doc = "Cancels a scheduled leave for an operator."] cancel_leave_operators , # [codec (index = 3)] # [doc = "Executes a scheduled leave for an operator."] execute_leave_operators , # [codec (index = 4)] # [doc = "Allows an operator to increase their stake."] operator_bond_more { additional_bond : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "Schedules an operator to decrease their stake."] schedule_operator_unstake { unstake_amount : :: core :: primitive :: u128 , } , # [codec (index = 6)] # [doc = "Executes a scheduled stake decrease for an operator."] execute_operator_unstake , # [codec (index = 7)] # [doc = "Cancels a scheduled stake decrease for an operator."] cancel_operator_unstake , # [codec (index = 8)] # [doc = "Allows an operator to go offline."] go_offline , # [codec (index = 9)] # [doc = "Allows an operator to go online."] go_online , # [codec (index = 10)] # [doc = "Allows a user to deposit an asset."] deposit { asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , amount : :: core :: primitive :: u128 , evm_address : :: core :: option :: Option < :: subxt_core :: utils :: H160 > , } , # [codec (index = 11)] # [doc = "Schedules an withdraw request."] schedule_withdraw { asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , amount : :: core :: primitive :: u128 , } , # [codec (index = 12)] # [doc = "Executes a scheduled withdraw request."] execute_withdraw { evm_address : :: core :: option :: Option < :: subxt_core :: utils :: H160 > , } , # [codec (index = 13)] # [doc = "Cancels a scheduled withdraw request."] cancel_withdraw { asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , amount : :: core :: primitive :: u128 , } , # [codec (index = 14)] # [doc = "Allows a user to delegate an amount of an asset to an operator."] delegate { operator : :: subxt_core :: utils :: AccountId32 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , amount : :: core :: primitive :: u128 , blueprint_selection : runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: DelegatorBlueprintSelection < runtime_types :: tangle_testnet_runtime :: MaxDelegatorBlueprints > , } , # [codec (index = 15)] # [doc = "Schedules a request to reduce a delegator's stake."] schedule_delegator_unstake { operator : :: subxt_core :: utils :: AccountId32 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , amount : :: core :: primitive :: u128 , } , # [codec (index = 16)] # [doc = "Executes a scheduled request to reduce a delegator's stake."] execute_delegator_unstake , # [codec (index = 17)] # [doc = "Cancels a scheduled request to reduce a delegator's stake."] cancel_delegator_unstake { operator : :: subxt_core :: utils :: AccountId32 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , amount : :: core :: primitive :: u128 , } , # [codec (index = 18)] # [doc = "Sets the APY and cap for a specific asset."] # [doc = "The APY is the annual percentage yield that the asset will earn."] # [doc = "The cap is the amount of assets required to be deposited to distribute the entire APY."] # [doc = "The APY is capped at 10% and will require runtime upgrade to change."] # [doc = ""] # [doc = "While the cap is not met, the APY distributed will be `amount_deposited / cap * APY`."] set_incentive_apy_and_cap { vault_id : :: core :: primitive :: u128 , apy : runtime_types :: sp_arithmetic :: per_things :: Percent , cap : :: core :: primitive :: u128 , } , # [codec (index = 19)] # [doc = "Whitelists a blueprint for rewards."] whitelist_blueprint_for_rewards { blueprint_id : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "Manage asset id to vault rewards"] manage_asset_in_vault { vault_id : :: core :: primitive :: u128 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , action : runtime_types :: pallet_multi_asset_delegation :: types :: rewards :: AssetAction , } , # [codec (index = 22)] # [doc = "Adds a blueprint ID to a delegator's selection."] add_blueprint_id { blueprint_id : :: core :: primitive :: u64 , } , # [codec (index = 23)] # [doc = "Removes a blueprint ID from a delegator's selection."] remove_blueprint_id { blueprint_id : :: core :: primitive :: u64 , } , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Errors emitted by the pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The account is already an operator."] + AlreadyOperator, + #[codec(index = 1)] + #[doc = "The stake amount is too low."] + BondTooLow, + #[codec(index = 2)] + #[doc = "The account is not an operator."] + NotAnOperator, + #[codec(index = 3)] + #[doc = "The account cannot exit."] + CannotExit, + #[codec(index = 4)] + #[doc = "The operator is already leaving."] + AlreadyLeaving, + #[codec(index = 5)] + #[doc = "The account is not leaving as an operator."] + NotLeavingOperator, + #[codec(index = 6)] + #[doc = "The round does not match the scheduled leave round."] + NotLeavingRound, + #[codec(index = 7)] + #[doc = "Leaving round not reached"] + LeavingRoundNotReached, + #[codec(index = 8)] + #[doc = "There is no scheduled unstake request."] + NoScheduledBondLess, + #[codec(index = 9)] + #[doc = "The unstake request is not satisfied."] + BondLessRequestNotSatisfied, + #[codec(index = 10)] + #[doc = "The operator is not active."] + NotActiveOperator, + #[codec(index = 11)] + #[doc = "The operator is not offline."] + NotOfflineOperator, + #[codec(index = 12)] + #[doc = "The account is already a delegator."] + AlreadyDelegator, + #[codec(index = 13)] + #[doc = "The account is not a delegator."] + NotDelegator, + #[codec(index = 14)] + #[doc = "A withdraw request already exists."] + WithdrawRequestAlreadyExists, + #[codec(index = 15)] + #[doc = "The account has insufficient balance."] + InsufficientBalance, + #[codec(index = 16)] + #[doc = "There is no withdraw request."] + NoWithdrawRequest, + #[codec(index = 17)] + #[doc = "There is no unstake request."] + NoBondLessRequest, + #[codec(index = 18)] + #[doc = "The unstake request is not ready."] + BondLessNotReady, + #[codec(index = 19)] + #[doc = "A unstake request already exists."] + BondLessRequestAlreadyExists, + #[codec(index = 20)] + #[doc = "There are active services using the asset."] + ActiveServicesUsingAsset, + #[codec(index = 21)] + #[doc = "There is not active delegation"] + NoActiveDelegation, + #[codec(index = 22)] + #[doc = "The asset is not whitelisted"] + AssetNotWhitelisted, + #[codec(index = 23)] + #[doc = "The origin is not authorized to perform this action"] + NotAuthorized, + #[codec(index = 24)] + #[doc = "Maximum number of blueprints exceeded"] + MaxBlueprintsExceeded, + #[codec(index = 25)] + #[doc = "The asset ID is not found"] + AssetNotFound, + #[codec(index = 26)] + #[doc = "The blueprint ID is already whitelisted"] + BlueprintAlreadyWhitelisted, + #[codec(index = 27)] + #[doc = "No withdraw requests found"] + NowithdrawRequests, + #[codec(index = 28)] + #[doc = "No matching withdraw reqests found"] + NoMatchingwithdrawRequest, + #[codec(index = 29)] + #[doc = "Asset already exists in a reward vault"] + AssetAlreadyInVault, + #[codec(index = 30)] + #[doc = "Asset not found in reward vault"] + AssetNotInVault, + #[codec(index = 31)] + #[doc = "The reward vault does not exist"] + VaultNotFound, + #[codec(index = 32)] + #[doc = "Error returned when trying to add a blueprint ID that already exists."] + DuplicateBlueprintId, + #[codec(index = 33)] + #[doc = "Error returned when trying to remove a blueprint ID that doesn't exist."] + BlueprintIdNotFound, + #[codec(index = 34)] + #[doc = "Error returned when trying to add/remove blueprint IDs while not in Fixed mode."] + NotInFixedMode, + #[codec(index = 35)] + #[doc = "Error returned when the maximum number of delegations is exceeded."] + MaxDelegationsExceeded, + #[codec(index = 36)] + #[doc = "Error returned when the maximum number of unstake requests is exceeded."] + MaxUnstakeRequestsExceeded, + #[codec(index = 37)] + #[doc = "Error returned when the maximum number of withdraw requests is exceeded."] + MaxWithdrawRequestsExceeded, + #[codec(index = 38)] + #[doc = "Deposit amount overflow"] + DepositOverflow, + #[codec(index = 39)] + #[doc = "Unstake underflow"] + UnstakeAmountTooLarge, + #[codec(index = 40)] + #[doc = "Overflow while adding stake"] + StakeOverflow, + #[codec(index = 41)] + #[doc = "Underflow while reducing stake"] + InsufficientStakeRemaining, + #[codec(index = 42)] + #[doc = "APY exceeds maximum allowed by the extrinsic"] + APYExceedsMaximum, + #[codec(index = 43)] + #[doc = "Cap cannot be zero"] + CapCannotBeZero, + #[codec(index = 44)] + #[doc = "Cap exceeds total supply of asset"] + CapExceedsTotalSupply, + #[codec(index = 45)] + #[doc = "An unstake request is already pending"] + PendingUnstakeRequestExists, + #[codec(index = 46)] + #[doc = "The blueprint is not selected"] + BlueprintNotSelected, + #[codec(index = 47)] + #[doc = "Erc20 transfer failed"] + ERC20TransferFailed, + #[codec(index = 48)] + #[doc = "EVM encode error"] + EVMAbiEncode, + #[codec(index = 49)] + #[doc = "EVM decode error"] + EVMAbiDecode, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Events emitted by the pallet."] + pub enum Event { + # [codec (index = 0)] # [doc = "An operator has joined."] OperatorJoined { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 1)] # [doc = "An operator has scheduled to leave."] OperatorLeavingScheduled { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 2)] # [doc = "An operator has cancelled their leave request."] OperatorLeaveCancelled { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 3)] # [doc = "An operator has executed their leave request."] OperatorLeaveExecuted { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 4)] # [doc = "An operator has increased their stake."] OperatorBondMore { who : :: subxt_core :: utils :: AccountId32 , additional_bond : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "An operator has scheduled to decrease their stake."] OperatorBondLessScheduled { who : :: subxt_core :: utils :: AccountId32 , unstake_amount : :: core :: primitive :: u128 , } , # [codec (index = 6)] # [doc = "An operator has executed their stake decrease."] OperatorBondLessExecuted { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 7)] # [doc = "An operator has cancelled their stake decrease request."] OperatorBondLessCancelled { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 8)] # [doc = "An operator has gone offline."] OperatorWentOffline { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 9)] # [doc = "An operator has gone online."] OperatorWentOnline { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 10)] # [doc = "A deposit has been made."] Deposited { who : :: subxt_core :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , } , # [codec (index = 11)] # [doc = "An withdraw has been scheduled."] Scheduledwithdraw { who : :: subxt_core :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , } , # [codec (index = 12)] # [doc = "An withdraw has been executed."] Executedwithdraw { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 13)] # [doc = "An withdraw has been cancelled."] Cancelledwithdraw { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 14)] # [doc = "A delegation has been made."] Delegated { who : :: subxt_core :: utils :: AccountId32 , operator : :: subxt_core :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , } , # [codec (index = 15)] # [doc = "A delegator unstake request has been scheduled."] ScheduledDelegatorBondLess { who : :: subxt_core :: utils :: AccountId32 , operator : :: subxt_core :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , } , # [codec (index = 16)] # [doc = "A delegator unstake request has been executed."] ExecutedDelegatorBondLess { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 17)] # [doc = "A delegator unstake request has been cancelled."] CancelledDelegatorBondLess { who : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 18)] # [doc = "Event emitted when an incentive APY and cap are set for a reward vault"] IncentiveAPYAndCapSet { vault_id : :: core :: primitive :: u128 , apy : runtime_types :: sp_arithmetic :: per_things :: Percent , cap : :: core :: primitive :: u128 , } , # [codec (index = 19)] # [doc = "Event emitted when a blueprint is whitelisted for rewards"] BlueprintWhitelisted { blueprint_id : :: core :: primitive :: u32 , } , # [codec (index = 20)] # [doc = "Asset has been updated to reward vault"] AssetUpdatedInVault { who : :: subxt_core :: utils :: AccountId32 , vault_id : :: core :: primitive :: u128 , asset_id : runtime_types :: tangle_primitives :: services :: Asset < :: core :: primitive :: u128 > , action : runtime_types :: pallet_multi_asset_delegation :: types :: rewards :: AssetAction , } , # [codec (index = 21)] # [doc = "Operator has been slashed"] OperatorSlashed { who : :: subxt_core :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 22)] # [doc = "Delegator has been slashed"] DelegatorSlashed { who : :: subxt_core :: utils :: AccountId32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 23)] # [doc = "EVM execution reverted with a reason."] EvmReverted { from : :: subxt_core :: utils :: H160 , to : :: subxt_core :: utils :: H160 , data : :: subxt_core :: alloc :: vec :: Vec < :: core :: primitive :: u8 > , reason : :: subxt_core :: alloc :: vec :: Vec < :: core :: primitive :: u8 > , } , } + } + pub mod types { + use super::runtime_types; + pub mod delegator { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BondInfoDelegator < _0 , _1 , _2 , _3 > { pub operator : _0 , pub amount : _1 , pub asset_id : runtime_types :: tangle_primitives :: services :: Asset < _1 > , pub blueprint_selection : runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: DelegatorBlueprintSelection < _3 > , # [codec (skip)] pub __ignore : :: core :: marker :: PhantomData < _2 > } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BondLessRequest < _0 , _1 , _2 , _3 > { pub operator : _0 , pub asset_id : runtime_types :: tangle_primitives :: services :: Asset < _1 > , pub amount : _2 , pub requested_round : :: core :: primitive :: u32 , pub blueprint_selection : runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: DelegatorBlueprintSelection < _3 > , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DelegatorBlueprintSelection<_0> { + #[codec(index = 0)] + Fixed( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u64, + >, + ), + #[codec(index = 1)] + All, + __Ignore(::core::marker::PhantomData<_0>), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct DelegatorMetadata < _0 , _1 , _2 , _3 , _4 , _5 , _6 > { pub deposits : :: subxt_core :: utils :: KeyedVec < runtime_types :: tangle_primitives :: services :: Asset < _1 > , _1 > , pub withdraw_requests : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: WithdrawRequest < _1 , _1 > > , pub delegations : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: BondInfoDelegator < _0 , _1 , _1 , _6 > > , pub delegator_unstake_requests : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: BondLessRequest < _0 , _1 , _1 , _6 > > , pub status : runtime_types :: pallet_multi_asset_delegation :: types :: delegator :: DelegatorStatus , # [codec (skip)] pub __ignore : :: core :: marker :: PhantomData < (_2 , _4 , _3 , _5) > } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DelegatorStatus { + #[codec(index = 0)] + Active, + #[codec(index = 1)] + LeavingScheduled(::core::primitive::u32), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct WithdrawRequest<_0, _1> { + pub asset_id: runtime_types::tangle_primitives::services::Asset<_0>, + pub amount: _1, + pub requested_round: ::core::primitive::u32, + } + } + pub mod operator { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct DelegatorBond<_0, _1, _2> { + pub delegator: _0, + pub amount: _1, + pub asset_id: runtime_types::tangle_primitives::services::Asset<_1>, + #[codec(skip)] + pub __ignore: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OperatorBondLessRequest<_0> { + pub amount: _0, + pub request_time: ::core::primitive::u32, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OperatorMetadata < _0 , _1 , _2 , _3 , _4 > { pub stake : _1 , pub delegation_count : :: core :: primitive :: u32 , pub request : :: core :: option :: Option < runtime_types :: pallet_multi_asset_delegation :: types :: operator :: OperatorBondLessRequest < _1 > > , pub delegations : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: pallet_multi_asset_delegation :: types :: operator :: DelegatorBond < _0 , _1 , _1 > > , pub status : runtime_types :: pallet_multi_asset_delegation :: types :: operator :: OperatorStatus , pub blueprint_ids : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u32 > , # [codec (skip)] pub __ignore : :: core :: marker :: PhantomData < (_2 , _3 , _4) > } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OperatorSnapshot < _0 , _1 , _2 , _3 > { pub stake : _1 , pub delegations : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: pallet_multi_asset_delegation :: types :: operator :: DelegatorBond < _0 , _1 , _1 > > , # [codec (skip)] pub __ignore : :: core :: marker :: PhantomData < (_2 , _3) > } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum OperatorStatus { + #[codec(index = 0)] + Active, + #[codec(index = 1)] + Inactive, + #[codec(index = 2)] + Leaving(::core::primitive::u32), + } + } + pub mod rewards { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum AssetAction { + #[codec(index = 0)] + Add, + #[codec(index = 1)] + Remove, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RewardConfig < _0 , _1 > { pub configs : :: subxt_core :: utils :: KeyedVec < _0 , runtime_types :: pallet_multi_asset_delegation :: types :: rewards :: RewardConfigForAssetVault < _0 > > , pub whitelisted_blueprint_ids : :: subxt_core :: alloc :: vec :: Vec < :: core :: primitive :: u32 > , # [codec (skip)] pub __ignore : :: core :: marker :: PhantomData < _1 > } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RewardConfigForAssetVault<_0> { + pub apy: runtime_types::sp_arithmetic::per_things::Percent, + pub cap: _0, + } + } + } + } + pub mod pallet_multisig { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Immediately dispatch a multi-signature call using a single approval from the caller."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `other_signatories`: The accounts (other than the sender) who are part of the"] + #[doc = "multi-signature, but do not participate in the approval process."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."] + as_multi_threshold_1 { + other_signatories: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "If there are enough, then dispatch the call."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call`: The call to be executed."] + #[doc = ""] + #[doc = "NOTE: Unless this is the final approval, you will generally want to use"] + #[doc = "`approve_as_multi` instead, since it only requires a hash of the call."] + #[doc = ""] + #[doc = "Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise"] + #[doc = "on success, result is `Ok` and the result from the interior call, if it was executed,"] + #[doc = "may be found in the deposited `MultisigExecuted` event."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S + Z + Call)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- The weight of the `call`."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + as_multi { + threshold: ::core::primitive::u16, + other_signatories: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + >, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + max_weight: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 2)] + #[doc = "Register approval for a dispatch to be made from a deterministic composite account if"] + #[doc = "approved by a total of `threshold - 1` of `other_signatories`."] + #[doc = ""] + #[doc = "Payment: `DepositBase` will be reserved if this is the first approval, plus"] + #[doc = "`threshold` times `DepositFactor`. It is returned once this dispatch happens or"] + #[doc = "is cancelled."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is"] + #[doc = "not the first approval, then it must be `Some`, with the timepoint (block number and"] + #[doc = "transaction index) of the first approval transaction."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "NOTE: If this is the final approval, you will want to use `as_multi` instead."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- Up to one binary search and insert (`O(logS + S)`)."] + #[doc = "- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove."] + #[doc = "- One event."] + #[doc = "- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit"] + #[doc = " taken for its lifetime of `DepositBase + threshold * DepositFactor`."] + approve_as_multi { + threshold: ::core::primitive::u16, + other_signatories: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + >, + call_hash: [::core::primitive::u8; 32usize], + max_weight: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 3)] + #[doc = "Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously"] + #[doc = "for this operation will be unreserved on success."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `threshold`: The total number of approvals for this dispatch before it is executed."] + #[doc = "- `other_signatories`: The accounts (other than the sender) who can approve this"] + #[doc = "dispatch. May not be empty."] + #[doc = "- `timepoint`: The timepoint (block number and transaction index) of the first approval"] + #[doc = "transaction for this dispatch."] + #[doc = "- `call_hash`: The hash of the call to be executed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(S)`."] + #[doc = "- Up to one balance-reserve or unreserve operation."] + #[doc = "- One passthrough operation, one insert, both `O(S)` where `S` is the number of"] + #[doc = " signatories. `S` is capped by `MaxSignatories`, with weight being proportional."] + #[doc = "- One encode & hash, both of complexity `O(S)`."] + #[doc = "- One event."] + #[doc = "- I/O: 1 read `O(S)`, one remove."] + #[doc = "- Storage: removes one item."] + cancel_as_multi { + threshold: ::core::primitive::u16, + other_signatories: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + call_hash: [::core::primitive::u8; 32usize], + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Threshold must be 2 or greater."] + MinimumThreshold, + #[codec(index = 1)] + #[doc = "Call is already approved by this signatory."] + AlreadyApproved, + #[codec(index = 2)] + #[doc = "Call doesn't need any (more) approvals."] + NoApprovalsNeeded, + #[codec(index = 3)] + #[doc = "There are too few signatories in the list."] + TooFewSignatories, + #[codec(index = 4)] + #[doc = "There are too many signatories in the list."] + TooManySignatories, + #[codec(index = 5)] + #[doc = "The signatories were provided out of order; they should be ordered."] + SignatoriesOutOfOrder, + #[codec(index = 6)] + #[doc = "The sender was contained in the other signatories; it shouldn't be."] + SenderInSignatories, + #[codec(index = 7)] + #[doc = "Multisig operation not found when attempting to cancel."] + NotFound, + #[codec(index = 8)] + #[doc = "Only the account that originally created the multisig is able to cancel it."] + NotOwner, + #[codec(index = 9)] + #[doc = "No timepoint was given, yet the multisig operation is already underway."] + NoTimepoint, + #[codec(index = 10)] + #[doc = "A different timepoint was given to the multisig operation that is underway."] + WrongTimepoint, + #[codec(index = 11)] + #[doc = "A timepoint was given, yet no multisig operation is underway."] + UnexpectedTimepoint, + #[codec(index = 12)] + #[doc = "The maximum weight information provided was too low."] + MaxWeightTooLow, + #[codec(index = 13)] + #[doc = "The data to be stored is already stored."] + AlreadyStored, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new multisig operation has begun."] + NewMultisig { + approving: ::subxt_core::utils::AccountId32, + multisig: ::subxt_core::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 1)] + #[doc = "A multisig operation has been approved by someone."] + MultisigApproval { + approving: ::subxt_core::utils::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + multisig: ::subxt_core::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + #[doc = "A multisig operation has been executed."] + MultisigExecuted { + approving: ::subxt_core::utils::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + multisig: ::subxt_core::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + #[doc = "A multisig operation has been cancelled."] + MultisigCancelled { + cancelling: ::subxt_core::utils::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u64>, + multisig: ::subxt_core::utils::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Multisig<_0, _1, _2> { + pub when: runtime_types::pallet_multisig::Timepoint<_0>, + pub deposit: _1, + pub depositor: _2, + pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec<_2>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Timepoint<_0> { + pub height: _0, + pub index: ::core::primitive::u32, + } + } + pub mod pallet_nomination_pools { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] + #[doc = "pools account and immediately increases the pools bond."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "* An account can only be a member of a single pool."] + #[doc = "* An account cannot join the same pool multiple times."] + #[doc = "* This call will *not* dust the member account, so the member must have at least"] + #[doc = " `existential deposit + amount` in their account."] + #[doc = "* Only a pool with [`PoolState::Open`] can be joined"] + join { + #[codec(compact)] + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] + #[doc = ""] + #[doc = "Additional funds can come from either the free balance of the account, of from the"] + #[doc = "accumulated rewards, see [`BondExtra`]."] + #[doc = ""] + #[doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] + #[doc = "See `bond_extra_other` to bond pending rewards of `other` members."] + bond_extra { + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 2)] + #[doc = "A bonded member can use this to claim their payout based on the rewards that the pool"] + #[doc = "has accumulated since their last claimed payout (OR since joining if this is their first"] + #[doc = "time claiming rewards). The payout will be transferred to the member's account."] + #[doc = ""] + #[doc = "The member will earn rewards pro rata based on the members stake vs the sum of the"] + #[doc = "members in the pools stake. Rewards do not \"expire\"."] + #[doc = ""] + #[doc = "See `claim_payout_other` to claim rewards on behalf of some `other` pool member."] + claim_payout, + #[codec(index = 3)] + #[doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] + #[doc = "implicitly collects the rewards one last time, since not doing so would mean some"] + #[doc = "rewards would be forfeited."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch."] + #[doc = ""] + #[doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] + #[doc = " as a kick."] + #[doc = "* The pool is destroying and the member is not the depositor."] + #[doc = "* The pool is destroying, the member is the depositor and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] + #[doc = "`member_account`):"] + #[doc = ""] + #[doc = "* The caller is not the depositor."] + #[doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] + #[doc = " pool."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "If there are too many unlocking chunks to unbond with the pool account,"] + #[doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] + #[doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] + #[doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] + #[doc = "are available). However, it may not be possible to release the current unlocking chunks,"] + #[doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] + #[doc = "staking system."] + unbond { + member_account: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + #[codec(compact)] + unbonding_points: ::core::primitive::u128, + }, + #[codec(index = 4)] + #[doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] + #[doc = ""] + #[doc = "This is useful if there are too many unlocking chunks to call `unbond`, and some"] + #[doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] + #[doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] + #[doc = "they attempt to unbond."] + pool_withdraw_unbonded { + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] + #[doc = "error is returned."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch"] + #[doc = ""] + #[doc = "* The pool is in destroy mode and the target is not the depositor."] + #[doc = "* The target is the depositor and they are the only member in the sub pools."] + #[doc = "* The pool is blocked and the caller is either the root or bouncer."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch"] + #[doc = ""] + #[doc = "* The caller is the target and they are not the depositor."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "- If the target is the depositor, the pool will be destroyed."] + #[doc = "- If the pool has any pending slash, we also try to slash the member before letting them"] + #[doc = "withdraw. This calculation adds some weight overhead and is only defensive. In reality,"] + #[doc = "pool slashes must have been already applied via permissionless [`Call::apply_slash`]."] + withdraw_unbonded { + member_account: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Create a new delegation pool."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] + #[doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] + #[doc = " destroyed."] + #[doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] + #[doc = " creating multiple pools in the same extrinsic."] + #[doc = "* `root` - The account to set as [`PoolRoles::root`]."] + #[doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] + #[doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] + #[doc = "needs at have at least `amount + existential_deposit` transferable."] + create { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + nominator: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + bouncer: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 7)] + #[doc = "Create a new delegation pool with a previously used pool id"] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "same as `create` with the inclusion of"] + #[doc = "* `pool_id` - `A valid PoolId."] + create_with_pool_id { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + nominator: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + bouncer: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + #[doc = "Nominate on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] + #[doc = "root role."] + #[doc = ""] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + #[doc = ""] + #[doc = "# Note"] + #[doc = ""] + #[doc = "In addition to a `root` or `nominator` role of `origin`, pool's depositor needs to have"] + #[doc = "at least `depositor_min_bond` in the pool to start nominating."] + nominate { + pool_id: ::core::primitive::u32, + validators: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + }, + #[codec(index = 9)] + #[doc = "Set a new state for the pool."] + #[doc = ""] + #[doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] + #[doc = "change again."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be either:"] + #[doc = ""] + #[doc = "1. signed by the bouncer, or the root role of the pool,"] + #[doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] + #[doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] + set_state { + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 10)] + #[doc = "Set a new metadata for the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] + #[doc = "pool."] + set_metadata { + pool_id: ::core::primitive::u32, + metadata: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 11)] + #[doc = "Update configurations for the nomination pools. The origin for this call must be"] + #[doc = "[`Config::AdminOrigin`]."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `min_join_bond` - Set [`MinJoinBond`]."] + #[doc = "* `min_create_bond` - Set [`MinCreateBond`]."] + #[doc = "* `max_pools` - Set [`MaxPools`]."] + #[doc = "* `max_members` - Set [`MaxPoolMembers`]."] + #[doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] + #[doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] + set_configs { + min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + }, + #[codec(index = 12)] + #[doc = "Update the roles of the pool."] + #[doc = ""] + #[doc = "The root is the only entity that can change any of the roles, including itself,"] + #[doc = "excluding the depositor, who can never change."] + #[doc = ""] + #[doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] + #[doc = "most pool members and they should be informed of changes to pool roles."] + update_roles { + pool_id: ::core::primitive::u32, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt_core::utils::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt_core::utils::AccountId32, + >, + new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt_core::utils::AccountId32, + >, + }, + #[codec(index = 13)] + #[doc = "Chill on behalf of the pool."] + #[doc = ""] + #[doc = "The dispatch origin of this call can be signed by the pool nominator or the pool"] + #[doc = "root role, same as [`Pallet::nominate`]."] + #[doc = ""] + #[doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] + #[doc = "account)."] + #[doc = ""] + #[doc = "# Conditions for a permissionless dispatch:"] + #[doc = "* When pool depositor has less than `MinNominatorBond` staked, otherwise pool members"] + #[doc = " are unable to unbond."] + #[doc = ""] + #[doc = "# Conditions for permissioned dispatch:"] + #[doc = "* The caller has a nominator or root role of the pool."] + #[doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] + #[doc = "account."] + chill { pool_id: ::core::primitive::u32 }, + #[codec(index = 14)] + #[doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] + #[doc = "pools."] + #[doc = ""] + #[doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] + #[doc = "other`."] + #[doc = ""] + #[doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] + #[doc = "`other` members assuming set_claim_permission for the given member is"] + #[doc = "`PermissionlessCompound` or `PermissionlessAll`."] + bond_extra_other { + member: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 15)] + #[doc = "Allows a pool member to set a claim permission to allow or disallow permissionless"] + #[doc = "bonding and withdrawing."] + #[doc = ""] + #[doc = "# Arguments"] + #[doc = ""] + #[doc = "* `origin` - Member of a pool."] + #[doc = "* `permission` - The permission to be applied."] + set_claim_permission { + permission: runtime_types::pallet_nomination_pools::ClaimPermission, + }, + #[codec(index = 16)] + #[doc = "`origin` can claim payouts on some pool member `other`'s behalf."] + #[doc = ""] + #[doc = "Pool member `other` must have a `PermissionlessWithdraw` or `PermissionlessAll` claim"] + #[doc = "permission for this call to be successful."] + claim_payout_other { other: ::subxt_core::utils::AccountId32 }, + #[codec(index = 17)] + #[doc = "Set the commission of a pool."] + #[doc = "Both a commission percentage and a commission payee must be provided in the `current`"] + #[doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] + #[doc = ""] + #[doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] + set_commission { + pool_id: ::core::primitive::u32, + new_commission: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>, + }, + #[codec(index = 18)] + #[doc = "Set the maximum commission of a pool."] + #[doc = ""] + #[doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] + #[doc = "- Current commission will be lowered in the event it is higher than a new max"] + #[doc = " commission."] + set_commission_max { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 19)] + #[doc = "Set the commission change rate for a pool."] + #[doc = ""] + #[doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] + #[doc = "restrictive than the current."] + set_commission_change_rate { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u64, + >, + }, + #[codec(index = 20)] + #[doc = "Claim pending commission."] + #[doc = ""] + #[doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] + #[doc = "commission is paid out and added to total claimed commission`. Total pending commission"] + #[doc = "is reset to zero. the current."] + claim_commission { pool_id: ::core::primitive::u32 }, + #[codec(index = 21)] + #[doc = "Top up the deficit or withdraw the excess ED from the pool."] + #[doc = ""] + #[doc = "When a pool is created, the pool depositor transfers ED to the reward account of the"] + #[doc = "pool. ED is subject to change and over time, the deposit in the reward account may be"] + #[doc = "insufficient to cover the ED deficit of the pool or vice-versa where there is excess"] + #[doc = "deposit to the pool. This call allows anyone to adjust the ED deposit of the"] + #[doc = "pool by either topping up the deficit or claiming the excess."] + adjust_pool_deposit { pool_id: ::core::primitive::u32 }, + #[codec(index = 22)] + #[doc = "Set or remove a pool's commission claim permission."] + #[doc = ""] + #[doc = "Determines who can claim the pool's pending commission. Only the `Root` role of the pool"] + #[doc = "is able to configure commission claim permissions."] + set_commission_claim_permission { + pool_id: ::core::primitive::u32, + permission: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionClaimPermission< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 23)] + #[doc = "Apply a pending slash on a member."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "The pending slash amount of the member must be equal or more than `ExistentialDeposit`."] + #[doc = "This call can be dispatched permissionlessly (i.e. by any account). If the execution"] + #[doc = "is successful, fee is refunded and caller may be rewarded with a part of the slash"] + #[doc = "based on the [`crate::pallet::Config::StakeAdapter`] configuration."] + apply_slash { + member_account: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 24)] + #[doc = "Migrates delegated funds from the pool account to the `member_account`."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "This is a permission-less call and refunds any fee if claim is successful."] + #[doc = ""] + #[doc = "If the pool has migrated to delegation based staking, the staked tokens of pool members"] + #[doc = "can be moved and held in their own account. See [`adapter::DelegateStake`]"] + migrate_delegation { + member_account: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 25)] + #[doc = "Migrate pool from [`adapter::StakeStrategyType::Transfer`] to"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:"] + #[doc = "[`adapter::StakeStrategyType::Delegate`]."] + #[doc = ""] + #[doc = "This call can be dispatched permissionlessly, and refunds any fee if successful."] + #[doc = ""] + #[doc = "If the pool has already migrated to delegation based staking, this call will fail."] + migrate_pool_to_delegate_stake { pool_id: ::core::primitive::u32 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DefensiveError { + #[codec(index = 0)] + NotEnoughSpaceInUnbondPool, + #[codec(index = 1)] + PoolNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + BondedStashKilledPrematurely, + #[codec(index = 5)] + DelegationUnsupported, + #[codec(index = 6)] + SlashNotApplied, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "A (bonded) pool id does not exist."] + PoolNotFound, + #[codec(index = 1)] + #[doc = "An account is not a member."] + PoolMemberNotFound, + #[codec(index = 2)] + #[doc = "A reward pool does not exist. In all cases this is a system logic error."] + RewardPoolNotFound, + #[codec(index = 3)] + #[doc = "A sub pool does not exist."] + SubPoolsNotFound, + #[codec(index = 4)] + #[doc = "An account is already delegating in another pool. An account may only belong to one"] + #[doc = "pool at a time."] + AccountBelongsToOtherPool, + #[codec(index = 5)] + #[doc = "The member is fully unbonded (and thus cannot access the bonded and reward pool"] + #[doc = "anymore to, for example, collect rewards)."] + FullyUnbonding, + #[codec(index = 6)] + #[doc = "The member cannot unbond further chunks due to reaching the limit."] + MaxUnbondingLimit, + #[codec(index = 7)] + #[doc = "None of the funds can be withdrawn yet because the bonding duration has not passed."] + CannotWithdrawAny, + #[codec(index = 8)] + #[doc = "The amount does not meet the minimum bond to either join or create a pool."] + #[doc = ""] + #[doc = "The depositor can never unbond to a value less than `Pallet::depositor_min_bond`. The"] + #[doc = "caller does not have nominating permissions for the pool. Members can never unbond to a"] + #[doc = "value below `MinJoinBond`."] + MinimumBondNotMet, + #[codec(index = 9)] + #[doc = "The transaction could not be executed due to overflow risk for the pool."] + OverflowRisk, + #[codec(index = 10)] + #[doc = "A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for"] + #[doc = "other members to be permissionlessly unbonded."] + NotDestroying, + #[codec(index = 11)] + #[doc = "The caller does not have nominating permissions for the pool."] + NotNominator, + #[codec(index = 12)] + #[doc = "Either a) the caller cannot make a valid kick or b) the pool is not destroying."] + NotKickerOrDestroying, + #[codec(index = 13)] + #[doc = "The pool is not open to join"] + NotOpen, + #[codec(index = 14)] + #[doc = "The system is maxed out on pools."] + MaxPools, + #[codec(index = 15)] + #[doc = "Too many members in the pool or system."] + MaxPoolMembers, + #[codec(index = 16)] + #[doc = "The pools state cannot be changed."] + CanNotChangeState, + #[codec(index = 17)] + #[doc = "The caller does not have adequate permissions."] + DoesNotHavePermission, + #[codec(index = 18)] + #[doc = "Metadata exceeds [`Config::MaxMetadataLen`]"] + MetadataExceedsMaxLen, + #[codec(index = 19)] + #[doc = "Some error occurred that should never happen. This should be reported to the"] + #[doc = "maintainers."] + Defensive(runtime_types::pallet_nomination_pools::pallet::DefensiveError), + #[codec(index = 20)] + #[doc = "Partial unbonding now allowed permissionlessly."] + PartialUnbondNotAllowedPermissionlessly, + #[codec(index = 21)] + #[doc = "The pool's max commission cannot be set higher than the existing value."] + MaxCommissionRestricted, + #[codec(index = 22)] + #[doc = "The supplied commission exceeds the max allowed commission."] + CommissionExceedsMaximum, + #[codec(index = 23)] + #[doc = "The supplied commission exceeds global maximum commission."] + CommissionExceedsGlobalMaximum, + #[codec(index = 24)] + #[doc = "Not enough blocks have surpassed since the last commission update."] + CommissionChangeThrottled, + #[codec(index = 25)] + #[doc = "The submitted changes to commission change rate are not allowed."] + CommissionChangeRateNotAllowed, + #[codec(index = 26)] + #[doc = "There is no pending commission to claim."] + NoPendingCommission, + #[codec(index = 27)] + #[doc = "No commission current has been set."] + NoCommissionCurrentSet, + #[codec(index = 28)] + #[doc = "Pool id currently in use."] + PoolIdInUse, + #[codec(index = 29)] + #[doc = "Pool id provided is not correct/usable."] + InvalidPoolId, + #[codec(index = 30)] + #[doc = "Bonding extra is restricted to the exact pending reward amount."] + BondExtraRestricted, + #[codec(index = 31)] + #[doc = "No imbalance in the ED deposit for the pool."] + NothingToAdjust, + #[codec(index = 32)] + #[doc = "No slash pending that can be applied to the member."] + NothingToSlash, + #[codec(index = 33)] + #[doc = "The slash amount is too low to be applied."] + SlashTooLow, + #[codec(index = 34)] + #[doc = "The pool or member delegation has already migrated to delegate stake."] + AlreadyMigrated, + #[codec(index = 35)] + #[doc = "The pool or member delegation has not migrated yet to delegate stake."] + NotMigrated, + #[codec(index = 36)] + #[doc = "This call is not allowed in the current state of the pallet."] + NotSupported, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Events of this pallet."] + pub enum Event { + #[codec(index = 0)] + #[doc = "A pool has been created."] + Created { + depositor: ::subxt_core::utils::AccountId32, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + #[doc = "A member has became bonded in a pool."] + Bonded { + member: ::subxt_core::utils::AccountId32, + pool_id: ::core::primitive::u32, + bonded: ::core::primitive::u128, + joined: ::core::primitive::bool, + }, + #[codec(index = 2)] + #[doc = "A payout has been made to a member."] + PaidOut { + member: ::subxt_core::utils::AccountId32, + pool_id: ::core::primitive::u32, + payout: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A member has unbonded from their pool."] + #[doc = ""] + #[doc = "- `balance` is the corresponding balance of the number of points that has been"] + #[doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] + #[doc = " pool."] + #[doc = "- `points` is the number of points that are issued as a result of `balance` being"] + #[doc = "dissolved into the corresponding unbonding pool."] + #[doc = "- `era` is the era in which the balance will be unbonded."] + #[doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] + #[doc = "number of points that are issued in the unbonding pool will be less than the amount"] + #[doc = "requested to be unbonded."] + Unbonded { + member: ::subxt_core::utils::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + era: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "A member has withdrawn from their pool."] + #[doc = ""] + #[doc = "The given number of `points` have been dissolved in return of `balance`."] + #[doc = ""] + #[doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] + #[doc = "will be 1."] + Withdrawn { + member: ::subxt_core::utils::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + }, + #[codec(index = 5)] + #[doc = "A pool has been destroyed."] + Destroyed { pool_id: ::core::primitive::u32 }, + #[codec(index = 6)] + #[doc = "The state of a pool has changed"] + StateChanged { + pool_id: ::core::primitive::u32, + new_state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 7)] + #[doc = "A member has been removed from a pool."] + #[doc = ""] + #[doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] + MemberRemoved { + pool_id: ::core::primitive::u32, + member: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 8)] + #[doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] + #[doc = "can never change."] + RolesUpdated { + root: ::core::option::Option<::subxt_core::utils::AccountId32>, + bouncer: ::core::option::Option<::subxt_core::utils::AccountId32>, + nominator: ::core::option::Option<::subxt_core::utils::AccountId32>, + }, + #[codec(index = 9)] + #[doc = "The active balance of pool `pool_id` has been slashed to `balance`."] + PoolSlashed { + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 10)] + #[doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] + UnbondingPoolSlashed { + pool_id: ::core::primitive::u32, + era: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 11)] + #[doc = "A pool's commission setting has been changed."] + PoolCommissionUpdated { + pool_id: ::core::primitive::u32, + current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>, + }, + #[codec(index = 12)] + #[doc = "A pool's maximum commission setting has been changed."] + PoolMaxCommissionUpdated { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 13)] + #[doc = "A pool's commission `change_rate` has been changed."] + PoolCommissionChangeRateUpdated { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u64, + >, + }, + #[codec(index = 14)] + #[doc = "Pool commission claim permission has been updated."] + PoolCommissionClaimPermissionUpdated { + pool_id: ::core::primitive::u32, + permission: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionClaimPermission< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 15)] + #[doc = "Pool commission has been claimed."] + PoolCommissionClaimed { + pool_id: ::core::primitive::u32, + commission: ::core::primitive::u128, + }, + #[codec(index = 16)] + #[doc = "Topped up deficit in frozen ED of the reward pool."] + MinBalanceDeficitAdjusted { + pool_id: ::core::primitive::u32, + amount: ::core::primitive::u128, + }, + #[codec(index = 17)] + #[doc = "Claimed excess frozen ED of af the reward pool."] + MinBalanceExcessAdjusted { + pool_id: ::core::primitive::u32, + amount: ::core::primitive::u128, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum FreezeReason { + #[codec(index = 0)] + PoolMinBalance, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum BondExtra<_0> { + #[codec(index = 0)] + FreeBalance(_0), + #[codec(index = 1)] + Rewards, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BondedPoolInner { + pub commission: runtime_types::pallet_nomination_pools::Commission, + pub member_counter: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub roles: runtime_types::pallet_nomination_pools::PoolRoles< + ::subxt_core::utils::AccountId32, + >, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ClaimPermission { + #[codec(index = 0)] + Permissioned, + #[codec(index = 1)] + PermissionlessCompound, + #[codec(index = 2)] + PermissionlessWithdraw, + #[codec(index = 3)] + PermissionlessAll, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Commission { + pub current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::subxt_core::utils::AccountId32, + )>, + pub max: ::core::option::Option, + pub change_rate: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u64, + >, + >, + pub throttle_from: ::core::option::Option<::core::primitive::u64>, + pub claim_permission: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionClaimPermission< + ::subxt_core::utils::AccountId32, + >, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CommissionChangeRate<_0> { + pub max_increase: runtime_types::sp_arithmetic::per_things::Perbill, + pub min_delay: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum CommissionClaimPermission<_0> { + #[codec(index = 0)] + Permissionless, + #[codec(index = 1)] + Account(_0), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PoolMember { + pub pool_id: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub unbonding_eras: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + ::core::primitive::u128, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PoolRoles<_0> { + pub depositor: _0, + pub root: ::core::option::Option<_0>, + pub nominator: ::core::option::Option<_0>, + pub bouncer: ::core::option::Option<_0>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum PoolState { + #[codec(index = 0)] + Open, + #[codec(index = 1)] + Blocked, + #[codec(index = 2)] + Destroying, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RewardPool { + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub last_recorded_total_payouts: ::core::primitive::u128, + pub total_rewards_claimed: ::core::primitive::u128, + pub total_commission_pending: ::core::primitive::u128, + pub total_commission_claimed: ::core::primitive::u128, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SubPools { + pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, + pub with_era: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_nomination_pools::UnbondPool, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UnbondPool { + pub points: ::core::primitive::u128, + pub balance: ::core::primitive::u128, + } + } + pub mod pallet_offences { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Events type."] + pub enum Event { + #[codec(index = 0)] + #[doc = "There is an offence reported of the given `kind` happened at the `session_index` and"] + #[doc = "(kind-specific) time slot. This event is not deposited for duplicate slashes."] + #[doc = "\\[kind, timeslot\\]."] + Offence { + kind: [::core::primitive::u8; 16usize], + timeslot: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + } + } + } + pub mod pallet_preimage { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Register a preimage on-chain."] + #[doc = ""] + #[doc = "If the preimage was previously requested, no fees or deposits are taken for providing"] + #[doc = "the preimage. Otherwise, a deposit is taken proportional to the size of the preimage."] + note_preimage { bytes: ::subxt_core::alloc::vec::Vec<::core::primitive::u8> }, + #[codec(index = 1)] + #[doc = "Clear an unrequested preimage from the runtime storage."] + #[doc = ""] + #[doc = "If `len` is provided, then it will be a much cheaper operation."] + #[doc = ""] + #[doc = "- `hash`: The hash of the preimage to be removed from the store."] + #[doc = "- `len`: The length of the preimage of `hash`."] + unnote_preimage { hash: ::subxt_core::utils::H256 }, + #[codec(index = 2)] + #[doc = "Request a preimage be uploaded to the chain without paying any fees or deposits."] + #[doc = ""] + #[doc = "If the preimage requests has already been provided on-chain, we unreserve any deposit"] + #[doc = "a user may have paid, and take the control of the preimage out of their hands."] + request_preimage { hash: ::subxt_core::utils::H256 }, + #[codec(index = 3)] + #[doc = "Clear a previously made request for a preimage."] + #[doc = ""] + #[doc = "NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`."] + unrequest_preimage { hash: ::subxt_core::utils::H256 }, + #[codec(index = 4)] + #[doc = "Ensure that the a bulk of pre-images is upgraded."] + #[doc = ""] + #[doc = "The caller pays no fee if at least 90% of pre-images were successfully updated."] + ensure_updated { + hashes: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::H256>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Preimage is too large to store on-chain."] + TooBig, + #[codec(index = 1)] + #[doc = "Preimage has already been noted on-chain."] + AlreadyNoted, + #[codec(index = 2)] + #[doc = "The user is not authorized to perform this action."] + NotAuthorized, + #[codec(index = 3)] + #[doc = "The preimage cannot be removed since it has not yet been noted."] + NotNoted, + #[codec(index = 4)] + #[doc = "A preimage may not be removed when there are outstanding requests."] + Requested, + #[codec(index = 5)] + #[doc = "The preimage request cannot be removed since no outstanding requests exist."] + NotRequested, + #[codec(index = 6)] + #[doc = "More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once."] + TooMany, + #[codec(index = 7)] + #[doc = "Too few hashes were requested to be upgraded (i.e. zero)."] + TooFew, + #[codec(index = 8)] + #[doc = "No ticket with a cost was returned by [`Config::Consideration`] to store the preimage."] + NoCost, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A preimage has been noted."] + Noted { hash: ::subxt_core::utils::H256 }, + #[codec(index = 1)] + #[doc = "A preimage has been requested."] + Requested { hash: ::subxt_core::utils::H256 }, + #[codec(index = 2)] + #[doc = "A preimage has ben cleared."] + Cleared { hash: ::subxt_core::utils::H256 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum HoldReason { + #[codec(index = 0)] + Preimage, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum OldRequestStatus<_0, _1> { + #[codec(index = 0)] + Unrequested { deposit: (_0, _1), len: ::core::primitive::u32 }, + #[codec(index = 1)] + Requested { + deposit: ::core::option::Option<(_0, _1)>, + count: ::core::primitive::u32, + len: ::core::option::Option<::core::primitive::u32>, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RequestStatus<_0, _1> { + #[codec(index = 0)] + Unrequested { ticket: (_0, _1), len: ::core::primitive::u32 }, + #[codec(index = 1)] + Requested { + maybe_ticket: ::core::option::Option<(_0, _1)>, + count: ::core::primitive::u32, + maybe_len: ::core::option::Option<::core::primitive::u32>, + }, + } + } + pub mod pallet_proxy { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Dispatch the given `call` from an account that the sender is authorised for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + proxy { + real: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + force_proxy_type: ::core::option::Option< + runtime_types::tangle_testnet_runtime::ProxyType, + >, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Register a proxy account for the sender that is able to make calls on its behalf."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to make a proxy."] + #[doc = "- `proxy_type`: The permissions allowed for this proxy account."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + add_proxy { + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + delay: ::core::primitive::u64, + }, + #[codec(index = 2)] + #[doc = "Unregister a proxy account for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `proxy`: The account that the `caller` would like to remove as a proxy."] + #[doc = "- `proxy_type`: The permissions currently enabled for the removed proxy account."] + remove_proxy { + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + delay: ::core::primitive::u64, + }, + #[codec(index = 3)] + #[doc = "Unregister all proxy accounts for the sender."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "WARNING: This may be called on accounts created by `pure`, however if done, then"] + #[doc = "the unreserved fees will be inaccessible. **All access to this account will be lost.**"] + remove_proxies, + #[codec(index = 4)] + #[doc = "Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and"] + #[doc = "initialize it with a proxy of `proxy_type` for `origin` sender."] + #[doc = ""] + #[doc = "Requires a `Signed` origin."] + #[doc = ""] + #[doc = "- `proxy_type`: The type of the proxy that the sender will be registered as over the"] + #[doc = "new account. This will almost always be the most permissive `ProxyType` possible to"] + #[doc = "allow for maximum flexibility."] + #[doc = "- `index`: A disambiguation index, in case this is called multiple times in the same"] + #[doc = "transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just"] + #[doc = "want to use `0`."] + #[doc = "- `delay`: The announcement period required of the initial proxy. Will generally be"] + #[doc = "zero."] + #[doc = ""] + #[doc = "Fails with `Duplicate` if this has already been called in this transaction, from the"] + #[doc = "same sender, with the same parameters."] + #[doc = ""] + #[doc = "Fails if there are insufficient funds to pay for deposit."] + create_pure { + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + delay: ::core::primitive::u64, + index: ::core::primitive::u16, + }, + #[codec(index = 5)] + #[doc = "Removes a previously spawned pure proxy."] + #[doc = ""] + #[doc = "WARNING: **All access to this account will be lost.** Any funds held in it will be"] + #[doc = "inaccessible."] + #[doc = ""] + #[doc = "Requires a `Signed` origin, and the sender account must have been created by a call to"] + #[doc = "`pure` with corresponding parameters."] + #[doc = ""] + #[doc = "- `spawner`: The account that originally called `pure` to create this account."] + #[doc = "- `index`: The disambiguation index originally passed to `pure`. Probably `0`."] + #[doc = "- `proxy_type`: The proxy type originally passed to `pure`."] + #[doc = "- `height`: The height of the chain when the call to `pure` was processed."] + #[doc = "- `ext_index`: The extrinsic index in which the call to `pure` was processed."] + #[doc = ""] + #[doc = "Fails with `NoPermission` in case the caller is not a previously created pure"] + #[doc = "account whose `pure` call has corresponding parameters."] + kill_pure { + spawner: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + index: ::core::primitive::u16, + #[codec(compact)] + height: ::core::primitive::u64, + #[codec(compact)] + ext_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + #[doc = "Publish the hash of a proxy-call that will be made in the future."] + #[doc = ""] + #[doc = "This must be called some number of blocks before the corresponding `proxy` is attempted"] + #[doc = "if the delay associated with the proxy relationship is greater than zero."] + #[doc = ""] + #[doc = "No more than `MaxPending` announcements may be made at any one time."] + #[doc = ""] + #[doc = "This will take a deposit of `AnnouncementDepositFactor` as well as"] + #[doc = "`AnnouncementDepositBase` if there are no other pending announcements."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and a proxy of `real`."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + announce { + real: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt_core::utils::H256, + }, + #[codec(index = 7)] + #[doc = "Remove a given announcement."] + #[doc = ""] + #[doc = "May be called by a proxy account to remove a call they previously announced and return"] + #[doc = "the deposit."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `call_hash`: The hash of the call to be made by the `real` account."] + remove_announcement { + real: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt_core::utils::H256, + }, + #[codec(index = 8)] + #[doc = "Remove the given announcement of a delegate."] + #[doc = ""] + #[doc = "May be called by a target (proxied) account to remove a call that one of their delegates"] + #[doc = "(`delegate`) has announced they want to execute. The deposit is returned."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `delegate`: The account that previously announced the call."] + #[doc = "- `call_hash`: The hash of the call to be made."] + reject_announcement { + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + call_hash: ::subxt_core::utils::H256, + }, + #[codec(index = 9)] + #[doc = "Dispatch the given `call` from an account that the sender is authorized for through"] + #[doc = "`add_proxy`."] + #[doc = ""] + #[doc = "Removes any corresponding announcement(s)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "Parameters:"] + #[doc = "- `real`: The account that the proxy will make a call on behalf of."] + #[doc = "- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call."] + #[doc = "- `call`: The call to be made by the `real` account."] + proxy_announced { + delegate: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + real: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + force_proxy_type: ::core::option::Option< + runtime_types::tangle_testnet_runtime::ProxyType, + >, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "There are too many proxies registered or too many announcements pending."] + TooMany, + #[codec(index = 1)] + #[doc = "Proxy registration not found."] + NotFound, + #[codec(index = 2)] + #[doc = "Sender is not a proxy of the account to be proxied."] + NotProxy, + #[codec(index = 3)] + #[doc = "A call which is incompatible with the proxy type's filter was attempted."] + Unproxyable, + #[codec(index = 4)] + #[doc = "Account is already a proxy."] + Duplicate, + #[codec(index = 5)] + #[doc = "Call may not be made by proxy because it may escalate its privileges."] + NoPermission, + #[codec(index = 6)] + #[doc = "Announcement, if made at all, was made too recently."] + Unannounced, + #[codec(index = 7)] + #[doc = "Cannot add self as proxy."] + NoSelfProxy, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A proxy was executed correctly, with the given."] + ProxyExecuted { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + #[doc = "A pure account has been created by new proxy with given"] + #[doc = "disambiguation index and proxy type."] + PureCreated { + pure: ::subxt_core::utils::AccountId32, + who: ::subxt_core::utils::AccountId32, + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, + }, + #[codec(index = 2)] + #[doc = "An announcement was placed to make a call in the future."] + Announced { + real: ::subxt_core::utils::AccountId32, + proxy: ::subxt_core::utils::AccountId32, + call_hash: ::subxt_core::utils::H256, + }, + #[codec(index = 3)] + #[doc = "A proxy was added."] + ProxyAdded { + delegator: ::subxt_core::utils::AccountId32, + delegatee: ::subxt_core::utils::AccountId32, + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + delay: ::core::primitive::u64, + }, + #[codec(index = 4)] + #[doc = "A proxy was removed."] + ProxyRemoved { + delegator: ::subxt_core::utils::AccountId32, + delegatee: ::subxt_core::utils::AccountId32, + proxy_type: runtime_types::tangle_testnet_runtime::ProxyType, + delay: ::core::primitive::u64, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, + } + } + pub mod pallet_scheduler { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Anonymously schedule a task."] + schedule { + when: ::core::primitive::u64, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u64, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Cancel an anonymously scheduled task."] + cancel { when: ::core::primitive::u64, index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "Schedule a named task."] + schedule_named { + id: [::core::primitive::u8; 32usize], + when: ::core::primitive::u64, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u64, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 3)] + #[doc = "Cancel a named scheduled task."] + cancel_named { id: [::core::primitive::u8; 32usize] }, + #[codec(index = 4)] + #[doc = "Anonymously schedule a task after a delay."] + schedule_after { + after: ::core::primitive::u64, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u64, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 5)] + #[doc = "Schedule a named task after a delay."] + schedule_named_after { + id: [::core::primitive::u8; 32usize], + after: ::core::primitive::u64, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u64, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 6)] + #[doc = "Set a retry configuration for a task so that, in case its scheduled run fails, it will"] + #[doc = "be retried after `period` blocks, for a total amount of `retries` retries or until it"] + #[doc = "succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + set_retry { + task: (::core::primitive::u64, ::core::primitive::u32), + retries: ::core::primitive::u8, + period: ::core::primitive::u64, + }, + #[codec(index = 7)] + #[doc = "Set a retry configuration for a named task so that, in case its scheduled run fails, it"] + #[doc = "will be retried after `period` blocks, for a total amount of `retries` retries or until"] + #[doc = "it succeeds."] + #[doc = ""] + #[doc = "Tasks which need to be scheduled for a retry are still subject to weight metering and"] + #[doc = "agenda space, same as a regular task. If a periodic task fails, it will be scheduled"] + #[doc = "normally while the task is retrying."] + #[doc = ""] + #[doc = "Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic"] + #[doc = "clones of the original task. Their retry configuration will be derived from the"] + #[doc = "original task's configuration, but will have a lower value for `remaining` than the"] + #[doc = "original `total_retries`."] + set_retry_named { + id: [::core::primitive::u8; 32usize], + retries: ::core::primitive::u8, + period: ::core::primitive::u64, + }, + #[codec(index = 8)] + #[doc = "Removes the retry configuration of a task."] + cancel_retry { task: (::core::primitive::u64, ::core::primitive::u32) }, + #[codec(index = 9)] + #[doc = "Cancel the retry configuration of a named task."] + cancel_retry_named { id: [::core::primitive::u8; 32usize] }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Failed to schedule a call"] + FailedToSchedule, + #[codec(index = 1)] + #[doc = "Cannot find the scheduled call."] + NotFound, + #[codec(index = 2)] + #[doc = "Given target block number is in the past."] + TargetBlockNumberInPast, + #[codec(index = 3)] + #[doc = "Reschedule failed because it does not change scheduled time."] + RescheduleNoChange, + #[codec(index = 4)] + #[doc = "Attempt to use a non-named function on a named task."] + Named, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Events type."] + pub enum Event { + #[codec(index = 0)] + #[doc = "Scheduled some task."] + Scheduled { when: ::core::primitive::u64, index: ::core::primitive::u32 }, + #[codec(index = 1)] + #[doc = "Canceled some task."] + Canceled { when: ::core::primitive::u64, index: ::core::primitive::u32 }, + #[codec(index = 2)] + #[doc = "Dispatched some task."] + Dispatched { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + #[doc = "Set a retry configuration for some task."] + RetrySet { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + period: ::core::primitive::u64, + retries: ::core::primitive::u8, + }, + #[codec(index = 4)] + #[doc = "Cancel a retry configuration for some task."] + RetryCancelled { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 5)] + #[doc = "The call for the provided hash was not found so the task has been aborted."] + CallUnavailable { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 6)] + #[doc = "The given task was unable to be renewed since the agenda is full at that block."] + PeriodicFailed { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 7)] + #[doc = "The given task was unable to be retried since the agenda is full at that block or there"] + #[doc = "was not enough weight to reschedule it."] + RetryFailed { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 8)] + #[doc = "The given task can never be executed since it is overweight."] + PermanentlyOverweight { + task: (::core::primitive::u64, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RetryConfig<_0> { + pub total_retries: ::core::primitive::u8, + pub remaining: ::core::primitive::u8, + pub period: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Scheduled<_0, _1, _2, _3, _4> { + pub maybe_id: ::core::option::Option<_0>, + pub priority: ::core::primitive::u8, + pub call: _1, + pub maybe_periodic: ::core::option::Option<(_2, ::core::primitive::u32)>, + pub origin: _3, + #[codec(skip)] + pub __ignore: ::core::marker::PhantomData<_4>, + } + } + pub mod pallet_services { + use super::runtime_types; + pub mod module { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Create a new service blueprint."] + #[doc = ""] + #[doc = "A Service Blueprint is a template for a service that can be instantiated later on by a"] + #[doc = "user."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = "- `origin`: The account that is creating the service blueprint."] + #[doc = "- `blueprint`: The blueprint of the service."] + create_blueprint { + blueprint: runtime_types::tangle_primitives::services::ServiceBlueprint, + }, + #[codec(index = 1)] + #[doc = "Pre-register the caller as an operator for a specific blueprint."] + #[doc = ""] + #[doc = "The caller can pre-register for a blueprint, which will emit a `PreRegistration` event."] + #[doc = "This event can be listened to by the operator node to execute the custom blueprint's"] + #[doc = "registration function."] + #[doc = ""] + #[doc = "# Parameters"] + #[doc = "- `origin`: The account that is pre-registering for the service blueprint."] + #[doc = "- `blueprint_id`: The ID of the service blueprint."] + pre_register { + #[codec(compact)] + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 2)] + #[doc = "Register the caller as an operator for a specific blueprint."] + #[doc = ""] + #[doc = "The caller may require an approval first before they can accept to provide the service"] + #[doc = "for the users."] + register { + #[codec(compact)] + blueprint_id: ::core::primitive::u64, + preferences: + runtime_types::tangle_primitives::services::OperatorPreferences, + registration_args: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Unregister the caller from being an operator for the service blueprint"] + #[doc = "so that, no more services will assigned to the caller for this specific blueprint."] + #[doc = "Note that, the caller needs to keep providing service for other active service"] + #[doc = "that uses this blueprint, until the end of service time, otherwise they may get reported"] + #[doc = "and slashed."] + unregister { + #[codec(compact)] + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 4)] + #[doc = "Update the price targets for the caller for a specific service blueprint."] + #[doc = ""] + #[doc = "See [`Self::register`] for more information."] + update_price_targets { + #[codec(compact)] + blueprint_id: ::core::primitive::u64, + price_targets: runtime_types::tangle_primitives::services::PriceTargets, + }, + #[codec(index = 5)] + #[doc = "Request a new service to be initiated using the provided blueprint with a list of"] + #[doc = "operators that will run your service. Optionally, you can customize who is permitted"] + #[doc = "caller of this service, by default only the caller is allowed to call the service."] + request { + evm_origin: ::core::option::Option<::subxt_core::utils::H160>, + #[codec(compact)] + blueprint_id: ::core::primitive::u64, + permitted_callers: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + operators: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + request_args: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + assets: ::subxt_core::alloc::vec::Vec<::core::primitive::u128>, + #[codec(compact)] + ttl: ::core::primitive::u64, + payment_asset: runtime_types::tangle_primitives::services::Asset< + ::core::primitive::u128, + >, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 6)] + #[doc = "Approve a service request, so that the service can be initiated."] + #[doc = ""] + #[doc = "The `restaking_percent` is the percentage of the restaked tokens that will be exposed to"] + #[doc = "the service."] + approve { + #[codec(compact)] + request_id: ::core::primitive::u64, + #[codec(compact)] + restaking_percent: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 7)] + #[doc = "Reject a service request."] + #[doc = "The service will not be initiated, and the requester will need to update the service"] + #[doc = "request."] + reject { + #[codec(compact)] + request_id: ::core::primitive::u64, + }, + #[codec(index = 8)] + #[doc = "Terminates the service by the owner of the service."] + terminate { + #[codec(compact)] + service_id: ::core::primitive::u64, + }, + #[codec(index = 9)] + #[doc = "Call a Job in the service."] + #[doc = "The caller needs to be the owner of the service, or a permitted caller."] + call { + #[codec(compact)] + service_id: ::core::primitive::u64, + #[codec(compact)] + job: ::core::primitive::u8, + args: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 10)] + #[doc = "Submit the job result by using the service ID and call ID."] + submit_result { + #[codec(compact)] + service_id: ::core::primitive::u64, + #[codec(compact)] + call_id: ::core::primitive::u64, + result: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 11)] + #[doc = "Slash an operator (offender) for a service id with a given percent of their exposed"] + #[doc = "stake for that service."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Slash Origin for this service."] + #[doc = "Note that this does not apply the slash directly, but instead schedules a deferred call"] + #[doc = "to apply the slash by another entity."] + slash { + offender: ::subxt_core::utils::AccountId32, + #[codec(compact)] + service_id: ::core::primitive::u64, + #[codec(compact)] + percent: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 12)] + #[doc = "Dispute an [UnappliedSlash] for a given era and index."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Dispute Origin for the service in the"] + #[doc = "[UnappliedSlash]."] + dispute { + #[codec(compact)] + era: ::core::primitive::u32, + #[codec(compact)] + index: ::core::primitive::u32, + }, + #[codec(index = 13)] + #[doc = "Adds a new Master Blueprint Service Manager to the list of revisions."] + #[doc = ""] + #[doc = "The caller needs to be an authorized Master Blueprint Service Manager Update Origin."] + update_master_blueprint_service_manager { address: ::subxt_core::utils::H160 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The service blueprint was not found."] + BlueprintNotFound, + #[codec(index = 1)] + #[doc = "Blueprint creation is interrupted."] + BlueprintCreationInterrupted, + #[codec(index = 2)] + #[doc = "The caller is already registered as a operator."] + AlreadyRegistered, + #[codec(index = 3)] + #[doc = "The caller does not have the requirements to be a operator."] + InvalidRegistrationInput, + #[codec(index = 4)] + #[doc = "The Operator is not allowed to unregister."] + NotAllowedToUnregister, + #[codec(index = 5)] + #[doc = "The Operator is not allowed to update their price targets."] + NotAllowedToUpdatePriceTargets, + #[codec(index = 6)] + #[doc = "The caller does not have the requirements to request a service."] + InvalidRequestInput, + #[codec(index = 7)] + #[doc = "The caller does not have the requirements to call a job."] + InvalidJobCallInput, + #[codec(index = 8)] + #[doc = "The caller provided an invalid job result."] + InvalidJobResult, + #[codec(index = 9)] + #[doc = "The caller is not registered as a operator."] + NotRegistered, + #[codec(index = 10)] + #[doc = "Approval Process is interrupted."] + ApprovalInterrupted, + #[codec(index = 11)] + #[doc = "Rejection Process is interrupted."] + RejectionInterrupted, + #[codec(index = 12)] + #[doc = "The service request was not found."] + ServiceRequestNotFound, + #[codec(index = 13)] + #[doc = "Service Initialization interrupted."] + ServiceInitializationInterrupted, + #[codec(index = 14)] + #[doc = "The service was not found."] + ServiceNotFound, + #[codec(index = 15)] + #[doc = "The termination of the service was interrupted."] + TerminationInterrupted, + #[codec(index = 16)] + #[doc = "An error occurred while type checking the provided input input."] + TypeCheck(runtime_types::tangle_primitives::services::TypeCheckError), + #[codec(index = 17)] + #[doc = "The maximum number of permitted callers per service has been exceeded."] + MaxPermittedCallersExceeded, + #[codec(index = 18)] + #[doc = "The maximum number of operators per service has been exceeded."] + MaxServiceProvidersExceeded, + #[codec(index = 19)] + #[doc = "The maximum number of services per user has been exceeded."] + MaxServicesPerUserExceeded, + #[codec(index = 20)] + #[doc = "The maximum number of fields per request has been exceeded."] + MaxFieldsExceeded, + #[codec(index = 21)] + #[doc = "The approval is not requested for the operator (the caller)."] + ApprovalNotRequested, + #[codec(index = 22)] + #[doc = "The requested job definition does not exist."] + #[doc = "This error is returned when the requested job definition does not exist in the service"] + #[doc = "blueprint."] + JobDefinitionNotFound, + #[codec(index = 23)] + #[doc = "Either the service or the job call was not found."] + ServiceOrJobCallNotFound, + #[codec(index = 24)] + #[doc = "The result of the job call was not found."] + JobCallResultNotFound, + #[codec(index = 25)] + #[doc = "An error occurred while encoding the EVM ABI."] + EVMAbiEncode, + #[codec(index = 26)] + #[doc = "An error occurred while decoding the EVM ABI."] + EVMAbiDecode, + #[codec(index = 27)] + #[doc = "Operator profile not found."] + OperatorProfileNotFound, + #[codec(index = 28)] + #[doc = "Maximum number of services per Provider reached."] + MaxServicesPerProviderExceeded, + #[codec(index = 29)] + #[doc = "The operator is not active, ensure operator status is ACTIVE in multi-asset-delegation"] + OperatorNotActive, + #[codec(index = 30)] + #[doc = "No assets provided for the service, at least one asset is required."] + NoAssetsProvided, + #[codec(index = 31)] + #[doc = "The maximum number of assets per service has been exceeded."] + MaxAssetsPerServiceExceeded, + #[codec(index = 32)] + #[doc = "Offender is not a registered operator."] + OffenderNotOperator, + #[codec(index = 33)] + #[doc = "Offender is not an active operator."] + OffenderNotActiveOperator, + #[codec(index = 34)] + #[doc = "The Service Blueprint did not return a slashing origin for this service."] + NoSlashingOrigin, + #[codec(index = 35)] + #[doc = "The Service Blueprint did not return a dispute origin for this service."] + NoDisputeOrigin, + #[codec(index = 36)] + #[doc = "The Unapplied Slash are not found."] + UnappliedSlashNotFound, + #[codec(index = 37)] + #[doc = "The Supplied Master Blueprint Service Manager Revision is not found."] + MasterBlueprintServiceManagerRevisionNotFound, + #[codec(index = 38)] + #[doc = "Maximum number of Master Blueprint Service Manager revisions reached."] + MaxMasterBlueprintServiceManagerVersionsExceeded, + #[codec(index = 39)] + #[doc = "The ERC20 transfer failed."] + ERC20TransferFailed, + #[codec(index = 40)] + #[doc = "Missing EVM Origin for the EVM execution."] + MissingEVMOrigin, + #[codec(index = 41)] + #[doc = "Expected the account to be an EVM address."] + ExpectedEVMAddress, + #[codec(index = 42)] + #[doc = "Expected the account to be an account ID."] + ExpectedAccountId, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A new service blueprint has been created."] + BlueprintCreated { + owner: ::subxt_core::utils::AccountId32, + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 1)] + #[doc = "An operator has pre-registered for a service blueprint."] + PreRegistration { + operator: ::subxt_core::utils::AccountId32, + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 2)] + #[doc = "An new operator has been registered."] + Registered { + provider: ::subxt_core::utils::AccountId32, + blueprint_id: ::core::primitive::u64, + preferences: + runtime_types::tangle_primitives::services::OperatorPreferences, + registration_args: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 3)] + #[doc = "An operator has been unregistered."] + Unregistered { + operator: ::subxt_core::utils::AccountId32, + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 4)] + #[doc = "The price targets for an operator has been updated."] + PriceTargetsUpdated { + operator: ::subxt_core::utils::AccountId32, + blueprint_id: ::core::primitive::u64, + price_targets: runtime_types::tangle_primitives::services::PriceTargets, + }, + #[codec(index = 5)] + #[doc = "A new service has been requested."] + ServiceRequested { + owner: ::subxt_core::utils::AccountId32, + request_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + pending_approvals: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + approved: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + assets: ::subxt_core::alloc::vec::Vec<::core::primitive::u128>, + }, + #[codec(index = 6)] + #[doc = "A service request has been approved."] + ServiceRequestApproved { + operator: ::subxt_core::utils::AccountId32, + request_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + pending_approvals: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + approved: ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + }, + #[codec(index = 7)] + #[doc = "A service request has been rejected."] + ServiceRequestRejected { + operator: ::subxt_core::utils::AccountId32, + request_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 8)] + #[doc = "A service has been initiated."] + ServiceInitiated { + owner: ::subxt_core::utils::AccountId32, + request_id: ::core::primitive::u64, + service_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + assets: ::subxt_core::alloc::vec::Vec<::core::primitive::u128>, + }, + #[codec(index = 9)] + #[doc = "A service has been terminated."] + ServiceTerminated { + owner: ::subxt_core::utils::AccountId32, + service_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + }, + #[codec(index = 10)] + #[doc = "A job has been called."] + JobCalled { + caller: ::subxt_core::utils::AccountId32, + service_id: ::core::primitive::u64, + call_id: ::core::primitive::u64, + job: ::core::primitive::u8, + args: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 11)] + #[doc = "A job result has been submitted."] + JobResultSubmitted { + operator: ::subxt_core::utils::AccountId32, + service_id: ::core::primitive::u64, + call_id: ::core::primitive::u64, + job: ::core::primitive::u8, + result: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::field::Field< + ::subxt_core::utils::AccountId32, + >, + >, + }, + #[codec(index = 12)] + #[doc = "EVM execution reverted with a reason."] + EvmReverted { + from: ::subxt_core::utils::H160, + to: ::subxt_core::utils::H160, + data: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + reason: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 13)] + #[doc = "An Operator has an unapplied slash."] + UnappliedSlash { + index: ::core::primitive::u32, + operator: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + service_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + era: ::core::primitive::u32, + }, + #[codec(index = 14)] + #[doc = "An Unapplied Slash got discarded."] + SlashDiscarded { + index: ::core::primitive::u32, + operator: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + service_id: ::core::primitive::u64, + blueprint_id: ::core::primitive::u64, + era: ::core::primitive::u32, + }, + #[codec(index = 15)] + #[doc = "The Master Blueprint Service Manager has been revised."] + MasterBlueprintServiceManagerRevised { + revision: ::core::primitive::u32, + address: ::subxt_core::utils::H160, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UnappliedSlash<_0, _1> { + pub service_id: ::core::primitive::u64, + pub operator: _0, + pub own: _1, + pub others: ::subxt_core::alloc::vec::Vec<(_0, _1)>, + pub reporters: ::subxt_core::alloc::vec::Vec<_0>, + pub payout: _1, + } + } + } + pub mod pallet_session { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Sets the session key(s) of the function caller to `keys`."] + #[doc = "Allows an account to set its session key prior to becoming a validator."] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be signed."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is"] + #[doc = " fixed."] + set_keys { + keys: runtime_types::tangle_testnet_runtime::opaque::SessionKeys, + proof: ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + #[doc = "Removes any session key(s) of the function caller."] + #[doc = ""] + #[doc = "This doesn't take effect until the next session."] + #[doc = ""] + #[doc = "The dispatch origin of this function must be Signed and the account must be either be"] + #[doc = "convertible to a validator ID using the chain's typical addressing system (this usually"] + #[doc = "means being a controller account) or directly convertible into a validator ID (which"] + #[doc = "usually means being a stash account)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` in number of key types. Actual cost depends on the number of length of"] + #[doc = " `T::Keys::key_ids()` which is fixed."] + purge_keys, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Error for the session pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Invalid ownership proof."] + InvalidProof, + #[codec(index = 1)] + #[doc = "No associated validator ID for account."] + NoAssociatedValidatorId, + #[codec(index = 2)] + #[doc = "Registered duplicate key."] + DuplicatedKey, + #[codec(index = 3)] + #[doc = "No keys are associated with this account."] + NoKeys, + #[codec(index = 4)] + #[doc = "Key setting account is not live, so it's impossible to associate keys."] + NoAccount, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "New session has happened. Note that the argument is the session index, not the"] + #[doc = "block number as the type might suggest."] + NewSession { session_index: ::core::primitive::u32 }, + } + } + } + pub mod pallet_staking { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Take the origin account as a stash and lock up `value` of its balance. `controller` will"] + #[doc = "be the account that controls it."] + #[doc = ""] + #[doc = "`value` must be more than the `minimum_balance` specified by `T::Currency`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash account."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Moderate complexity."] + #[doc = "- O(1)."] + #[doc = "- Three extra DB entries."] + #[doc = ""] + #[doc = "NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned"] + #[doc = "unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed"] + #[doc = "as dust."] + bond { + #[codec(compact)] + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >, + }, + #[codec(index = 1)] + #[doc = "Add some extra amount that have appeared in the stash `free_balance` into the balance up"] + #[doc = "for staking."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "Use this if there are additional funds in your stash account that you wish to bond."] + #[doc = "Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose"] + #[doc = "any limitation on the amount that can be added."] + #[doc = ""] + #[doc = "Emits `Bonded`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- O(1)."] + bond_extra { + #[codec(compact)] + max_additional: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "Schedule a portion of the stash to be unlocked ready for transfer out after the bond"] + #[doc = "period ends. If this leaves an amount actively bonded less than"] + #[doc = "T::Currency::minimum_balance(), then it is increased to the full amount."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "Once the unlock period is done, you can call `withdraw_unbonded` to actually move"] + #[doc = "the funds out of management ready for transfer."] + #[doc = ""] + #[doc = "No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)"] + #[doc = "can co-exists at the same time. If there are no unlocking chunks slots available"] + #[doc = "[`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible)."] + #[doc = ""] + #[doc = "If a user encounters the `InsufficientBond` error when calling this extrinsic,"] + #[doc = "they should call `chill` first in order to free up their bonded funds."] + #[doc = ""] + #[doc = "Emits `Unbonded`."] + #[doc = ""] + #[doc = "See also [`Call::withdraw_unbonded`]."] + unbond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "Remove any unlocked chunks from the `unlocking` queue from our management."] + #[doc = ""] + #[doc = "This essentially frees up that balance to be used by the stash account to do whatever"] + #[doc = "it wants."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller."] + #[doc = ""] + #[doc = "Emits `Withdrawn`."] + #[doc = ""] + #[doc = "See also [`Call::unbond`]."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans` indicates the number of metadata slashing spans to clear when"] + #[doc = "this call results in a complete removal of all the data related to the stash account."] + #[doc = "In this case, the `num_slashing_spans` must be larger or equal to the number of"] + #[doc = "slashing spans associated with the stash account in the [`SlashingSpans`] storage type,"] + #[doc = "otherwise the call will fail. The call weight is directly proportional to"] + #[doc = "`num_slashing_spans`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(S) where S is the number of slashing spans to remove"] + #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."] + withdraw_unbonded { num_slashing_spans: ::core::primitive::u32 }, + #[codec(index = 4)] + #[doc = "Declare the desire to validate for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + validate { prefs: runtime_types::pallet_staking::ValidatorPrefs }, + #[codec(index = 5)] + #[doc = "Declare the desire to nominate `targets` for the origin controller."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- The transaction's complexity is proportional to the size of `targets` (N)"] + #[doc = "which is capped at CompactAssignments::LIMIT (T::MaxNominations)."] + #[doc = "- Both the reads and writes follow a similar pattern."] + nominate { + targets: ::subxt_core::alloc::vec::Vec< + ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 6)] + #[doc = "Declare no desire to either validate or nominate."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains one read."] + #[doc = "- Writes are limited to the `origin` account key."] + chill, + #[codec(index = 7)] + #[doc = "(Re-)set the payment target for a controller."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + #[doc = "---------"] + set_payee { + payee: runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >, + }, + #[codec(index = 8)] + #[doc = "(Re-)sets the controller of a stash to the stash itself. This function previously"] + #[doc = "accepted a `controller` argument to set the controller to an account other than the"] + #[doc = "stash itself. This functionality has now been removed, now only setting the controller"] + #[doc = "to the stash, if it is not already."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the stash, not the controller."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(1)"] + #[doc = "- Independent of the arguments. Insignificant complexity."] + #[doc = "- Contains a limited number of reads."] + #[doc = "- Writes are limited to the `origin` account key."] + set_controller, + #[codec(index = 9)] + #[doc = "Sets the ideal number of validators."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "O(1)"] + set_validator_count { + #[codec(compact)] + new: ::core::primitive::u32, + }, + #[codec(index = 10)] + #[doc = "Increments the ideal number of validators up to maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "Same as [`Self::set_validator_count`]."] + increase_validator_count { + #[codec(compact)] + additional: ::core::primitive::u32, + }, + #[codec(index = 11)] + #[doc = "Scale up the ideal number of validators by a factor up to maximum of"] + #[doc = "`ElectionProviderBase::MaxWinners`."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "Same as [`Self::set_validator_count`]."] + scale_validator_count { + factor: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 12)] + #[doc = "Force there to be no new eras indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "Thus the election process may be ongoing when this is called. In this case the"] + #[doc = "election will continue until the next era is triggered."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + force_no_eras, + #[codec(index = 13)] + #[doc = "Force there to be a new era at the end of the next session. After this, it will be"] + #[doc = "reset to normal (non-forced) behaviour."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- No arguments."] + #[doc = "- Weight: O(1)"] + force_new_era, + #[codec(index = 14)] + #[doc = "Set the validators who cannot be slashed (if any)."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + set_invulnerables { + invulnerables: + ::subxt_core::alloc::vec::Vec<::subxt_core::utils::AccountId32>, + }, + #[codec(index = 15)] + #[doc = "Force a current staker to become completely unstaked, immediately."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more"] + #[doc = "details."] + force_unstake { + stash: ::subxt_core::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 16)] + #[doc = "Force there to be a new era at the end of sessions indefinitely."] + #[doc = ""] + #[doc = "The dispatch origin must be Root."] + #[doc = ""] + #[doc = "# Warning"] + #[doc = ""] + #[doc = "The election process starts multiple blocks before the end of the era."] + #[doc = "If this is called just before a new era is triggered, the election process may not"] + #[doc = "have enough blocks to get a result."] + force_new_era_always, + #[codec(index = 17)] + #[doc = "Cancel enactment of a deferred slash."] + #[doc = ""] + #[doc = "Can be called by the `T::AdminOrigin`."] + #[doc = ""] + #[doc = "Parameters: era and indices of the slashes for that era to kill."] + cancel_deferred_slash { + era: ::core::primitive::u32, + slash_indices: ::subxt_core::alloc::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 18)] + #[doc = "Pay out next page of the stakers behind a validator for the given era."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "The reward payout could be paged in case there are too many nominators backing the"] + #[doc = "`validator_stash`. This call will payout unpaid pages in an ascending order. To claim a"] + #[doc = "specific page, use `payout_stakers_by_page`.`"] + #[doc = ""] + #[doc = "If all pages are claimed, it returns an error `InvalidPage`."] + payout_stakers { + validator_stash: ::subxt_core::utils::AccountId32, + era: ::core::primitive::u32, + }, + #[codec(index = 19)] + #[doc = "Rebond a portion of the stash scheduled to be unlocked."] + #[doc = ""] + #[doc = "The dispatch origin must be signed by the controller."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- Time complexity: O(L), where L is unlocking chunks"] + #[doc = "- Bounded by `MaxUnlockingChunks`."] + rebond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 20)] + #[doc = "Remove all data structures concerning a staker/stash once it is at a state where it can"] + #[doc = "be considered `dust` in the staking system. The requirements are:"] + #[doc = ""] + #[doc = "1. the `total_balance` of the stash is below existential deposit."] + #[doc = "2. or, the `ledger.total` of the stash is below existential deposit."] + #[doc = "3. or, existential deposit is zero and either `total_balance` or `ledger.total` is zero."] + #[doc = ""] + #[doc = "The former can happen in cases like a slash; the latter when a fully unbonded account"] + #[doc = "is still receiving staking rewards in `RewardDestination::Staked`."] + #[doc = ""] + #[doc = "It can be called by anyone, as long as `stash` meets the above requirements."] + #[doc = ""] + #[doc = "Refunds the transaction fees upon successful execution."] + #[doc = ""] + #[doc = "## Parameters"] + #[doc = ""] + #[doc = "- `num_slashing_spans`: Refer to comments on [`Call::withdraw_unbonded`] for more"] + #[doc = "details."] + reap_stash { + stash: ::subxt_core::utils::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 21)] + #[doc = "Remove the given nominations from the calling validator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ by the controller, not the stash."] + #[doc = ""] + #[doc = "- `who`: A list of nominator stash accounts who are nominating this validator which"] + #[doc = " should no longer be nominating this validator."] + #[doc = ""] + #[doc = "Note: Making this call only makes sense if you first set the validator preferences to"] + #[doc = "block any further nominations."] + kick { + who: ::subxt_core::alloc::vec::Vec< + ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + >, + }, + #[codec(index = 22)] + #[doc = "Update the various staking configurations ."] + #[doc = ""] + #[doc = "* `min_nominator_bond`: The minimum active bond needed to be a nominator."] + #[doc = "* `min_validator_bond`: The minimum active bond needed to be a validator."] + #[doc = "* `max_nominator_count`: The max number of users who can be a nominator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `max_validator_count`: The max number of users who can be a validator at once. When"] + #[doc = " set to `None`, no limit is enforced."] + #[doc = "* `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which"] + #[doc = " should be filled in order for the `chill_other` transaction to work."] + #[doc = "* `min_commission`: The minimum amount of commission that each validators must maintain."] + #[doc = " This is checked only upon calling `validate`. Existing validators are not affected."] + #[doc = ""] + #[doc = "RuntimeOrigin must be Root to call this function."] + #[doc = ""] + #[doc = "NOTE: Existing nominators and validators will not be affected by this update."] + #[doc = "to kick people under the new limits, `chill_other` should be called."] + set_staking_configs { + min_nominator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + min_validator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + chill_threshold: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + max_staked_rewards: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + }, + #[codec(index = 23)] + #[doc = "Declare a `controller` to stop participating as either a validator or nominator."] + #[doc = ""] + #[doc = "Effects will be felt at the beginning of the next era."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_, but can be called by anyone."] + #[doc = ""] + #[doc = "If the caller is the same as the controller being targeted, then no further checks are"] + #[doc = "enforced, and this function behaves just like `chill`."] + #[doc = ""] + #[doc = "If the caller is different than the controller being targeted, the following conditions"] + #[doc = "must be met:"] + #[doc = ""] + #[doc = "* `controller` must belong to a nominator who has become non-decodable,"] + #[doc = ""] + #[doc = "Or:"] + #[doc = ""] + #[doc = "* A `ChillThreshold` must be set and checked which defines how close to the max"] + #[doc = " nominators or validators we must reach before users can start chilling one-another."] + #[doc = "* A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine"] + #[doc = " how close we are to the threshold."] + #[doc = "* A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines"] + #[doc = " if this is a person that should be chilled because they have not met the threshold"] + #[doc = " bond required."] + #[doc = ""] + #[doc = "This can be helpful if bond requirements are updated, and we need to remove old users"] + #[doc = "who do not satisfy these requirements."] + chill_other { stash: ::subxt_core::utils::AccountId32 }, + #[codec(index = 24)] + #[doc = "Force a validator to have at least the minimum commission. This will not affect a"] + #[doc = "validator who already has a commission greater than or equal to the minimum. Any account"] + #[doc = "can call this."] + force_apply_min_commission { + validator_stash: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 25)] + #[doc = "Sets the minimum amount of commission that each validators must maintain."] + #[doc = ""] + #[doc = "This call has lower privilege requirements than `set_staking_config` and can be called"] + #[doc = "by the `T::AdminOrigin`. Root can always call this."] + set_min_commission { + new: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 26)] + #[doc = "Pay out a page of the stakers behind a validator for the given era and page."] + #[doc = ""] + #[doc = "- `validator_stash` is the stash account of the validator."] + #[doc = "- `era` may be any era between `[current_era - history_depth; current_era]`."] + #[doc = "- `page` is the page index of nominators to pay out with value between 0 and"] + #[doc = " `num_nominators / T::MaxExposurePageSize`."] + #[doc = ""] + #[doc = "The origin of this call must be _Signed_. Any account can call this function, even if"] + #[doc = "it is not one of the stakers."] + #[doc = ""] + #[doc = "If a validator has more than [`Config::MaxExposurePageSize`] nominators backing"] + #[doc = "them, then the list of nominators is paged, with each page being capped at"] + #[doc = "[`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators,"] + #[doc = "the call needs to be made for each page separately in order for all the nominators"] + #[doc = "backing a validator to receive the reward. The nominators are not sorted across pages"] + #[doc = "and so it should not be assumed the highest staker would be on the topmost page and vice"] + #[doc = "versa. If rewards are not claimed in [`Config::HistoryDepth`] eras, they are lost."] + payout_stakers_by_page { + validator_stash: ::subxt_core::utils::AccountId32, + era: ::core::primitive::u32, + page: ::core::primitive::u32, + }, + #[codec(index = 27)] + #[doc = "Migrates an account's `RewardDestination::Controller` to"] + #[doc = "`RewardDestination::Account(controller)`."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "This will waive the transaction fee if the `payee` is successfully migrated."] + update_payee { controller: ::subxt_core::utils::AccountId32 }, + #[codec(index = 28)] + #[doc = "Updates a batch of controller accounts to their corresponding stash account if they are"] + #[doc = "not the same. Ignores any controller accounts that do not exist, and does not operate if"] + #[doc = "the stash and controller are already the same."] + #[doc = ""] + #[doc = "Effects will be felt instantly (as soon as this function is completed successfully)."] + #[doc = ""] + #[doc = "The dispatch origin must be `T::AdminOrigin`."] + deprecate_controller_batch { + controllers: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >, + }, + #[codec(index = 29)] + #[doc = "Restores the state of a ledger which is in an inconsistent state."] + #[doc = ""] + #[doc = "The requirements to restore a ledger are the following:"] + #[doc = "* The stash is bonded; or"] + #[doc = "* The stash is not bonded but it has a staking lock left behind; or"] + #[doc = "* If the stash has an associated ledger and its state is inconsistent; or"] + #[doc = "* If the ledger is not corrupted *but* its staking lock is out of sync."] + #[doc = ""] + #[doc = "The `maybe_*` input parameters will overwrite the corresponding data and metadata of the"] + #[doc = "ledger associated with the stash. If the input parameters are not set, the ledger will"] + #[doc = "be reset values from on-chain state."] + restore_ledger { + stash: ::subxt_core::utils::AccountId32, + maybe_controller: + ::core::option::Option<::subxt_core::utils::AccountId32>, + maybe_total: ::core::option::Option<::core::primitive::u128>, + maybe_unlocking: ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_staking::UnlockChunk< + ::core::primitive::u128, + >, + >, + >, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Not a controller account."] + NotController, + #[codec(index = 1)] + #[doc = "Not a stash account."] + NotStash, + #[codec(index = 2)] + #[doc = "Stash is already bonded."] + AlreadyBonded, + #[codec(index = 3)] + #[doc = "Controller is already paired."] + AlreadyPaired, + #[codec(index = 4)] + #[doc = "Targets cannot be empty."] + EmptyTargets, + #[codec(index = 5)] + #[doc = "Duplicate index."] + DuplicateIndex, + #[codec(index = 6)] + #[doc = "Slash record index out of bounds."] + InvalidSlashIndex, + #[codec(index = 7)] + #[doc = "Cannot have a validator or nominator role, with value less than the minimum defined by"] + #[doc = "governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the"] + #[doc = "intention, `chill` first to remove one's role as validator/nominator."] + InsufficientBond, + #[codec(index = 8)] + #[doc = "Can not schedule more unlock chunks."] + NoMoreChunks, + #[codec(index = 9)] + #[doc = "Can not rebond without unlocking chunks."] + NoUnlockChunk, + #[codec(index = 10)] + #[doc = "Attempting to target a stash that still has funds."] + FundedTarget, + #[codec(index = 11)] + #[doc = "Invalid era to reward."] + InvalidEraToReward, + #[codec(index = 12)] + #[doc = "Invalid number of nominations."] + InvalidNumberOfNominations, + #[codec(index = 13)] + #[doc = "Items are not sorted and unique."] + NotSortedAndUnique, + #[codec(index = 14)] + #[doc = "Rewards for this era have already been claimed for this validator."] + AlreadyClaimed, + #[codec(index = 15)] + #[doc = "No nominators exist on this page."] + InvalidPage, + #[codec(index = 16)] + #[doc = "Incorrect previous history depth input provided."] + IncorrectHistoryDepth, + #[codec(index = 17)] + #[doc = "Incorrect number of slashing spans provided."] + IncorrectSlashingSpans, + #[codec(index = 18)] + #[doc = "Internal state has become somehow corrupted and the operation cannot continue."] + BadState, + #[codec(index = 19)] + #[doc = "Too many nomination targets supplied."] + TooManyTargets, + #[codec(index = 20)] + #[doc = "A nomination target was supplied that was blocked or otherwise not a validator."] + BadTarget, + #[codec(index = 21)] + #[doc = "The user has enough bond and thus cannot be chilled forcefully by an external person."] + CannotChillOther, + #[codec(index = 22)] + #[doc = "There are too many nominators in the system. Governance needs to adjust the staking"] + #[doc = "settings to keep things safe for the runtime."] + TooManyNominators, + #[codec(index = 23)] + #[doc = "There are too many validator candidates in the system. Governance needs to adjust the"] + #[doc = "staking settings to keep things safe for the runtime."] + TooManyValidators, + #[codec(index = 24)] + #[doc = "Commission is too low. Must be at least `MinCommission`."] + CommissionTooLow, + #[codec(index = 25)] + #[doc = "Some bound is not met."] + BoundNotMet, + #[codec(index = 26)] + #[doc = "Used when attempting to use deprecated controller account logic."] + ControllerDeprecated, + #[codec(index = 27)] + #[doc = "Cannot reset a ledger."] + CannotRestoreLedger, + #[codec(index = 28)] + #[doc = "Provided reward destination is not allowed."] + RewardDestinationRestricted, + #[codec(index = 29)] + #[doc = "Not enough funds available to withdraw."] + NotEnoughFunds, + #[codec(index = 30)] + #[doc = "Operation not allowed for virtual stakers."] + VirtualStakerNotAllowed, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "The era payout has been set; the first balance is the validator-payout; the second is"] + #[doc = "the remainder from the maximum amount of reward."] + EraPaid { + era_index: ::core::primitive::u32, + validator_payout: ::core::primitive::u128, + remainder: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "The nominator has been rewarded by this amount to this destination."] + Rewarded { + stash: ::subxt_core::utils::AccountId32, + dest: runtime_types::pallet_staking::RewardDestination< + ::subxt_core::utils::AccountId32, + >, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + #[doc = "A staker (validator or nominator) has been slashed by the given amount."] + Slashed { + staker: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + #[doc = "A slash for the given validator, for the given percentage of their stake, at the given"] + #[doc = "era as been reported."] + SlashReported { + validator: ::subxt_core::utils::AccountId32, + fraction: runtime_types::sp_arithmetic::per_things::Perbill, + slash_era: ::core::primitive::u32, + }, + #[codec(index = 4)] + #[doc = "An old slashing report from a prior era was discarded because it could"] + #[doc = "not be processed."] + OldSlashingReportDiscarded { session_index: ::core::primitive::u32 }, + #[codec(index = 5)] + #[doc = "A new set of stakers was elected."] + StakersElected, + #[codec(index = 6)] + #[doc = "An account has bonded this amount. \\[stash, amount\\]"] + #[doc = ""] + #[doc = "NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,"] + #[doc = "it will not be emitted for staking rewards when they are added to stake."] + Bonded { + stash: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "An account has unbonded this amount."] + Unbonded { + stash: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"] + #[doc = "from the unlocking queue."] + Withdrawn { + stash: ::subxt_core::utils::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + #[doc = "A nominator has been kicked from a validator."] + Kicked { + nominator: ::subxt_core::utils::AccountId32, + stash: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 10)] + #[doc = "The election failed. No new era is planned."] + StakingElectionFailed, + #[codec(index = 11)] + #[doc = "An account has stopped participating as either a validator or nominator."] + Chilled { stash: ::subxt_core::utils::AccountId32 }, + #[codec(index = 12)] + #[doc = "The stakers' rewards are getting paid."] + PayoutStarted { + era_index: ::core::primitive::u32, + validator_stash: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 13)] + #[doc = "A validator has set their preferences."] + ValidatorPrefsSet { + stash: ::subxt_core::utils::AccountId32, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + }, + #[codec(index = 14)] + #[doc = "Voters size limit reached."] + SnapshotVotersSizeExceeded { size: ::core::primitive::u32 }, + #[codec(index = 15)] + #[doc = "Targets size limit reached."] + SnapshotTargetsSizeExceeded { size: ::core::primitive::u32 }, + #[codec(index = 16)] + #[doc = "A new force era mode was set."] + ForceEra { mode: runtime_types::pallet_staking::Forcing }, + #[codec(index = 17)] + #[doc = "Report of a controller batch deprecation."] + ControllerBatchDeprecated { failures: ::core::primitive::u32 }, + } + } + } + pub mod slashing { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SlashingSpans { + pub span_index: ::core::primitive::u32, + pub last_start: ::core::primitive::u32, + pub last_nonzero_slash: ::core::primitive::u32, + pub prior: ::subxt_core::alloc::vec::Vec<::core::primitive::u32>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SpanRecord<_0> { + pub slashed: _0, + pub paid_out: _0, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ActiveEraInfo { + pub index: ::core::primitive::u32, + pub start: ::core::option::Option<::core::primitive::u64>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EraRewardPoints<_0> { + pub total: ::core::primitive::u32, + pub individual: ::subxt_core::utils::KeyedVec<_0, ::core::primitive::u32>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Forcing { + #[codec(index = 0)] + NotForcing, + #[codec(index = 1)] + ForceNew, + #[codec(index = 2)] + ForceNone, + #[codec(index = 3)] + ForceAlways, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Nominations { + pub targets: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::subxt_core::utils::AccountId32, + >, + pub submitted_in: ::core::primitive::u32, + pub suppressed: ::core::primitive::bool, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RewardDestination<_0> { + #[codec(index = 0)] + Staked, + #[codec(index = 1)] + Stash, + #[codec(index = 2)] + Controller, + #[codec(index = 3)] + Account(_0), + #[codec(index = 4)] + None, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct StakingLedger { + pub stash: ::subxt_core::utils::AccountId32, + #[codec(compact)] + pub total: ::core::primitive::u128, + #[codec(compact)] + pub active: ::core::primitive::u128, + pub unlocking: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, + >, + pub legacy_claimed_rewards: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UnappliedSlash<_0, _1> { + pub validator: _0, + pub own: _1, + pub others: ::subxt_core::alloc::vec::Vec<(_0, _1)>, + pub reporters: ::subxt_core::alloc::vec::Vec<_0>, + pub payout: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UnlockChunk<_0> { + #[codec(compact)] + pub value: _0, + #[codec(compact)] + pub era: ::core::primitive::u32, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ValidatorPrefs { + #[codec(compact)] + pub commission: runtime_types::sp_arithmetic::per_things::Perbill, + pub blocked: ::core::primitive::bool, + } + } + pub mod pallet_sudo { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + sudo { + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Sudo user to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + sudo_unchecked_weight { + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + weight: runtime_types::sp_weights::weight_v2::Weight, + }, + #[codec(index = 2)] + #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"] + #[doc = "key."] + set_key { + new: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + #[doc = "Authenticates the sudo key and dispatches a function call with `Signed` origin from"] + #[doc = "a given account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + sudo_as { + who: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 4)] + #[doc = "Permanently removes the sudo key."] + #[doc = ""] + #[doc = "**This cannot be un-done.**"] + remove_key, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Error for the Sudo pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Sender must be the Sudo account."] + RequireSudo, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A sudo call just took place."] + Sudid { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + #[doc = "The sudo key has been updated."] + KeyChanged { + old: ::core::option::Option<::subxt_core::utils::AccountId32>, + new: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "The key was permanently removed."] + KeyRemoved, + #[codec(index = 3)] + #[doc = "A [sudo_as](Pallet::sudo_as) call just took place."] + SudoAsDone { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } + } + pub mod pallet_tangle_lst { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + # [codec (index = 0)] # [doc = "Stake funds with a pool. The amount to bond is transferred from the member to the"] # [doc = "pools account and immediately increases the pools bond."] # [doc = ""] # [doc = "# Note"] # [doc = ""] # [doc = "* This call will *not* dust the member account, so the member must have at least"] # [doc = " `existential deposit + amount` in their account."] # [doc = "* Only a pool with [`PoolState::Open`] can be joined"] join { # [codec (compact)] amount : :: core :: primitive :: u128 , pool_id : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "Bond `extra` more funds from `origin` into the pool to which they already belong."] # [doc = ""] # [doc = "Additional funds can come from either the free balance of the account, of from the"] # [doc = "accumulated rewards, see [`BondExtra`]."] # [doc = ""] # [doc = "Bonding extra funds implies an automatic payout of all pending rewards as well."] # [doc = "See `bond_extra_other` to bond pending rewards of `other` members."] bond_extra { pool_id : :: core :: primitive :: u32 , extra : runtime_types :: pallet_tangle_lst :: types :: BondExtra < :: core :: primitive :: u128 > , } , # [codec (index = 3)] # [doc = "Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It"] # [doc = "implicitly collects the rewards one last time, since not doing so would mean some"] # [doc = "rewards would be forfeited."] # [doc = ""] # [doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] # [doc = "account)."] # [doc = ""] # [doc = "# Conditions for a permissionless dispatch."] # [doc = ""] # [doc = "* The pool is blocked and the caller is either the root or bouncer. This is refereed to"] # [doc = " as a kick."] # [doc = "* The pool is destroying and the member is not the depositor."] # [doc = "* The pool is destroying, the member is the depositor and no other members are in the"] # [doc = " pool."] # [doc = ""] # [doc = "## Conditions for permissioned dispatch (i.e. the caller is also the"] # [doc = "`member_account`):"] # [doc = ""] # [doc = "* The caller is not the depositor."] # [doc = "* The caller is the depositor, the pool is destroying and no other members are in the"] # [doc = " pool."] # [doc = ""] # [doc = "# Note"] # [doc = ""] # [doc = "If there are too many unlocking chunks to unbond with the pool account,"] # [doc = "[`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks."] # [doc = "The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`]"] # [doc = "to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks"] # [doc = "are available). However, it may not be possible to release the current unlocking chunks,"] # [doc = "in which case, the result of this call will likely be the `NoMoreChunks` error from the"] # [doc = "staking system."] unbond { member_account : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , pool_id : :: core :: primitive :: u32 , # [codec (compact)] unbonding_points : :: core :: primitive :: u128 , } , # [codec (index = 4)] # [doc = "Call `withdraw_unbonded` for the pools account. This call can be made by any account."] # [doc = ""] # [doc = "This is useful if there are too many unlocking chunks to call `unbond`, and some"] # [doc = "can be cleared by withdrawing. In the case there are too many unlocking chunks, the user"] # [doc = "would probably see an error like `NoMoreChunks` emitted from the staking system when"] # [doc = "they attempt to unbond."] pool_withdraw_unbonded { pool_id : :: core :: primitive :: u32 , num_slashing_spans : :: core :: primitive :: u32 , } , # [codec (index = 5)] # [doc = "Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an"] # [doc = "error is returned."] # [doc = ""] # [doc = "Under certain conditions, this call can be dispatched permissionlessly (i.e. by any"] # [doc = "account)."] # [doc = ""] # [doc = "# Conditions for a permissionless dispatch"] # [doc = ""] # [doc = "* The pool is in destroy mode and the target is not the depositor."] # [doc = "* The target is the depositor and they are the only member in the sub pools."] # [doc = "* The pool is blocked and the caller is either the root or bouncer."] # [doc = ""] # [doc = "# Conditions for permissioned dispatch"] # [doc = ""] # [doc = "* The caller is the target and they are not the depositor."] # [doc = ""] # [doc = "# Note"] # [doc = ""] # [doc = "If the target is the depositor, the pool will be destroyed."] withdraw_unbonded { member_account : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , pool_id : :: core :: primitive :: u32 , num_slashing_spans : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "Create a new delegation pool."] # [doc = ""] # [doc = "# Arguments"] # [doc = ""] # [doc = "* `amount` - The amount of funds to delegate to the pool. This also acts of a sort of"] # [doc = " deposit since the pools creator cannot fully unbond funds until the pool is being"] # [doc = " destroyed."] # [doc = "* `index` - A disambiguation index for creating the account. Likely only useful when"] # [doc = " creating multiple pools in the same extrinsic."] # [doc = "* `root` - The account to set as [`PoolRoles::root`]."] # [doc = "* `nominator` - The account to set as the [`PoolRoles::nominator`]."] # [doc = "* `bouncer` - The account to set as the [`PoolRoles::bouncer`]."] # [doc = ""] # [doc = "# Note"] # [doc = ""] # [doc = "In addition to `amount`, the caller will transfer the existential deposit; so the caller"] # [doc = "needs at have at least `amount + existential_deposit` transferable."] create { # [codec (compact)] amount : :: core :: primitive :: u128 , root : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , nominator : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , bouncer : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , name : :: core :: option :: Option < runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > > , icon : :: core :: option :: Option < runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > > , } , # [codec (index = 7)] # [doc = "Create a new delegation pool with a previously used pool id"] # [doc = ""] # [doc = "# Arguments"] # [doc = ""] # [doc = "same as `create` with the inclusion of"] # [doc = "* `pool_id` - `A valid PoolId."] create_with_pool_id { # [codec (compact)] amount : :: core :: primitive :: u128 , root : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , nominator : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , bouncer : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , pool_id : :: core :: primitive :: u32 , name : :: core :: option :: Option < runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > > , icon : :: core :: option :: Option < runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > > , } , # [codec (index = 8)] # [doc = "Nominate on behalf of the pool."] # [doc = ""] # [doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] # [doc = "root role."] # [doc = ""] # [doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] # [doc = "account."] nominate { pool_id : :: core :: primitive :: u32 , validators : :: subxt_core :: alloc :: vec :: Vec < :: subxt_core :: utils :: AccountId32 > , } , # [codec (index = 9)] # [doc = "Set a new state for the pool."] # [doc = ""] # [doc = "If a pool is already in the `Destroying` state, then under no condition can its state"] # [doc = "change again."] # [doc = ""] # [doc = "The dispatch origin of this call must be either:"] # [doc = ""] # [doc = "1. signed by the bouncer, or the root role of the pool,"] # [doc = "2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and"] # [doc = " then the state of the pool can be permissionlessly changed to `Destroying`."] set_state { pool_id : :: core :: primitive :: u32 , state : runtime_types :: pallet_tangle_lst :: types :: pools :: PoolState , } , # [codec (index = 10)] # [doc = "Set a new metadata for the pool."] # [doc = ""] # [doc = "The dispatch origin of this call must be signed by the bouncer, or the root role of the"] # [doc = "pool."] set_metadata { pool_id : :: core :: primitive :: u32 , metadata : :: subxt_core :: alloc :: vec :: Vec < :: core :: primitive :: u8 > , } , # [codec (index = 11)] # [doc = "Update configurations for the nomination pools. The origin for this call must be"] # [doc = "Root."] # [doc = ""] # [doc = "# Arguments"] # [doc = ""] # [doc = "* `min_join_bond` - Set [`MinJoinBond`]."] # [doc = "* `min_create_bond` - Set [`MinCreateBond`]."] # [doc = "* `max_pools` - Set [`MaxPools`]."] # [doc = "* `max_members` - Set [`MaxPoolMembers`]."] # [doc = "* `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]."] # [doc = "* `global_max_commission` - Set [`GlobalMaxCommission`]."] set_configs { min_join_bond : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < :: core :: primitive :: u128 > , min_create_bond : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < :: core :: primitive :: u128 > , max_pools : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < :: core :: primitive :: u32 > , global_max_commission : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < runtime_types :: sp_arithmetic :: per_things :: Perbill > , } , # [codec (index = 12)] # [doc = "Update the roles of the pool."] # [doc = ""] # [doc = "The root is the only entity that can change any of the roles, including itself,"] # [doc = "excluding the depositor, who can never change."] # [doc = ""] # [doc = "It emits an event, notifying UIs of the role change. This event is quite relevant to"] # [doc = "most pool members and they should be informed of changes to pool roles."] update_roles { pool_id : :: core :: primitive :: u32 , new_root : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < :: subxt_core :: utils :: AccountId32 > , new_nominator : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < :: subxt_core :: utils :: AccountId32 > , new_bouncer : runtime_types :: pallet_tangle_lst :: types :: ConfigOp < :: subxt_core :: utils :: AccountId32 > , } , # [codec (index = 13)] # [doc = "Chill on behalf of the pool."] # [doc = ""] # [doc = "The dispatch origin of this call must be signed by the pool nominator or the pool"] # [doc = "root role, same as [`Pallet::nominate`]."] # [doc = ""] # [doc = "This directly forward the call to the staking pallet, on behalf of the pool bonded"] # [doc = "account."] chill { pool_id : :: core :: primitive :: u32 , } , # [codec (index = 14)] # [doc = "`origin` bonds funds from `extra` for some pool member `member` into their respective"] # [doc = "pools."] # [doc = ""] # [doc = "`origin` can bond extra funds from free balance or pending rewards when `origin =="] # [doc = "other`."] # [doc = ""] # [doc = "In the case of `origin != other`, `origin` can only bond extra pending rewards of"] # [doc = "`other` members assuming set_claim_permission for the given member is"] # [doc = "`PermissionlessAll` or `PermissionlessCompound`."] bond_extra_other { member : :: subxt_core :: utils :: MultiAddress < :: subxt_core :: utils :: AccountId32 , :: core :: primitive :: u32 > , pool_id : :: core :: primitive :: u32 , extra : runtime_types :: pallet_tangle_lst :: types :: BondExtra < :: core :: primitive :: u128 > , } , # [codec (index = 17)] # [doc = "Set the commission of a pool."] # [doc = "Both a commission percentage and a commission payee must be provided in the `current`"] # [doc = "tuple. Where a `current` of `None` is provided, any current commission will be removed."] # [doc = ""] # [doc = "- If a `None` is supplied to `new_commission`, existing commission will be removed."] set_commission { pool_id : :: core :: primitive :: u32 , new_commission : :: core :: option :: Option < (runtime_types :: sp_arithmetic :: per_things :: Perbill , :: subxt_core :: utils :: AccountId32 ,) > , } , # [codec (index = 18)] # [doc = "Set the maximum commission of a pool."] # [doc = ""] # [doc = "- Initial max can be set to any `Perbill`, and only smaller values thereafter."] # [doc = "- Current commission will be lowered in the event it is higher than a new max"] # [doc = " commission."] set_commission_max { pool_id : :: core :: primitive :: u32 , max_commission : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 19)] # [doc = "Set the commission change rate for a pool."] # [doc = ""] # [doc = "Initial change rate is not bounded, whereas subsequent updates can only be more"] # [doc = "restrictive than the current."] set_commission_change_rate { pool_id : :: core :: primitive :: u32 , change_rate : runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionChangeRate < :: core :: primitive :: u64 > , } , # [codec (index = 20)] # [doc = "Claim pending commission."] # [doc = ""] # [doc = "The dispatch origin of this call must be signed by the `root` role of the pool. Pending"] # [doc = "commission is paid out and added to total claimed commission`. Total pending commission"] # [doc = "is reset to zero. the current."] claim_commission { pool_id : :: core :: primitive :: u32 , } , # [codec (index = 21)] # [doc = "Top up the deficit or withdraw the excess ED from the pool."] # [doc = ""] # [doc = "When a pool is created, the pool depositor transfers ED to the reward account of the"] # [doc = "pool. ED is subject to change and over time, the deposit in the reward account may be"] # [doc = "insufficient to cover the ED deficit of the pool or vice-versa where there is excess"] # [doc = "deposit to the pool. This call allows anyone to adjust the ED deposit of the"] # [doc = "pool by either topping up the deficit or claiming the excess."] adjust_pool_deposit { pool_id : :: core :: primitive :: u32 , } , # [codec (index = 22)] # [doc = "Set or remove a pool's commission claim permission."] # [doc = ""] # [doc = "Determines who can claim the pool's pending commission. Only the `Root` role of the pool"] # [doc = "is able to conifigure commission claim permissions."] set_commission_claim_permission { pool_id : :: core :: primitive :: u32 , permission : :: core :: option :: Option < runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionClaimPermission < :: subxt_core :: utils :: AccountId32 > > , } , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DefensiveError { + #[codec(index = 0)] + NotEnoughSpaceInUnbondPool, + #[codec(index = 1)] + PoolNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + BondedStashKilledPrematurely, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "A (bonded) pool id does not exist."] + PoolNotFound, + #[codec(index = 1)] + #[doc = "An account is not a member."] + PoolMemberNotFound, + #[codec(index = 2)] + #[doc = "A reward pool does not exist. In all cases this is a system logic error."] + RewardPoolNotFound, + #[codec(index = 3)] + #[doc = "A sub pool does not exist."] + SubPoolsNotFound, + #[codec(index = 4)] + #[doc = "The member is fully unbonded (and thus cannot access the bonded and reward pool"] + #[doc = "anymore to, for example, collect rewards)."] + FullyUnbonding, + #[codec(index = 5)] + #[doc = "The member cannot unbond further chunks due to reaching the limit."] + MaxUnbondingLimit, + #[codec(index = 6)] + #[doc = "None of the funds can be withdrawn yet because the bonding duration has not passed."] + CannotWithdrawAny, + #[codec(index = 7)] + #[doc = "The amount does not meet the minimum bond to either join or create a pool."] + #[doc = ""] + #[doc = "The depositor can never unbond to a value less than `Pallet::depositor_min_bond`. The"] + #[doc = "caller does not have nominating permissions for the pool. Members can never unbond to a"] + #[doc = "value below `MinJoinBond`."] + MinimumBondNotMet, + #[codec(index = 8)] + #[doc = "The transaction could not be executed due to overflow risk for the pool."] + OverflowRisk, + #[codec(index = 9)] + #[doc = "A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for"] + #[doc = "other members to be permissionlessly unbonded."] + NotDestroying, + #[codec(index = 10)] + #[doc = "The caller does not have nominating permissions for the pool."] + NotNominator, + #[codec(index = 11)] + #[doc = "Either a) the caller cannot make a valid kick or b) the pool is not destroying."] + NotKickerOrDestroying, + #[codec(index = 12)] + #[doc = "The pool is not open to join"] + NotOpen, + #[codec(index = 13)] + #[doc = "The system is maxed out on pools."] + MaxPools, + #[codec(index = 14)] + #[doc = "Too many members in the pool or system."] + MaxPoolMembers, + #[codec(index = 15)] + #[doc = "The pools state cannot be changed."] + CanNotChangeState, + #[codec(index = 16)] + #[doc = "The caller does not have adequate permissions."] + DoesNotHavePermission, + #[codec(index = 17)] + #[doc = "Metadata exceeds [`Config::MaxMetadataLen`]"] + MetadataExceedsMaxLen, + #[codec(index = 18)] + #[doc = "Some error occurred that should never happen. This should be reported to the"] + #[doc = "maintainers."] + Defensive(runtime_types::pallet_tangle_lst::pallet::DefensiveError), + #[codec(index = 19)] + #[doc = "Partial unbonding now allowed permissionlessly."] + PartialUnbondNotAllowedPermissionlessly, + #[codec(index = 20)] + #[doc = "The pool's max commission cannot be set higher than the existing value."] + MaxCommissionRestricted, + #[codec(index = 21)] + #[doc = "The supplied commission exceeds the max allowed commission."] + CommissionExceedsMaximum, + #[codec(index = 22)] + #[doc = "The supplied commission exceeds global maximum commission."] + CommissionExceedsGlobalMaximum, + #[codec(index = 23)] + #[doc = "Not enough blocks have surpassed since the last commission update."] + CommissionChangeThrottled, + #[codec(index = 24)] + #[doc = "The submitted changes to commission change rate are not allowed."] + CommissionChangeRateNotAllowed, + #[codec(index = 25)] + #[doc = "There is no pending commission to claim."] + NoPendingCommission, + #[codec(index = 26)] + #[doc = "No commission current has been set."] + NoCommissionCurrentSet, + #[codec(index = 27)] + #[doc = "Pool id currently in use."] + PoolIdInUse, + #[codec(index = 28)] + #[doc = "Pool id provided is not correct/usable."] + InvalidPoolId, + #[codec(index = 29)] + #[doc = "Bonding extra is restricted to the exact pending reward amount."] + BondExtraRestricted, + #[codec(index = 30)] + #[doc = "No imbalance in the ED deposit for the pool."] + NothingToAdjust, + #[codec(index = 31)] + #[doc = "Pool token creation failed."] + PoolTokenCreationFailed, + #[codec(index = 32)] + #[doc = "No balance to unbond."] + NoBalanceToUnbond, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Events of this pallet."] + pub enum Event { + # [codec (index = 0)] # [doc = "A pool has been created."] Created { depositor : :: subxt_core :: utils :: AccountId32 , pool_id : :: core :: primitive :: u32 , } , # [codec (index = 1)] # [doc = "A member has became bonded in a pool."] Bonded { member : :: subxt_core :: utils :: AccountId32 , pool_id : :: core :: primitive :: u32 , bonded : :: core :: primitive :: u128 , joined : :: core :: primitive :: bool , } , # [codec (index = 2)] # [doc = "A payout has been made to a member."] PaidOut { member : :: subxt_core :: utils :: AccountId32 , pool_id : :: core :: primitive :: u32 , payout : :: core :: primitive :: u128 , } , # [codec (index = 3)] # [doc = "A member has unbonded from their pool."] # [doc = ""] # [doc = "- `balance` is the corresponding balance of the number of points that has been"] # [doc = " requested to be unbonded (the argument of the `unbond` transaction) from the bonded"] # [doc = " pool."] # [doc = "- `points` is the number of points that are issued as a result of `balance` being"] # [doc = "dissolved into the corresponding unbonding pool."] # [doc = "- `era` is the era in which the balance will be unbonded."] # [doc = "In the absence of slashing, these values will match. In the presence of slashing, the"] # [doc = "number of points that are issued in the unbonding pool will be less than the amount"] # [doc = "requested to be unbonded."] Unbonded { member : :: subxt_core :: utils :: AccountId32 , pool_id : :: core :: primitive :: u32 , balance : :: core :: primitive :: u128 , points : :: core :: primitive :: u128 , era : :: core :: primitive :: u32 , } , # [codec (index = 4)] # [doc = "A member has withdrawn from their pool."] # [doc = ""] # [doc = "The given number of `points` have been dissolved in return of `balance`."] # [doc = ""] # [doc = "Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance"] # [doc = "will be 1."] Withdrawn { member : :: subxt_core :: utils :: AccountId32 , pool_id : :: core :: primitive :: u32 , balance : :: core :: primitive :: u128 , points : :: core :: primitive :: u128 , } , # [codec (index = 5)] # [doc = "A pool has been destroyed."] Destroyed { pool_id : :: core :: primitive :: u32 , } , # [codec (index = 6)] # [doc = "The state of a pool has changed"] StateChanged { pool_id : :: core :: primitive :: u32 , new_state : runtime_types :: pallet_tangle_lst :: types :: pools :: PoolState , } , # [codec (index = 7)] # [doc = "A member has been removed from a pool."] # [doc = ""] # [doc = "The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked)."] MemberRemoved { pool_id : :: core :: primitive :: u32 , member : :: subxt_core :: utils :: AccountId32 , } , # [codec (index = 8)] # [doc = "The roles of a pool have been updated to the given new roles. Note that the depositor"] # [doc = "can never change."] RolesUpdated { root : :: core :: option :: Option < :: subxt_core :: utils :: AccountId32 > , bouncer : :: core :: option :: Option < :: subxt_core :: utils :: AccountId32 > , nominator : :: core :: option :: Option < :: subxt_core :: utils :: AccountId32 > , } , # [codec (index = 9)] # [doc = "The active balance of pool `pool_id` has been slashed to `balance`."] PoolSlashed { pool_id : :: core :: primitive :: u32 , balance : :: core :: primitive :: u128 , } , # [codec (index = 10)] # [doc = "The unbond pool at `era` of pool `pool_id` has been slashed to `balance`."] UnbondingPoolSlashed { pool_id : :: core :: primitive :: u32 , era : :: core :: primitive :: u32 , balance : :: core :: primitive :: u128 , } , # [codec (index = 11)] # [doc = "A pool's commission setting has been changed."] PoolCommissionUpdated { pool_id : :: core :: primitive :: u32 , current : :: core :: option :: Option < (runtime_types :: sp_arithmetic :: per_things :: Perbill , :: subxt_core :: utils :: AccountId32 ,) > , } , # [codec (index = 12)] # [doc = "A pool's maximum commission setting has been changed."] PoolMaxCommissionUpdated { pool_id : :: core :: primitive :: u32 , max_commission : runtime_types :: sp_arithmetic :: per_things :: Perbill , } , # [codec (index = 13)] # [doc = "A pool's commission `change_rate` has been changed."] PoolCommissionChangeRateUpdated { pool_id : :: core :: primitive :: u32 , change_rate : runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionChangeRate < :: core :: primitive :: u64 > , } , # [codec (index = 14)] # [doc = "Pool commission claim permission has been updated."] PoolCommissionClaimPermissionUpdated { pool_id : :: core :: primitive :: u32 , permission : :: core :: option :: Option < runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionClaimPermission < :: subxt_core :: utils :: AccountId32 > > , } , # [codec (index = 15)] # [doc = "Pool commission has been claimed."] PoolCommissionClaimed { pool_id : :: core :: primitive :: u32 , commission : :: core :: primitive :: u128 , } , # [codec (index = 16)] # [doc = "Topped up deficit in frozen ED of the reward pool."] MinBalanceDeficitAdjusted { pool_id : :: core :: primitive :: u32 , amount : :: core :: primitive :: u128 , } , # [codec (index = 17)] # [doc = "Claimed excess frozen ED of af the reward pool."] MinBalanceExcessAdjusted { pool_id : :: core :: primitive :: u32 , amount : :: core :: primitive :: u128 , } , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum FreezeReason { + #[codec(index = 0)] + PoolMinBalance, + } + } + pub mod types { + use super::runtime_types; + pub mod bonded_pool { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BondedPoolInner { + pub commission: + runtime_types::pallet_tangle_lst::types::commission::Commission, + pub roles: runtime_types::pallet_tangle_lst::types::pools::PoolRoles< + ::subxt_core::utils::AccountId32, + >, + pub state: runtime_types::pallet_tangle_lst::types::pools::PoolState, + pub metadata: + runtime_types::pallet_tangle_lst::types::bonded_pool::PoolMetadata, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PoolMetadata { + pub name: ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + pub icon: ::core::option::Option< + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + >, + } + } + pub mod commission { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Commission { pub current : :: core :: option :: Option < (runtime_types :: sp_arithmetic :: per_things :: Perbill , :: subxt_core :: utils :: AccountId32 ,) > , pub max : :: core :: option :: Option < runtime_types :: sp_arithmetic :: per_things :: Perbill > , pub change_rate : :: core :: option :: Option < runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionChangeRate < :: core :: primitive :: u64 > > , pub throttle_from : :: core :: option :: Option < :: core :: primitive :: u64 > , pub claim_permission : :: core :: option :: Option < runtime_types :: pallet_tangle_lst :: types :: commission :: CommissionClaimPermission < :: subxt_core :: utils :: AccountId32 > > , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CommissionChangeRate<_0> { + pub max_increase: runtime_types::sp_arithmetic::per_things::Perbill, + pub min_delay: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum CommissionClaimPermission<_0> { + #[codec(index = 0)] + Permissionless, + #[codec(index = 1)] + Account(_0), + } + } + pub mod pools { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PoolMember { + pub unbonding_eras: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + (::core::primitive::u32, ::core::primitive::u128), + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PoolRoles<_0> { + pub depositor: _0, + pub root: ::core::option::Option<_0>, + pub nominator: ::core::option::Option<_0>, + pub bouncer: ::core::option::Option<_0>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum PoolState { + #[codec(index = 0)] + Open, + #[codec(index = 1)] + Blocked, + #[codec(index = 2)] + Destroying, + } + } + pub mod sub_pools { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RewardPool { + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub last_recorded_total_payouts: ::core::primitive::u128, + pub total_rewards_claimed: ::core::primitive::u128, + pub total_commission_pending: ::core::primitive::u128, + pub total_commission_claimed: ::core::primitive::u128, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SubPools { + pub no_era: runtime_types::pallet_tangle_lst::types::sub_pools::UnbondPool, + pub with_era: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_tangle_lst::types::sub_pools::UnbondPool, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct UnbondPool { + pub points: ::core::primitive::u128, + pub balance: ::core::primitive::u128, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum BondExtra<_0> { + #[codec(index = 0)] + FreeBalance(_0), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ClaimPermission { + #[codec(index = 0)] + Permissioned, + #[codec(index = 1)] + PermissionlessCompound, + #[codec(index = 2)] + PermissionlessWithdraw, + #[codec(index = 3)] + PermissionlessAll, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + } + } + pub mod pallet_timestamp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Set the current time."] + #[doc = ""] + #[doc = "This call should be invoked exactly once per block. It will panic at the finalization"] + #[doc = "phase, if this call hasn't been invoked by that time."] + #[doc = ""] + #[doc = "The timestamp should be greater than the previous one by the amount specified by"] + #[doc = "[`Config::MinimumPeriod`]."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _None_."] + #[doc = ""] + #[doc = "This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware"] + #[doc = "that changing the complexity of this call could result exhausting the resources in a"] + #[doc = "block to execute any other calls."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)"] + #[doc = "- 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in"] + #[doc = " `on_finalize`)"] + #[doc = "- 1 event handler `on_timestamp_set`. Must be `O(1)`."] + set { + #[codec(compact)] + now: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_transaction_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"] + #[doc = "has been paid by `who`."] + TransactionFeePaid { + who: ::subxt_core::utils::AccountId32, + actual_fee: ::core::primitive::u128, + tip: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct FeeDetails<_0> { + pub inclusion_fee: ::core::option::Option< + runtime_types::pallet_transaction_payment::types::InclusionFee<_0>, + >, + pub tip: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct InclusionFee<_0> { + pub base_fee: _0, + pub len_fee: _0, + pub adjusted_weight_fee: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RuntimeDispatchInfo<_0, _1> { + pub weight: _1, + pub class: runtime_types::frame_support::dispatch::DispatchClass, + pub partial_fee: _0, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V1Ancient, + #[codec(index = 1)] + V2, + } + } + pub mod pallet_treasury { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 3)] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`."] + #[doc = ""] + #[doc = "### Details"] + #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"] + #[doc = "beneficiary."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The destination account for the transfer."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::SpendApproved`] if successful."] + spend_local { + #[codec(compact)] + amount: ::core::primitive::u128, + beneficiary: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + #[doc = "Force a previously approved proposal to be removed from the approval queue."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The original deposit will no longer be returned."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `proposal_id`: The index of a proposal"] + #[doc = ""] + #[doc = "### Complexity"] + #[doc = "- O(A) where `A` is the number of approvals"] + #[doc = ""] + #[doc = "### Errors"] + #[doc = "- [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the"] + #[doc = " approval queue, i.e., the proposal has not been approved. This could also mean the"] + #[doc = " proposal does not exist altogether, thus there is no way it would have been approved"] + #[doc = " in the first place."] + remove_approval { + #[codec(compact)] + proposal_id: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Propose and approve a spend of treasury funds."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::SpendOrigin`] with the `Success` value being at least"] + #[doc = "`amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted"] + #[doc = "for assertion using the [`Config::BalanceConverter`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Create an approved spend for transferring a specific `amount` of `asset_kind` to a"] + #[doc = "designated beneficiary. The spend must be claimed using the `payout` dispatchable within"] + #[doc = "the [`Config::PayoutPeriod`]."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `asset_kind`: An indicator of the specific asset class to be spent."] + #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."] + #[doc = "- `beneficiary`: The beneficiary of the spend."] + #[doc = "- `valid_from`: The block number from which the spend can be claimed. It can refer to"] + #[doc = " the past if the resulting spend has not yet expired according to the"] + #[doc = " [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after"] + #[doc = " approval."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendApproved`] if successful."] + spend { + asset_kind: ::subxt_core::alloc::boxed::Box<()>, + #[codec(compact)] + amount: ::core::primitive::u128, + beneficiary: + ::subxt_core::alloc::boxed::Box<::subxt_core::utils::AccountId32>, + valid_from: ::core::option::Option<::core::primitive::u64>, + }, + #[codec(index = 6)] + #[doc = "Claim a spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed"] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "Spends must be claimed within some temporal bounds. A spend may be claimed within one"] + #[doc = "[`Config::PayoutPeriod`] from the `valid_from` block."] + #[doc = "In case of a payout failure, the spend status must be updated with the `check_status`"] + #[doc = "dispatchable before retrying with the current function."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::Paid`] if successful."] + payout { index: ::core::primitive::u32 }, + #[codec(index = 7)] + #[doc = "Check the status of the spend and remove it from the storage if processed."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be signed."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "The status check is a prerequisite for retrying a failed payout."] + #[doc = "If a spend has either succeeded or expired, it is removed from the storage by this"] + #[doc = "function. In such instances, transaction fees are refunded."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::PaymentFailed`] if the spend payout has failed."] + #[doc = "Emits [`Event::SpendProcessed`] if the spend payout has succeed."] + check_status { index: ::core::primitive::u32 }, + #[codec(index = 8)] + #[doc = "Void previously approved spend."] + #[doc = ""] + #[doc = "## Dispatch Origin"] + #[doc = ""] + #[doc = "Must be [`Config::RejectOrigin`]."] + #[doc = ""] + #[doc = "## Details"] + #[doc = ""] + #[doc = "A spend void is only possible if the payout has not been attempted yet."] + #[doc = ""] + #[doc = "### Parameters"] + #[doc = "- `index`: The spend index."] + #[doc = ""] + #[doc = "## Events"] + #[doc = ""] + #[doc = "Emits [`Event::AssetSpendVoided`] if successful."] + void_spend { index: ::core::primitive::u32 }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Error for the treasury pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "No proposal, bounty or spend at that index."] + InvalidIndex, + #[codec(index = 1)] + #[doc = "Too many approvals in the queue."] + TooManyApprovals, + #[codec(index = 2)] + #[doc = "The spend origin is valid but the amount it is allowed to spend is lower than the"] + #[doc = "amount to be spent."] + InsufficientPermission, + #[codec(index = 3)] + #[doc = "Proposal has not been approved."] + ProposalNotApproved, + #[codec(index = 4)] + #[doc = "The balance of the asset kind is not convertible to the balance of the native asset."] + FailedToConvertBalance, + #[codec(index = 5)] + #[doc = "The spend has expired and cannot be claimed."] + SpendExpired, + #[codec(index = 6)] + #[doc = "The spend is not yet eligible for payout."] + EarlyPayout, + #[codec(index = 7)] + #[doc = "The payment has already been attempted."] + AlreadyAttempted, + #[codec(index = 8)] + #[doc = "There was some issue with the mechanism of payment."] + PayoutError, + #[codec(index = 9)] + #[doc = "The payout was not yet attempted/claimed."] + NotAttempted, + #[codec(index = 10)] + #[doc = "The payment has neither failed nor succeeded yet."] + Inconclusive, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "We have ended a spend period and will now allocate funds."] + Spending { budget_remaining: ::core::primitive::u128 }, + #[codec(index = 1)] + #[doc = "Some funds have been allocated."] + Awarded { + proposal_index: ::core::primitive::u32, + award: ::core::primitive::u128, + account: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 2)] + #[doc = "Some of our funds have been burnt."] + Burnt { burnt_funds: ::core::primitive::u128 }, + #[codec(index = 3)] + #[doc = "Spending has finished; this is the amount that rolls over until next spend."] + Rollover { rollover_balance: ::core::primitive::u128 }, + #[codec(index = 4)] + #[doc = "Some funds have been deposited."] + Deposit { value: ::core::primitive::u128 }, + #[codec(index = 5)] + #[doc = "A new spend proposal has been approved."] + SpendApproved { + proposal_index: ::core::primitive::u32, + amount: ::core::primitive::u128, + beneficiary: ::subxt_core::utils::AccountId32, + }, + #[codec(index = 6)] + #[doc = "The inactive funds of the pallet have been updated."] + UpdatedInactive { + reactivated: ::core::primitive::u128, + deactivated: ::core::primitive::u128, + }, + #[codec(index = 7)] + #[doc = "A new asset spend proposal has been approved."] + AssetSpendApproved { + index: ::core::primitive::u32, + asset_kind: (), + amount: ::core::primitive::u128, + beneficiary: ::subxt_core::utils::AccountId32, + valid_from: ::core::primitive::u64, + expire_at: ::core::primitive::u64, + }, + #[codec(index = 8)] + #[doc = "An approved spend was voided."] + AssetSpendVoided { index: ::core::primitive::u32 }, + #[codec(index = 9)] + #[doc = "A payment happened."] + Paid { index: ::core::primitive::u32, payment_id: () }, + #[codec(index = 10)] + #[doc = "A payment failed and can be retried."] + PaymentFailed { index: ::core::primitive::u32, payment_id: () }, + #[codec(index = 11)] + #[doc = "A spend was processed and removed from the storage. It might have been successfully"] + #[doc = "paid or it may have expired."] + SpendProcessed { index: ::core::primitive::u32 }, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum PaymentState<_0> { + #[codec(index = 0)] + Pending, + #[codec(index = 1)] + Attempted { id: _0 }, + #[codec(index = 2)] + Failed, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Proposal<_0, _1> { + pub proposer: _0, + pub value: _1, + pub beneficiary: _0, + pub bond: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SpendStatus<_0, _1, _2, _3, _4> { + pub asset_kind: _0, + pub amount: _1, + pub beneficiary: _2, + pub valid_from: _3, + pub expire_at: _3, + pub status: runtime_types::pallet_treasury::PaymentState<_0>, + #[codec(skip)] + pub __ignore: ::core::marker::PhantomData<_4>, + } + } + pub mod pallet_tx_pause { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Pause a call."] + #[doc = ""] + #[doc = "Can only be called by [`Config::PauseOrigin`]."] + #[doc = "Emits an [`Event::CallPaused`] event on success."] + pause { + full_name: ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + }, + #[codec(index = 1)] + #[doc = "Un-pause a call."] + #[doc = ""] + #[doc = "Can only be called by [`Config::UnpauseOrigin`]."] + #[doc = "Emits an [`Event::CallUnpaused`] event on success."] + unpause { + ident: ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The call is paused."] + IsPaused, + #[codec(index = 1)] + #[doc = "The call is unpaused."] + IsUnpaused, + #[codec(index = 2)] + #[doc = "The call is whitelisted and cannot be paused."] + Unpausable, + #[codec(index = 3)] + NotFound, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "This pallet, or a specific call is now paused."] + CallPaused { + full_name: ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + }, + #[codec(index = 1)] + #[doc = "This pallet, or a specific call is now unpaused."] + CallUnpaused { + full_name: ( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + }, + } + } + } + pub mod pallet_utility { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Send a batch of dispatch calls."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + #[doc = ""] + #[doc = "This will return `Ok` in all circumstances. To determine the success of the batch, an"] + #[doc = "event is deposited. If a call failed and the batch was interrupted, then the"] + #[doc = "`BatchInterrupted` event is deposited, along with the number of successful calls made"] + #[doc = "and the error of the failed call. If all were successful, then the `BatchCompleted`"] + #[doc = "event is deposited."] + batch { + calls: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 1)] + #[doc = "Send a call through an indexed pseudonym of the sender."] + #[doc = ""] + #[doc = "Filter from origin are passed along. The call will be dispatched with an origin which"] + #[doc = "use the same filter as the origin of this call."] + #[doc = ""] + #[doc = "NOTE: If you need to ensure that any account-based filtering is not honored (i.e."] + #[doc = "because you expect `proxy` to have been used prior in the call stack and you do not want"] + #[doc = "the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1`"] + #[doc = "in the Multisig pallet instead."] + #[doc = ""] + #[doc = "NOTE: Prior to version *12, this was called `as_limited_sub`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + as_derivative { + index: ::core::primitive::u16, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 2)] + #[doc = "Send a batch of dispatch calls and atomically execute them."] + #[doc = "The whole transaction will rollback and fail if any of the calls failed."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatched without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + batch_all { + calls: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 3)] + #[doc = "Dispatches a function call with a provided origin."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(1)."] + dispatch_as { + as_origin: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::OriginCaller, + >, + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 4)] + #[doc = "Send a batch of dispatch calls."] + #[doc = "Unlike `batch`, it allows errors and won't interrupt."] + #[doc = ""] + #[doc = "May be called from any origin except `None`."] + #[doc = ""] + #[doc = "- `calls`: The calls to be dispatched from the same origin. The number of call must not"] + #[doc = " exceed the constant: `batched_calls_limit` (available in constant metadata)."] + #[doc = ""] + #[doc = "If origin is root then the calls are dispatch without checking origin filter. (This"] + #[doc = "includes bypassing `frame_system::Config::BaseCallFilter`)."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- O(C) where C is the number of calls to be batched."] + force_batch { + calls: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + }, + #[codec(index = 5)] + #[doc = "Dispatch a function call with a specified weight."] + #[doc = ""] + #[doc = "This function does not check the weight of the call, and instead allows the"] + #[doc = "Root origin to specify the weight of the call."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + with_weight { + call: ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_testnet_runtime::RuntimeCall, + >, + weight: runtime_types::sp_weights::weight_v2::Weight, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Error` enum of this pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "Too many calls batched."] + TooManyCalls, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "Batch of dispatches did not complete fully. Index of first failing dispatch given, as"] + #[doc = "well as the error."] + BatchInterrupted { + index: ::core::primitive::u32, + error: runtime_types::sp_runtime::DispatchError, + }, + #[codec(index = 1)] + #[doc = "Batch of dispatches completed fully with no error."] + BatchCompleted, + #[codec(index = 2)] + #[doc = "Batch of dispatches completed but has errors."] + BatchCompletedWithErrors, + #[codec(index = 3)] + #[doc = "A single item within a Batch of dispatches has completed with no error."] + ItemCompleted, + #[codec(index = 4)] + #[doc = "A single item within a Batch of dispatches has completed with error."] + ItemFailed { error: runtime_types::sp_runtime::DispatchError }, + #[codec(index = 5)] + #[doc = "A call was dispatched."] + DispatchedAs { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } + } + pub mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Contains a variant per dispatchable extrinsic that this pallet has."] + pub enum Call { + #[codec(index = 0)] + #[doc = "Unlock any vested funds of the sender account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_ and the sender must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + vest, + #[codec(index = 1)] + #[doc = "Unlock any vested funds of a `target` account."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account whose vested funds should be unlocked. Must have funds still"] + #[doc = "locked under this pallet."] + #[doc = ""] + #[doc = "Emits either `VestingCompleted` or `VestingUpdated`."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + vest_other { + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + }, + #[codec(index = 2)] + #[doc = "Create a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `target`: The account receiving the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + vested_transfer { + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u64, + >, + }, + #[codec(index = 3)] + #[doc = "Force a vested transfer."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `source`: The account whose funds should be transferred."] + #[doc = "- `target`: The account that should be transferred the vested funds."] + #[doc = "- `schedule`: The vesting schedule attached to the transfer."] + #[doc = ""] + #[doc = "Emits `VestingCreated`."] + #[doc = ""] + #[doc = "NOTE: This will unlock all schedules through the current block."] + #[doc = ""] + #[doc = "## Complexity"] + #[doc = "- `O(1)`."] + force_vested_transfer { + source: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u64, + >, + }, + #[codec(index = 4)] + #[doc = "Merge two vesting schedules together, creating a new vesting schedule that unlocks over"] + #[doc = "the highest possible start and end blocks. If both schedules have already started the"] + #[doc = "current block will be used as the schedule start; with the caveat that if one schedule"] + #[doc = "is finished by the current block, the other will be treated as the new merged schedule,"] + #[doc = "unmodified."] + #[doc = ""] + #[doc = "NOTE: If `schedule1_index == schedule2_index` this is a no-op."] + #[doc = "NOTE: This will unlock all schedules through the current block prior to merging."] + #[doc = "NOTE: If both schedules have ended by the current block, no new schedule will be created"] + #[doc = "and both will be removed."] + #[doc = ""] + #[doc = "Merged schedule attributes:"] + #[doc = "- `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,"] + #[doc = " current_block)`."] + #[doc = "- `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`."] + #[doc = "- `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`."] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Signed_."] + #[doc = ""] + #[doc = "- `schedule1_index`: index of the first schedule to merge."] + #[doc = "- `schedule2_index`: index of the second schedule to merge."] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + #[codec(index = 5)] + #[doc = "Force remove a vesting schedule"] + #[doc = ""] + #[doc = "The dispatch origin for this call must be _Root_."] + #[doc = ""] + #[doc = "- `target`: An account that has a vesting schedule"] + #[doc = "- `schedule_index`: The vesting schedule index that should be removed"] + force_remove_vesting_schedule { + target: ::subxt_core::utils::MultiAddress< + ::subxt_core::utils::AccountId32, + ::core::primitive::u32, + >, + schedule_index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "Error for the vesting pallet."] + pub enum Error { + #[codec(index = 0)] + #[doc = "The account given is not vesting."] + NotVesting, + #[codec(index = 1)] + #[doc = "The account already has `MaxVestingSchedules` count of schedules and thus"] + #[doc = "cannot add another one. Consider merging existing schedules in order to add another."] + AtMaxVestingSchedules, + #[codec(index = 2)] + #[doc = "Amount being transferred is too low to create a vesting schedule."] + AmountLow, + #[codec(index = 3)] + #[doc = "An index was out of bounds of the vesting schedules."] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + #[doc = "Failed to create a new schedule because some parameter was invalid."] + InvalidScheduleParams, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + #[doc = "The `Event` enum of this pallet"] + pub enum Event { + #[codec(index = 0)] + #[doc = "The amount vested has been updated. This could indicate a change in funds available."] + #[doc = "The balance given is the amount which is left unvested (and thus locked)."] + VestingUpdated { + account: ::subxt_core::utils::AccountId32, + unvested: ::core::primitive::u128, + }, + #[codec(index = 1)] + #[doc = "An \\[account\\] has become fully vested."] + VestingCompleted { account: ::subxt_core::utils::AccountId32 }, + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + pub mod primitive_types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct U256(pub [::core::primitive::u64; 4usize]); + } + pub mod rpc_primitives_txpool { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TxPoolResponse { + pub ready: ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::transaction::TransactionV2, + >, + pub future: ::subxt_core::alloc::vec::Vec< + runtime_types::ethereum::transaction::TransactionV2, + >, + } + } + pub mod sp_arithmetic { + use super::runtime_types; + pub mod fixed_point { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct FixedU128(pub ::core::primitive::u128); + } + pub mod per_things { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PerU16(pub ::core::primitive::u16); + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Perbill(pub ::core::primitive::u32); + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Percent(pub ::core::primitive::u8); + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Permill(pub ::core::primitive::u32); + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } + } + pub mod sp_consensus_babe { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + } + pub mod digests { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum NextConfigDescriptor { + #[codec(index = 1)] + V1 { + c: (::core::primitive::u64, ::core::primitive::u64), + allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum PreDigest { + #[codec(index = 1)] + Primary(runtime_types::sp_consensus_babe::digests::PrimaryPreDigest), + #[codec(index = 2)] + SecondaryPlain( + runtime_types::sp_consensus_babe::digests::SecondaryPlainPreDigest, + ), + #[codec(index = 3)] + SecondaryVRF(runtime_types::sp_consensus_babe::digests::SecondaryVRFPreDigest), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PrimaryPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SecondaryPlainPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SecondaryVRFPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum AllowedSlots { + #[codec(index = 0)] + PrimarySlots, + #[codec(index = 1)] + PrimaryAndSecondaryPlainSlots, + #[codec(index = 2)] + PrimaryAndSecondaryVRFSlots, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BabeConfiguration { + pub slot_duration: ::core::primitive::u64, + pub epoch_length: ::core::primitive::u64, + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub authorities: ::subxt_core::alloc::vec::Vec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + pub randomness: [::core::primitive::u8; 32usize], + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BabeEpochConfiguration { + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Epoch { + pub epoch_index: ::core::primitive::u64, + pub start_slot: runtime_types::sp_consensus_slots::Slot, + pub duration: ::core::primitive::u64, + pub authorities: ::subxt_core::alloc::vec::Vec<( + runtime_types::sp_consensus_babe::app::Public, + ::core::primitive::u64, + )>, + pub randomness: [::core::primitive::u8; 32usize], + pub config: runtime_types::sp_consensus_babe::BabeEpochConfiguration, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OpaqueKeyOwnershipProof( + pub ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ); + } + pub mod sp_consensus_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Equivocation<_0, _1> { + #[codec(index = 0)] + Prevote( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Prevote<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + #[codec(index = 1)] + Precommit( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Precommit<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub set_id: ::core::primitive::u64, + pub equivocation: runtime_types::sp_consensus_grandpa::Equivocation<_0, _1>, + } + } + pub mod sp_consensus_slots { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct EquivocationProof<_0, _1> { + pub offender: _1, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub first_header: _0, + pub second_header: _0, + } + #[derive( + :: subxt_core :: ext :: codec :: CompactAs, + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Slot(pub ::core::primitive::u64); + } + pub mod sp_core { + use super::runtime_types; + pub mod crypto { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); + } + pub mod sr25519 { + use super::runtime_types; + pub mod vrf { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct VrfSignature { + pub pre_output: [::core::primitive::u8; 32usize], + pub proof: [::core::primitive::u8; 64usize], + } + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OpaqueMetadata(pub ::subxt_core::alloc::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Void {} + } + pub mod sp_inherents { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct CheckInherentsResult { + pub okay: ::core::primitive::bool, + pub fatal_error: ::core::primitive::bool, + pub errors: runtime_types::sp_inherents::InherentData, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct InherentData { + pub data: ::subxt_core::utils::KeyedVec< + [::core::primitive::u8; 8usize], + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + } + } + pub mod sp_npos_elections { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ElectionScore { + pub minimal_stake: ::core::primitive::u128, + pub sum_stake: ::core::primitive::u128, + pub sum_stake_squared: ::core::primitive::u128, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Support<_0> { + pub total: ::core::primitive::u128, + pub voters: ::subxt_core::alloc::vec::Vec<(_0, ::core::primitive::u128)>, + } + } + pub mod sp_runtime { + use super::runtime_types; + pub mod generic { + use super::runtime_types; + pub mod block { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Block<_0, _1> { + pub header: _0, + pub extrinsics: ::subxt_core::alloc::vec::Vec<_1>, + } + } + pub mod digest { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Digest { + pub logs: ::subxt_core::alloc::vec::Vec< + runtime_types::sp_runtime::generic::digest::DigestItem, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DigestItem { + #[codec(index = 6)] + PreRuntime( + [::core::primitive::u8; 4usize], + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 4)] + Consensus( + [::core::primitive::u8; 4usize], + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 5)] + Seal( + [::core::primitive::u8; 4usize], + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 0)] + Other(::subxt_core::alloc::vec::Vec<::core::primitive::u8>), + #[codec(index = 8)] + RuntimeEnvironmentUpdated, + } + } + pub mod era { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Era { + #[codec(index = 0)] + Immortal, + #[codec(index = 1)] + Mortal1(::core::primitive::u8), + #[codec(index = 2)] + Mortal2(::core::primitive::u8), + #[codec(index = 3)] + Mortal3(::core::primitive::u8), + #[codec(index = 4)] + Mortal4(::core::primitive::u8), + #[codec(index = 5)] + Mortal5(::core::primitive::u8), + #[codec(index = 6)] + Mortal6(::core::primitive::u8), + #[codec(index = 7)] + Mortal7(::core::primitive::u8), + #[codec(index = 8)] + Mortal8(::core::primitive::u8), + #[codec(index = 9)] + Mortal9(::core::primitive::u8), + #[codec(index = 10)] + Mortal10(::core::primitive::u8), + #[codec(index = 11)] + Mortal11(::core::primitive::u8), + #[codec(index = 12)] + Mortal12(::core::primitive::u8), + #[codec(index = 13)] + Mortal13(::core::primitive::u8), + #[codec(index = 14)] + Mortal14(::core::primitive::u8), + #[codec(index = 15)] + Mortal15(::core::primitive::u8), + #[codec(index = 16)] + Mortal16(::core::primitive::u8), + #[codec(index = 17)] + Mortal17(::core::primitive::u8), + #[codec(index = 18)] + Mortal18(::core::primitive::u8), + #[codec(index = 19)] + Mortal19(::core::primitive::u8), + #[codec(index = 20)] + Mortal20(::core::primitive::u8), + #[codec(index = 21)] + Mortal21(::core::primitive::u8), + #[codec(index = 22)] + Mortal22(::core::primitive::u8), + #[codec(index = 23)] + Mortal23(::core::primitive::u8), + #[codec(index = 24)] + Mortal24(::core::primitive::u8), + #[codec(index = 25)] + Mortal25(::core::primitive::u8), + #[codec(index = 26)] + Mortal26(::core::primitive::u8), + #[codec(index = 27)] + Mortal27(::core::primitive::u8), + #[codec(index = 28)] + Mortal28(::core::primitive::u8), + #[codec(index = 29)] + Mortal29(::core::primitive::u8), + #[codec(index = 30)] + Mortal30(::core::primitive::u8), + #[codec(index = 31)] + Mortal31(::core::primitive::u8), + #[codec(index = 32)] + Mortal32(::core::primitive::u8), + #[codec(index = 33)] + Mortal33(::core::primitive::u8), + #[codec(index = 34)] + Mortal34(::core::primitive::u8), + #[codec(index = 35)] + Mortal35(::core::primitive::u8), + #[codec(index = 36)] + Mortal36(::core::primitive::u8), + #[codec(index = 37)] + Mortal37(::core::primitive::u8), + #[codec(index = 38)] + Mortal38(::core::primitive::u8), + #[codec(index = 39)] + Mortal39(::core::primitive::u8), + #[codec(index = 40)] + Mortal40(::core::primitive::u8), + #[codec(index = 41)] + Mortal41(::core::primitive::u8), + #[codec(index = 42)] + Mortal42(::core::primitive::u8), + #[codec(index = 43)] + Mortal43(::core::primitive::u8), + #[codec(index = 44)] + Mortal44(::core::primitive::u8), + #[codec(index = 45)] + Mortal45(::core::primitive::u8), + #[codec(index = 46)] + Mortal46(::core::primitive::u8), + #[codec(index = 47)] + Mortal47(::core::primitive::u8), + #[codec(index = 48)] + Mortal48(::core::primitive::u8), + #[codec(index = 49)] + Mortal49(::core::primitive::u8), + #[codec(index = 50)] + Mortal50(::core::primitive::u8), + #[codec(index = 51)] + Mortal51(::core::primitive::u8), + #[codec(index = 52)] + Mortal52(::core::primitive::u8), + #[codec(index = 53)] + Mortal53(::core::primitive::u8), + #[codec(index = 54)] + Mortal54(::core::primitive::u8), + #[codec(index = 55)] + Mortal55(::core::primitive::u8), + #[codec(index = 56)] + Mortal56(::core::primitive::u8), + #[codec(index = 57)] + Mortal57(::core::primitive::u8), + #[codec(index = 58)] + Mortal58(::core::primitive::u8), + #[codec(index = 59)] + Mortal59(::core::primitive::u8), + #[codec(index = 60)] + Mortal60(::core::primitive::u8), + #[codec(index = 61)] + Mortal61(::core::primitive::u8), + #[codec(index = 62)] + Mortal62(::core::primitive::u8), + #[codec(index = 63)] + Mortal63(::core::primitive::u8), + #[codec(index = 64)] + Mortal64(::core::primitive::u8), + #[codec(index = 65)] + Mortal65(::core::primitive::u8), + #[codec(index = 66)] + Mortal66(::core::primitive::u8), + #[codec(index = 67)] + Mortal67(::core::primitive::u8), + #[codec(index = 68)] + Mortal68(::core::primitive::u8), + #[codec(index = 69)] + Mortal69(::core::primitive::u8), + #[codec(index = 70)] + Mortal70(::core::primitive::u8), + #[codec(index = 71)] + Mortal71(::core::primitive::u8), + #[codec(index = 72)] + Mortal72(::core::primitive::u8), + #[codec(index = 73)] + Mortal73(::core::primitive::u8), + #[codec(index = 74)] + Mortal74(::core::primitive::u8), + #[codec(index = 75)] + Mortal75(::core::primitive::u8), + #[codec(index = 76)] + Mortal76(::core::primitive::u8), + #[codec(index = 77)] + Mortal77(::core::primitive::u8), + #[codec(index = 78)] + Mortal78(::core::primitive::u8), + #[codec(index = 79)] + Mortal79(::core::primitive::u8), + #[codec(index = 80)] + Mortal80(::core::primitive::u8), + #[codec(index = 81)] + Mortal81(::core::primitive::u8), + #[codec(index = 82)] + Mortal82(::core::primitive::u8), + #[codec(index = 83)] + Mortal83(::core::primitive::u8), + #[codec(index = 84)] + Mortal84(::core::primitive::u8), + #[codec(index = 85)] + Mortal85(::core::primitive::u8), + #[codec(index = 86)] + Mortal86(::core::primitive::u8), + #[codec(index = 87)] + Mortal87(::core::primitive::u8), + #[codec(index = 88)] + Mortal88(::core::primitive::u8), + #[codec(index = 89)] + Mortal89(::core::primitive::u8), + #[codec(index = 90)] + Mortal90(::core::primitive::u8), + #[codec(index = 91)] + Mortal91(::core::primitive::u8), + #[codec(index = 92)] + Mortal92(::core::primitive::u8), + #[codec(index = 93)] + Mortal93(::core::primitive::u8), + #[codec(index = 94)] + Mortal94(::core::primitive::u8), + #[codec(index = 95)] + Mortal95(::core::primitive::u8), + #[codec(index = 96)] + Mortal96(::core::primitive::u8), + #[codec(index = 97)] + Mortal97(::core::primitive::u8), + #[codec(index = 98)] + Mortal98(::core::primitive::u8), + #[codec(index = 99)] + Mortal99(::core::primitive::u8), + #[codec(index = 100)] + Mortal100(::core::primitive::u8), + #[codec(index = 101)] + Mortal101(::core::primitive::u8), + #[codec(index = 102)] + Mortal102(::core::primitive::u8), + #[codec(index = 103)] + Mortal103(::core::primitive::u8), + #[codec(index = 104)] + Mortal104(::core::primitive::u8), + #[codec(index = 105)] + Mortal105(::core::primitive::u8), + #[codec(index = 106)] + Mortal106(::core::primitive::u8), + #[codec(index = 107)] + Mortal107(::core::primitive::u8), + #[codec(index = 108)] + Mortal108(::core::primitive::u8), + #[codec(index = 109)] + Mortal109(::core::primitive::u8), + #[codec(index = 110)] + Mortal110(::core::primitive::u8), + #[codec(index = 111)] + Mortal111(::core::primitive::u8), + #[codec(index = 112)] + Mortal112(::core::primitive::u8), + #[codec(index = 113)] + Mortal113(::core::primitive::u8), + #[codec(index = 114)] + Mortal114(::core::primitive::u8), + #[codec(index = 115)] + Mortal115(::core::primitive::u8), + #[codec(index = 116)] + Mortal116(::core::primitive::u8), + #[codec(index = 117)] + Mortal117(::core::primitive::u8), + #[codec(index = 118)] + Mortal118(::core::primitive::u8), + #[codec(index = 119)] + Mortal119(::core::primitive::u8), + #[codec(index = 120)] + Mortal120(::core::primitive::u8), + #[codec(index = 121)] + Mortal121(::core::primitive::u8), + #[codec(index = 122)] + Mortal122(::core::primitive::u8), + #[codec(index = 123)] + Mortal123(::core::primitive::u8), + #[codec(index = 124)] + Mortal124(::core::primitive::u8), + #[codec(index = 125)] + Mortal125(::core::primitive::u8), + #[codec(index = 126)] + Mortal126(::core::primitive::u8), + #[codec(index = 127)] + Mortal127(::core::primitive::u8), + #[codec(index = 128)] + Mortal128(::core::primitive::u8), + #[codec(index = 129)] + Mortal129(::core::primitive::u8), + #[codec(index = 130)] + Mortal130(::core::primitive::u8), + #[codec(index = 131)] + Mortal131(::core::primitive::u8), + #[codec(index = 132)] + Mortal132(::core::primitive::u8), + #[codec(index = 133)] + Mortal133(::core::primitive::u8), + #[codec(index = 134)] + Mortal134(::core::primitive::u8), + #[codec(index = 135)] + Mortal135(::core::primitive::u8), + #[codec(index = 136)] + Mortal136(::core::primitive::u8), + #[codec(index = 137)] + Mortal137(::core::primitive::u8), + #[codec(index = 138)] + Mortal138(::core::primitive::u8), + #[codec(index = 139)] + Mortal139(::core::primitive::u8), + #[codec(index = 140)] + Mortal140(::core::primitive::u8), + #[codec(index = 141)] + Mortal141(::core::primitive::u8), + #[codec(index = 142)] + Mortal142(::core::primitive::u8), + #[codec(index = 143)] + Mortal143(::core::primitive::u8), + #[codec(index = 144)] + Mortal144(::core::primitive::u8), + #[codec(index = 145)] + Mortal145(::core::primitive::u8), + #[codec(index = 146)] + Mortal146(::core::primitive::u8), + #[codec(index = 147)] + Mortal147(::core::primitive::u8), + #[codec(index = 148)] + Mortal148(::core::primitive::u8), + #[codec(index = 149)] + Mortal149(::core::primitive::u8), + #[codec(index = 150)] + Mortal150(::core::primitive::u8), + #[codec(index = 151)] + Mortal151(::core::primitive::u8), + #[codec(index = 152)] + Mortal152(::core::primitive::u8), + #[codec(index = 153)] + Mortal153(::core::primitive::u8), + #[codec(index = 154)] + Mortal154(::core::primitive::u8), + #[codec(index = 155)] + Mortal155(::core::primitive::u8), + #[codec(index = 156)] + Mortal156(::core::primitive::u8), + #[codec(index = 157)] + Mortal157(::core::primitive::u8), + #[codec(index = 158)] + Mortal158(::core::primitive::u8), + #[codec(index = 159)] + Mortal159(::core::primitive::u8), + #[codec(index = 160)] + Mortal160(::core::primitive::u8), + #[codec(index = 161)] + Mortal161(::core::primitive::u8), + #[codec(index = 162)] + Mortal162(::core::primitive::u8), + #[codec(index = 163)] + Mortal163(::core::primitive::u8), + #[codec(index = 164)] + Mortal164(::core::primitive::u8), + #[codec(index = 165)] + Mortal165(::core::primitive::u8), + #[codec(index = 166)] + Mortal166(::core::primitive::u8), + #[codec(index = 167)] + Mortal167(::core::primitive::u8), + #[codec(index = 168)] + Mortal168(::core::primitive::u8), + #[codec(index = 169)] + Mortal169(::core::primitive::u8), + #[codec(index = 170)] + Mortal170(::core::primitive::u8), + #[codec(index = 171)] + Mortal171(::core::primitive::u8), + #[codec(index = 172)] + Mortal172(::core::primitive::u8), + #[codec(index = 173)] + Mortal173(::core::primitive::u8), + #[codec(index = 174)] + Mortal174(::core::primitive::u8), + #[codec(index = 175)] + Mortal175(::core::primitive::u8), + #[codec(index = 176)] + Mortal176(::core::primitive::u8), + #[codec(index = 177)] + Mortal177(::core::primitive::u8), + #[codec(index = 178)] + Mortal178(::core::primitive::u8), + #[codec(index = 179)] + Mortal179(::core::primitive::u8), + #[codec(index = 180)] + Mortal180(::core::primitive::u8), + #[codec(index = 181)] + Mortal181(::core::primitive::u8), + #[codec(index = 182)] + Mortal182(::core::primitive::u8), + #[codec(index = 183)] + Mortal183(::core::primitive::u8), + #[codec(index = 184)] + Mortal184(::core::primitive::u8), + #[codec(index = 185)] + Mortal185(::core::primitive::u8), + #[codec(index = 186)] + Mortal186(::core::primitive::u8), + #[codec(index = 187)] + Mortal187(::core::primitive::u8), + #[codec(index = 188)] + Mortal188(::core::primitive::u8), + #[codec(index = 189)] + Mortal189(::core::primitive::u8), + #[codec(index = 190)] + Mortal190(::core::primitive::u8), + #[codec(index = 191)] + Mortal191(::core::primitive::u8), + #[codec(index = 192)] + Mortal192(::core::primitive::u8), + #[codec(index = 193)] + Mortal193(::core::primitive::u8), + #[codec(index = 194)] + Mortal194(::core::primitive::u8), + #[codec(index = 195)] + Mortal195(::core::primitive::u8), + #[codec(index = 196)] + Mortal196(::core::primitive::u8), + #[codec(index = 197)] + Mortal197(::core::primitive::u8), + #[codec(index = 198)] + Mortal198(::core::primitive::u8), + #[codec(index = 199)] + Mortal199(::core::primitive::u8), + #[codec(index = 200)] + Mortal200(::core::primitive::u8), + #[codec(index = 201)] + Mortal201(::core::primitive::u8), + #[codec(index = 202)] + Mortal202(::core::primitive::u8), + #[codec(index = 203)] + Mortal203(::core::primitive::u8), + #[codec(index = 204)] + Mortal204(::core::primitive::u8), + #[codec(index = 205)] + Mortal205(::core::primitive::u8), + #[codec(index = 206)] + Mortal206(::core::primitive::u8), + #[codec(index = 207)] + Mortal207(::core::primitive::u8), + #[codec(index = 208)] + Mortal208(::core::primitive::u8), + #[codec(index = 209)] + Mortal209(::core::primitive::u8), + #[codec(index = 210)] + Mortal210(::core::primitive::u8), + #[codec(index = 211)] + Mortal211(::core::primitive::u8), + #[codec(index = 212)] + Mortal212(::core::primitive::u8), + #[codec(index = 213)] + Mortal213(::core::primitive::u8), + #[codec(index = 214)] + Mortal214(::core::primitive::u8), + #[codec(index = 215)] + Mortal215(::core::primitive::u8), + #[codec(index = 216)] + Mortal216(::core::primitive::u8), + #[codec(index = 217)] + Mortal217(::core::primitive::u8), + #[codec(index = 218)] + Mortal218(::core::primitive::u8), + #[codec(index = 219)] + Mortal219(::core::primitive::u8), + #[codec(index = 220)] + Mortal220(::core::primitive::u8), + #[codec(index = 221)] + Mortal221(::core::primitive::u8), + #[codec(index = 222)] + Mortal222(::core::primitive::u8), + #[codec(index = 223)] + Mortal223(::core::primitive::u8), + #[codec(index = 224)] + Mortal224(::core::primitive::u8), + #[codec(index = 225)] + Mortal225(::core::primitive::u8), + #[codec(index = 226)] + Mortal226(::core::primitive::u8), + #[codec(index = 227)] + Mortal227(::core::primitive::u8), + #[codec(index = 228)] + Mortal228(::core::primitive::u8), + #[codec(index = 229)] + Mortal229(::core::primitive::u8), + #[codec(index = 230)] + Mortal230(::core::primitive::u8), + #[codec(index = 231)] + Mortal231(::core::primitive::u8), + #[codec(index = 232)] + Mortal232(::core::primitive::u8), + #[codec(index = 233)] + Mortal233(::core::primitive::u8), + #[codec(index = 234)] + Mortal234(::core::primitive::u8), + #[codec(index = 235)] + Mortal235(::core::primitive::u8), + #[codec(index = 236)] + Mortal236(::core::primitive::u8), + #[codec(index = 237)] + Mortal237(::core::primitive::u8), + #[codec(index = 238)] + Mortal238(::core::primitive::u8), + #[codec(index = 239)] + Mortal239(::core::primitive::u8), + #[codec(index = 240)] + Mortal240(::core::primitive::u8), + #[codec(index = 241)] + Mortal241(::core::primitive::u8), + #[codec(index = 242)] + Mortal242(::core::primitive::u8), + #[codec(index = 243)] + Mortal243(::core::primitive::u8), + #[codec(index = 244)] + Mortal244(::core::primitive::u8), + #[codec(index = 245)] + Mortal245(::core::primitive::u8), + #[codec(index = 246)] + Mortal246(::core::primitive::u8), + #[codec(index = 247)] + Mortal247(::core::primitive::u8), + #[codec(index = 248)] + Mortal248(::core::primitive::u8), + #[codec(index = 249)] + Mortal249(::core::primitive::u8), + #[codec(index = 250)] + Mortal250(::core::primitive::u8), + #[codec(index = 251)] + Mortal251(::core::primitive::u8), + #[codec(index = 252)] + Mortal252(::core::primitive::u8), + #[codec(index = 253)] + Mortal253(::core::primitive::u8), + #[codec(index = 254)] + Mortal254(::core::primitive::u8), + #[codec(index = 255)] + Mortal255(::core::primitive::u8), + } + } + pub mod header { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Header<_0> { + pub parent_hash: ::subxt_core::utils::H256, + #[codec(compact)] + pub number: _0, + pub state_root: ::subxt_core::utils::H256, + pub extrinsics_root: ::subxt_core::utils::H256, + pub digest: runtime_types::sp_runtime::generic::digest::Digest, + } + } + } + pub mod traits { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BlakeTwo256; + } + pub mod transaction_validity { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum InvalidTransaction { + #[codec(index = 0)] + Call, + #[codec(index = 1)] + Payment, + #[codec(index = 2)] + Future, + #[codec(index = 3)] + Stale, + #[codec(index = 4)] + BadProof, + #[codec(index = 5)] + AncientBirthBlock, + #[codec(index = 6)] + ExhaustsResources, + #[codec(index = 7)] + Custom(::core::primitive::u8), + #[codec(index = 8)] + BadMandatory, + #[codec(index = 9)] + MandatoryValidation, + #[codec(index = 10)] + BadSigner, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TransactionSource { + #[codec(index = 0)] + InBlock, + #[codec(index = 1)] + Local, + #[codec(index = 2)] + External, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TransactionValidityError { + #[codec(index = 0)] + Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), + #[codec(index = 1)] + Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum UnknownTransaction { + #[codec(index = 0)] + CannotLookup, + #[codec(index = 1)] + NoUnsignedValidator, + #[codec(index = 2)] + Custom(::core::primitive::u8), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ValidTransaction { + pub priority: ::core::primitive::u64, + pub requires: ::subxt_core::alloc::vec::Vec< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + pub provides: ::subxt_core::alloc::vec::Vec< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + pub longevity: ::core::primitive::u64, + pub propagate: ::core::primitive::bool, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + #[codec(index = 13)] + RootNotAllowed, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ExtrinsicInclusionMode { + #[codec(index = 0)] + AllExtrinsics, + #[codec(index = 1)] + OnlyInherents, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519([::core::primitive::u8; 64usize]), + #[codec(index = 1)] + Sr25519([::core::primitive::u8; 64usize]), + #[codec(index = 2)] + Ecdsa([::core::primitive::u8; 65usize]), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OpaqueValue(pub ::subxt_core::alloc::vec::Vec<::core::primitive::u8>); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TokenError { + #[codec(index = 0)] + FundsUnavailable, + #[codec(index = 1)] + OnlyProvider, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + #[codec(index = 7)] + CannotCreateHold, + #[codec(index = 8)] + NotExpendable, + #[codec(index = 9)] + Blocked, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } + } + pub mod sp_session { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MembershipProof { + pub session: ::core::primitive::u32, + pub trie_nodes: ::subxt_core::alloc::vec::Vec< + ::subxt_core::alloc::vec::Vec<::core::primitive::u8>, + >, + pub validator_count: ::core::primitive::u32, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::subxt_core::alloc::vec::Vec<_0>, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Exposure<_0, _1> { + #[codec(compact)] + pub total: _1, + #[codec(compact)] + pub own: _1, + pub others: ::subxt_core::alloc::vec::Vec< + runtime_types::sp_staking::IndividualExposure<_0, _1>, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ExposurePage<_0, _1> { + #[codec(compact)] + pub page_total: _1, + pub others: ::subxt_core::alloc::vec::Vec< + runtime_types::sp_staking::IndividualExposure<_0, _1>, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct IndividualExposure<_0, _1> { + pub who: _0, + #[codec(compact)] + pub value: _1, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PagedExposureMetadata<_0> { + #[codec(compact)] + pub total: _0, + #[codec(compact)] + pub own: _0, + pub nominator_count: ::core::primitive::u32, + pub page_count: ::core::primitive::u32, + } + } + pub mod sp_version { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RuntimeVersion { + pub spec_name: ::subxt_core::alloc::string::String, + pub impl_name: ::subxt_core::alloc::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: ::subxt_core::alloc::vec::Vec<( + [::core::primitive::u8; 8usize], + ::core::primitive::u32, + )>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } + } + pub mod sp_weights { + use super::runtime_types; + pub mod weight_v2 { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Weight { + #[codec(compact)] + pub ref_time: ::core::primitive::u64, + #[codec(compact)] + pub proof_size: ::core::primitive::u64, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + } + pub mod tangle_primitives { + use super::runtime_types; + pub mod services { + use super::runtime_types; + pub mod field { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct BoundedString( + pub runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ); + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[codec(dumb_trait_bound)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Field<_1> { + # [codec (index = 0)] None , # [codec (index = 1)] Bool (:: core :: primitive :: bool ,) , # [codec (index = 2)] Uint8 (:: core :: primitive :: u8 ,) , # [codec (index = 3)] Int8 (:: core :: primitive :: i8 ,) , # [codec (index = 4)] Uint16 (:: core :: primitive :: u16 ,) , # [codec (index = 5)] Int16 (:: core :: primitive :: i16 ,) , # [codec (index = 6)] Uint32 (:: core :: primitive :: u32 ,) , # [codec (index = 7)] Int32 (:: core :: primitive :: i32 ,) , # [codec (index = 8)] Uint64 (:: core :: primitive :: u64 ,) , # [codec (index = 9)] Int64 (:: core :: primitive :: i64 ,) , # [codec (index = 10)] String (runtime_types :: tangle_primitives :: services :: field :: BoundedString ,) , # [codec (index = 11)] Bytes (runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < :: core :: primitive :: u8 > ,) , # [codec (index = 12)] Array (runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: tangle_primitives :: services :: field :: Field < _1 > > ,) , # [codec (index = 13)] List (runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: tangle_primitives :: services :: field :: Field < _1 > > ,) , # [codec (index = 14)] Struct (runtime_types :: tangle_primitives :: services :: field :: BoundedString , :: subxt_core :: alloc :: boxed :: Box < runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < (runtime_types :: tangle_primitives :: services :: field :: BoundedString , runtime_types :: tangle_primitives :: services :: field :: Field < _1 > ,) > > ,) , # [codec (index = 100)] AccountId (_1 ,) , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum FieldType { + #[codec(index = 0)] + Void, + #[codec(index = 1)] + Bool, + #[codec(index = 2)] + Uint8, + #[codec(index = 3)] + Int8, + #[codec(index = 4)] + Uint16, + #[codec(index = 5)] + Int16, + #[codec(index = 6)] + Uint32, + #[codec(index = 7)] + Int32, + #[codec(index = 8)] + Uint64, + #[codec(index = 9)] + Int64, + #[codec(index = 10)] + String, + #[codec(index = 11)] + Bytes, + #[codec(index = 12)] + Optional( + ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_primitives::services::field::FieldType, + >, + ), + #[codec(index = 13)] + Array( + ::core::primitive::u64, + ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_primitives::services::field::FieldType, + >, + ), + #[codec(index = 14)] + List( + ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_primitives::services::field::FieldType, + >, + ), + #[codec(index = 15)] + Struct( + ::subxt_core::alloc::boxed::Box< + runtime_types::tangle_primitives::services::field::FieldType, + >, + ::subxt_core::alloc::boxed::Box< + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::tangle_primitives::services::field::FieldType, + runtime_types::tangle_primitives::services::field::FieldType, + )>, + >, + ), + #[codec(index = 100)] + AccountId, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ApprovalState { + #[codec(index = 0)] + Pending, + #[codec(index = 1)] + Approved { + restaking_percent: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 2)] + Rejected, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Architecture { + #[codec(index = 0)] + Wasm, + #[codec(index = 1)] + Wasm64, + #[codec(index = 2)] + Wasi, + #[codec(index = 3)] + Wasi64, + #[codec(index = 4)] + Amd, + #[codec(index = 5)] + Amd64, + #[codec(index = 6)] + Arm, + #[codec(index = 7)] + Arm64, + #[codec(index = 8)] + RiscV, + #[codec(index = 9)] + RiscV64, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Asset<_0> { + #[codec(index = 0)] + Custom(_0), + #[codec(index = 1)] + Erc20(::subxt_core::utils::H160), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum BlueprintServiceManager { + #[codec(index = 0)] + Evm(::subxt_core::utils::H160), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ContainerGadget { + pub sources: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::GadgetSource, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Gadget { + #[codec(index = 0)] + Wasm(runtime_types::tangle_primitives::services::WasmGadget), + #[codec(index = 1)] + Native(runtime_types::tangle_primitives::services::NativeGadget), + #[codec(index = 2)] + Container(runtime_types::tangle_primitives::services::ContainerGadget), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GadgetBinary { + pub arch: runtime_types::tangle_primitives::services::Architecture, + pub os: runtime_types::tangle_primitives::services::OperatingSystem, + pub name: runtime_types::tangle_primitives::services::field::BoundedString, + pub sha256: [::core::primitive::u8; 32usize], + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GadgetSource { + pub fetcher: runtime_types::tangle_primitives::services::GadgetSourceFetcher, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum GadgetSourceFetcher { + #[codec(index = 0)] + IPFS( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 1)] + Github(runtime_types::tangle_primitives::services::GithubFetcher), + #[codec(index = 2)] + ContainerImage( + runtime_types::tangle_primitives::services::ImageRegistryFetcher, + ), + #[codec(index = 3)] + Testing(runtime_types::tangle_primitives::services::TestFetcher), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct GithubFetcher { + pub owner: runtime_types::tangle_primitives::services::field::BoundedString, + pub repo: runtime_types::tangle_primitives::services::field::BoundedString, + pub tag: runtime_types::tangle_primitives::services::field::BoundedString, + pub binaries: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::GadgetBinary, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ImageRegistryFetcher { + pub registry: runtime_types::tangle_primitives::services::field::BoundedString, + pub image: runtime_types::tangle_primitives::services::field::BoundedString, + pub tag: runtime_types::tangle_primitives::services::field::BoundedString, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct JobCall<_1> { + pub service_id: ::core::primitive::u64, + pub job: ::core::primitive::u8, + pub args: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::field::Field<_1>, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct JobCallResult<_1> { + pub service_id: ::core::primitive::u64, + pub call_id: ::core::primitive::u64, + pub result: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::field::Field<_1>, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct JobDefinition { + pub metadata: runtime_types::tangle_primitives::services::JobMetadata, + pub params: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::field::FieldType, + >, + pub result: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::field::FieldType, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct JobMetadata { + pub name: runtime_types::tangle_primitives::services::field::BoundedString, + pub description: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum MasterBlueprintServiceManagerRevision { + #[codec(index = 0)] + Latest, + #[codec(index = 1)] + Specific(::core::primitive::u32), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct NativeGadget { + pub sources: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::GadgetSource, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum OperatingSystem { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + Linux, + #[codec(index = 2)] + Windows, + #[codec(index = 3)] + MacOS, + #[codec(index = 4)] + BSD, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OperatorPreferences { + pub key: [::core::primitive::u8; 65usize], + pub price_targets: runtime_types::tangle_primitives::services::PriceTargets, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct OperatorProfile { + pub services: + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< + ::core::primitive::u64, + >, + pub blueprints: + runtime_types::bounded_collections::bounded_btree_set::BoundedBTreeSet< + ::core::primitive::u64, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct PriceTargets { + pub cpu: ::core::primitive::u64, + pub mem: ::core::primitive::u64, + pub storage_hdd: ::core::primitive::u64, + pub storage_ssd: ::core::primitive::u64, + pub storage_nvme: ::core::primitive::u64, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct RpcServicesWithBlueprint<_1, _2, _3> { + pub blueprint_id: ::core::primitive::u64, + pub blueprint: runtime_types::tangle_primitives::services::ServiceBlueprint, + pub services: ::subxt_core::alloc::vec::Vec< + runtime_types::tangle_primitives::services::Service<_1, _2, _3>, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Service<_1, _2, _3> { + pub id: ::core::primitive::u64, + pub blueprint: ::core::primitive::u64, + pub owner: _1, + pub permitted_callers: + runtime_types::bounded_collections::bounded_vec::BoundedVec<_1>, + pub operators: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + _1, + runtime_types::sp_arithmetic::per_things::Percent, + )>, + pub assets: runtime_types::bounded_collections::bounded_vec::BoundedVec<_3>, + pub ttl: _2, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ServiceBlueprint { pub metadata : runtime_types :: tangle_primitives :: services :: ServiceMetadata , pub jobs : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: tangle_primitives :: services :: JobDefinition > , pub registration_params : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: tangle_primitives :: services :: field :: FieldType > , pub request_params : runtime_types :: bounded_collections :: bounded_vec :: BoundedVec < runtime_types :: tangle_primitives :: services :: field :: FieldType > , pub manager : runtime_types :: tangle_primitives :: services :: BlueprintServiceManager , pub master_manager_revision : runtime_types :: tangle_primitives :: services :: MasterBlueprintServiceManagerRevision , pub gadget : runtime_types :: tangle_primitives :: services :: Gadget , } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ServiceMetadata { + pub name: runtime_types::tangle_primitives::services::field::BoundedString, + pub description: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + pub author: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + pub category: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + pub code_repository: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + pub logo: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + pub website: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + pub license: ::core::option::Option< + runtime_types::tangle_primitives::services::field::BoundedString, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct ServiceRequest<_1, _2, _3> { + pub blueprint: ::core::primitive::u64, + pub owner: _1, + pub permitted_callers: + runtime_types::bounded_collections::bounded_vec::BoundedVec<_1>, + pub assets: runtime_types::bounded_collections::bounded_vec::BoundedVec<_3>, + pub ttl: _2, + pub args: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::field::Field<_1>, + >, + pub operators_with_approval_state: + runtime_types::bounded_collections::bounded_vec::BoundedVec<( + _1, + runtime_types::tangle_primitives::services::ApprovalState, + )>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct StagingServicePayment<_0, _1, _2> { + pub request_id: ::core::primitive::u64, + pub refund_to: runtime_types::tangle_primitives::types::Account<_0>, + pub asset: runtime_types::tangle_primitives::services::Asset<_1>, + pub amount: _2, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct TestFetcher { + pub cargo_package: + runtime_types::tangle_primitives::services::field::BoundedString, + pub cargo_bin: runtime_types::tangle_primitives::services::field::BoundedString, + pub base_path: runtime_types::tangle_primitives::services::field::BoundedString, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum TypeCheckError { + #[codec(index = 0)] + ArgumentTypeMismatch { + index: ::core::primitive::u8, + expected: runtime_types::tangle_primitives::services::field::FieldType, + actual: runtime_types::tangle_primitives::services::field::FieldType, + }, + #[codec(index = 1)] + NotEnoughArguments { + expected: ::core::primitive::u8, + actual: ::core::primitive::u8, + }, + #[codec(index = 2)] + ResultTypeMismatch { + index: ::core::primitive::u8, + expected: runtime_types::tangle_primitives::services::field::FieldType, + actual: runtime_types::tangle_primitives::services::field::FieldType, + }, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct WasmGadget { + pub runtime: runtime_types::tangle_primitives::services::WasmRuntime, + pub sources: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::tangle_primitives::services::GadgetSource, + >, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + serde :: Deserialize, + serde :: Serialize, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum WasmRuntime { + #[codec(index = 0)] + Wasmtime, + #[codec(index = 1)] + Wasmer, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum Account<_0> { + #[codec(index = 0)] + Id(_0), + #[codec(index = 1)] + Address(::subxt_core::utils::H160), + } + } + } + pub mod tangle_testnet_runtime { + use super::runtime_types; + pub mod opaque { + use super::runtime_types; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct SessionKeys { + pub babe: runtime_types::sp_consensus_babe::app::Public, + pub grandpa: runtime_types::sp_consensus_grandpa::app::Public, + pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + } + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MaxDelegations; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MaxDelegatorBlueprints; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MaxOperatorBlueprints; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MaxUnstakeRequests; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct MaxWithdrawRequests; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct NposSolution16 { + pub votes1: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes2: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + ( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ), + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes3: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 2usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes4: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 3usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes5: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 4usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes6: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 5usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes7: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 6usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes8: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 7usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes9: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 8usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes10: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 9usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes11: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 10usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes12: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 11usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes13: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 12usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes14: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 13usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes15: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 14usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes16: ::subxt_core::alloc::vec::Vec<( + ::subxt_core::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + ::subxt_core::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 15usize], + ::subxt_core::ext::codec::Compact<::core::primitive::u16>, + )>, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum OriginCaller { + #[codec(index = 1)] + system( + runtime_types::frame_support::dispatch::RawOrigin< + ::subxt_core::utils::AccountId32, + >, + ), + #[codec(index = 13)] + Council( + runtime_types::pallet_collective::RawOrigin<::subxt_core::utils::AccountId32>, + ), + #[codec(index = 33)] + Ethereum(runtime_types::pallet_ethereum::RawOrigin), + #[codec(index = 3)] + Void(runtime_types::sp_core::Void), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum ProxyType { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + NonTransfer, + #[codec(index = 2)] + Governance, + #[codec(index = 3)] + Staking, + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub struct Runtime; + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RuntimeCall { + #[codec(index = 1)] + System(runtime_types::frame_system::pallet::Call), + #[codec(index = 2)] + Timestamp(runtime_types::pallet_timestamp::pallet::Call), + #[codec(index = 3)] + Sudo(runtime_types::pallet_sudo::pallet::Call), + #[codec(index = 5)] + Assets(runtime_types::pallet_assets::pallet::Call), + #[codec(index = 6)] + Balances(runtime_types::pallet_balances::pallet::Call), + #[codec(index = 9)] + Babe(runtime_types::pallet_babe::pallet::Call), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Call), + #[codec(index = 11)] + Indices(runtime_types::pallet_indices::pallet::Call), + #[codec(index = 12)] + Democracy(runtime_types::pallet_democracy::pallet::Call), + #[codec(index = 13)] + Council(runtime_types::pallet_collective::pallet::Call), + #[codec(index = 14)] + Vesting(runtime_types::pallet_vesting::pallet::Call), + #[codec(index = 15)] + Elections(runtime_types::pallet_elections_phragmen::pallet::Call), + #[codec(index = 16)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Call, + ), + #[codec(index = 17)] + Staking(runtime_types::pallet_staking::pallet::pallet::Call), + #[codec(index = 18)] + Session(runtime_types::pallet_session::pallet::Call), + #[codec(index = 20)] + Treasury(runtime_types::pallet_treasury::pallet::Call), + #[codec(index = 21)] + Bounties(runtime_types::pallet_bounties::pallet::Call), + #[codec(index = 22)] + ChildBounties(runtime_types::pallet_child_bounties::pallet::Call), + #[codec(index = 23)] + BagsList(runtime_types::pallet_bags_list::pallet::Call), + #[codec(index = 24)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), + #[codec(index = 25)] + Scheduler(runtime_types::pallet_scheduler::pallet::Call), + #[codec(index = 26)] + Preimage(runtime_types::pallet_preimage::pallet::Call), + #[codec(index = 28)] + TxPause(runtime_types::pallet_tx_pause::pallet::Call), + #[codec(index = 29)] + ImOnline(runtime_types::pallet_im_online::pallet::Call), + #[codec(index = 30)] + Identity(runtime_types::pallet_identity::pallet::Call), + #[codec(index = 31)] + Utility(runtime_types::pallet_utility::pallet::Call), + #[codec(index = 32)] + Multisig(runtime_types::pallet_multisig::pallet::Call), + #[codec(index = 33)] + Ethereum(runtime_types::pallet_ethereum::pallet::Call), + #[codec(index = 34)] + EVM(runtime_types::pallet_evm::pallet::Call), + #[codec(index = 36)] + DynamicFee(runtime_types::pallet_dynamic_fee::pallet::Call), + #[codec(index = 37)] + BaseFee(runtime_types::pallet_base_fee::pallet::Call), + #[codec(index = 38)] + HotfixSufficients(runtime_types::pallet_hotfix_sufficients::pallet::Call), + #[codec(index = 39)] + Claims(runtime_types::pallet_airdrop_claims::pallet::Call), + #[codec(index = 44)] + Proxy(runtime_types::pallet_proxy::pallet::Call), + #[codec(index = 45)] + MultiAssetDelegation(runtime_types::pallet_multi_asset_delegation::pallet::Call), + #[codec(index = 51)] + Services(runtime_types::pallet_services::module::Call), + #[codec(index = 52)] + Lst(runtime_types::pallet_tangle_lst::pallet::Call), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RuntimeError { + #[codec(index = 1)] + System(runtime_types::frame_system::pallet::Error), + #[codec(index = 3)] + Sudo(runtime_types::pallet_sudo::pallet::Error), + #[codec(index = 5)] + Assets(runtime_types::pallet_assets::pallet::Error), + #[codec(index = 6)] + Balances(runtime_types::pallet_balances::pallet::Error), + #[codec(index = 9)] + Babe(runtime_types::pallet_babe::pallet::Error), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Error), + #[codec(index = 11)] + Indices(runtime_types::pallet_indices::pallet::Error), + #[codec(index = 12)] + Democracy(runtime_types::pallet_democracy::pallet::Error), + #[codec(index = 13)] + Council(runtime_types::pallet_collective::pallet::Error), + #[codec(index = 14)] + Vesting(runtime_types::pallet_vesting::pallet::Error), + #[codec(index = 15)] + Elections(runtime_types::pallet_elections_phragmen::pallet::Error), + #[codec(index = 16)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Error, + ), + #[codec(index = 17)] + Staking(runtime_types::pallet_staking::pallet::pallet::Error), + #[codec(index = 18)] + Session(runtime_types::pallet_session::pallet::Error), + #[codec(index = 20)] + Treasury(runtime_types::pallet_treasury::pallet::Error), + #[codec(index = 21)] + Bounties(runtime_types::pallet_bounties::pallet::Error), + #[codec(index = 22)] + ChildBounties(runtime_types::pallet_child_bounties::pallet::Error), + #[codec(index = 23)] + BagsList(runtime_types::pallet_bags_list::pallet::Error), + #[codec(index = 24)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Error), + #[codec(index = 25)] + Scheduler(runtime_types::pallet_scheduler::pallet::Error), + #[codec(index = 26)] + Preimage(runtime_types::pallet_preimage::pallet::Error), + #[codec(index = 28)] + TxPause(runtime_types::pallet_tx_pause::pallet::Error), + #[codec(index = 29)] + ImOnline(runtime_types::pallet_im_online::pallet::Error), + #[codec(index = 30)] + Identity(runtime_types::pallet_identity::pallet::Error), + #[codec(index = 31)] + Utility(runtime_types::pallet_utility::pallet::Error), + #[codec(index = 32)] + Multisig(runtime_types::pallet_multisig::pallet::Error), + #[codec(index = 33)] + Ethereum(runtime_types::pallet_ethereum::pallet::Error), + #[codec(index = 34)] + EVM(runtime_types::pallet_evm::pallet::Error), + #[codec(index = 38)] + HotfixSufficients(runtime_types::pallet_hotfix_sufficients::pallet::Error), + #[codec(index = 39)] + Claims(runtime_types::pallet_airdrop_claims::pallet::Error), + #[codec(index = 44)] + Proxy(runtime_types::pallet_proxy::pallet::Error), + #[codec(index = 45)] + MultiAssetDelegation(runtime_types::pallet_multi_asset_delegation::pallet::Error), + #[codec(index = 51)] + Services(runtime_types::pallet_services::module::Error), + #[codec(index = 52)] + Lst(runtime_types::pallet_tangle_lst::pallet::Error), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RuntimeEvent { + #[codec(index = 1)] + System(runtime_types::frame_system::pallet::Event), + #[codec(index = 3)] + Sudo(runtime_types::pallet_sudo::pallet::Event), + #[codec(index = 5)] + Assets(runtime_types::pallet_assets::pallet::Event), + #[codec(index = 6)] + Balances(runtime_types::pallet_balances::pallet::Event), + #[codec(index = 7)] + TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Event), + #[codec(index = 11)] + Indices(runtime_types::pallet_indices::pallet::Event), + #[codec(index = 12)] + Democracy(runtime_types::pallet_democracy::pallet::Event), + #[codec(index = 13)] + Council(runtime_types::pallet_collective::pallet::Event), + #[codec(index = 14)] + Vesting(runtime_types::pallet_vesting::pallet::Event), + #[codec(index = 15)] + Elections(runtime_types::pallet_elections_phragmen::pallet::Event), + #[codec(index = 16)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Event, + ), + #[codec(index = 17)] + Staking(runtime_types::pallet_staking::pallet::pallet::Event), + #[codec(index = 18)] + Session(runtime_types::pallet_session::pallet::Event), + #[codec(index = 20)] + Treasury(runtime_types::pallet_treasury::pallet::Event), + #[codec(index = 21)] + Bounties(runtime_types::pallet_bounties::pallet::Event), + #[codec(index = 22)] + ChildBounties(runtime_types::pallet_child_bounties::pallet::Event), + #[codec(index = 23)] + BagsList(runtime_types::pallet_bags_list::pallet::Event), + #[codec(index = 24)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), + #[codec(index = 25)] + Scheduler(runtime_types::pallet_scheduler::pallet::Event), + #[codec(index = 26)] + Preimage(runtime_types::pallet_preimage::pallet::Event), + #[codec(index = 27)] + Offences(runtime_types::pallet_offences::pallet::Event), + #[codec(index = 28)] + TxPause(runtime_types::pallet_tx_pause::pallet::Event), + #[codec(index = 29)] + ImOnline(runtime_types::pallet_im_online::pallet::Event), + #[codec(index = 30)] + Identity(runtime_types::pallet_identity::pallet::Event), + #[codec(index = 31)] + Utility(runtime_types::pallet_utility::pallet::Event), + #[codec(index = 32)] + Multisig(runtime_types::pallet_multisig::pallet::Event), + #[codec(index = 33)] + Ethereum(runtime_types::pallet_ethereum::pallet::Event), + #[codec(index = 34)] + EVM(runtime_types::pallet_evm::pallet::Event), + #[codec(index = 37)] + BaseFee(runtime_types::pallet_base_fee::pallet::Event), + #[codec(index = 39)] + Claims(runtime_types::pallet_airdrop_claims::pallet::Event), + #[codec(index = 44)] + Proxy(runtime_types::pallet_proxy::pallet::Event), + #[codec(index = 45)] + MultiAssetDelegation(runtime_types::pallet_multi_asset_delegation::pallet::Event), + #[codec(index = 51)] + Services(runtime_types::pallet_services::module::Event), + #[codec(index = 52)] + Lst(runtime_types::pallet_tangle_lst::pallet::Event), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RuntimeFreezeReason { + #[codec(index = 24)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::FreezeReason), + #[codec(index = 52)] + Lst(runtime_types::pallet_tangle_lst::pallet::FreezeReason), + } + #[derive( + :: subxt_core :: ext :: codec :: Decode, + :: subxt_core :: ext :: codec :: Encode, + :: subxt_core :: ext :: scale_decode :: DecodeAsType, + :: subxt_core :: ext :: scale_encode :: EncodeAsType, + Clone, + Debug, + Eq, + PartialEq, + )] + # [codec (crate = :: subxt_core :: ext :: codec)] + #[decode_as_type(crate_path = ":: subxt_core :: ext :: scale_decode")] + #[encode_as_type(crate_path = ":: subxt_core :: ext :: scale_encode")] + pub enum RuntimeHoldReason { + #[codec(index = 26)] + Preimage(runtime_types::pallet_preimage::pallet::HoldReason), + } + } + } +}