diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs
index 1c621eaa3b..a41ed8799a 100644
--- a/cli/src/commands/compatibility.rs
+++ b/cli/src/commands/compatibility.rs
@@ -8,9 +8,9 @@ use color_eyre::eyre::{
WrapErr,
};
use frame_metadata::{
+ v15::RuntimeMetadataV15,
RuntimeMetadata,
RuntimeMetadataPrefixed,
- RuntimeMetadataV15,
META_RESERVED,
};
use jsonrpsee::client_transport::ws::Uri;
diff --git a/codegen/polka_runtime.rs b/codegen/polka_runtime.rs
new file mode 100644
index 0000000000..4f939c8c8a
--- /dev/null
+++ b/codegen/polka_runtime.rs
@@ -0,0 +1,57006 @@
+#[allow(dead_code, unused_imports, non_camel_case_types)]
+#[allow(clippy::all)]
+pub mod api {
+ use super::api as root_mod;
+ pub static PALLETS: [&str; 59usize] = [
+ "System",
+ "Utility",
+ "Babe",
+ "Timestamp",
+ "Authorship",
+ "Indices",
+ "Balances",
+ "TransactionPayment",
+ "AssetTxPayment",
+ "ElectionProviderMultiPhase",
+ "Staking",
+ "Session",
+ "Democracy",
+ "Council",
+ "TechnicalCommittee",
+ "Elections",
+ "TechnicalMembership",
+ "Grandpa",
+ "Treasury",
+ "Contracts",
+ "Sudo",
+ "ImOnline",
+ "AuthorityDiscovery",
+ "Offences",
+ "Historical",
+ "RandomnessCollectiveFlip",
+ "Identity",
+ "Society",
+ "Recovery",
+ "Vesting",
+ "Scheduler",
+ "Preimage",
+ "Proxy",
+ "Multisig",
+ "Bounties",
+ "Tips",
+ "Assets",
+ "Mmr",
+ "Lottery",
+ "Nis",
+ "Uniques",
+ "Nfts",
+ "TransactionStorage",
+ "VoterList",
+ "StateTrieMigration",
+ "ChildBounties",
+ "Referenda",
+ "Remark",
+ "RootTesting",
+ "ConvictionVoting",
+ "Whitelist",
+ "AllianceMotion",
+ "Alliance",
+ "NominationPools",
+ "RankedPolls",
+ "RankedCollective",
+ "FastUnstake",
+ "MessageQueue",
+ "Pov",
+ ];
+ #[derive(
+ :: subxt :: ext :: codec :: Decode, :: subxt :: ext :: codec :: Encode, Debug,
+ )]
+ pub enum Event {
+ #[codec(index = 0)]
+ System(system::Event),
+ #[codec(index = 1)]
+ Utility(utility::Event),
+ #[codec(index = 5)]
+ Indices(indices::Event),
+ #[codec(index = 6)]
+ Balances(balances::Event),
+ #[codec(index = 7)]
+ TransactionPayment(transaction_payment::Event),
+ #[codec(index = 8)]
+ AssetTxPayment(asset_tx_payment::Event),
+ #[codec(index = 9)]
+ ElectionProviderMultiPhase(election_provider_multi_phase::Event),
+ #[codec(index = 10)]
+ Staking(staking::Event),
+ #[codec(index = 11)]
+ Session(session::Event),
+ #[codec(index = 12)]
+ Democracy(democracy::Event),
+ #[codec(index = 13)]
+ Council(council::Event),
+ #[codec(index = 14)]
+ TechnicalCommittee(technical_committee::Event),
+ #[codec(index = 15)]
+ Elections(elections::Event),
+ #[codec(index = 16)]
+ TechnicalMembership(technical_membership::Event),
+ #[codec(index = 17)]
+ Grandpa(grandpa::Event),
+ #[codec(index = 18)]
+ Treasury(treasury::Event),
+ #[codec(index = 19)]
+ Contracts(contracts::Event),
+ #[codec(index = 20)]
+ Sudo(sudo::Event),
+ #[codec(index = 21)]
+ ImOnline(im_online::Event),
+ #[codec(index = 23)]
+ Offences(offences::Event),
+ #[codec(index = 26)]
+ Identity(identity::Event),
+ #[codec(index = 27)]
+ Society(society::Event),
+ #[codec(index = 28)]
+ Recovery(recovery::Event),
+ #[codec(index = 29)]
+ Vesting(vesting::Event),
+ #[codec(index = 30)]
+ Scheduler(scheduler::Event),
+ #[codec(index = 31)]
+ Preimage(preimage::Event),
+ #[codec(index = 32)]
+ Proxy(proxy::Event),
+ #[codec(index = 33)]
+ Multisig(multisig::Event),
+ #[codec(index = 34)]
+ Bounties(bounties::Event),
+ #[codec(index = 35)]
+ Tips(tips::Event),
+ #[codec(index = 36)]
+ Assets(assets::Event),
+ #[codec(index = 38)]
+ Lottery(lottery::Event),
+ #[codec(index = 39)]
+ Nis(nis::Event),
+ #[codec(index = 40)]
+ Uniques(uniques::Event),
+ #[codec(index = 41)]
+ Nfts(nfts::Event),
+ #[codec(index = 42)]
+ TransactionStorage(transaction_storage::Event),
+ #[codec(index = 43)]
+ VoterList(voter_list::Event),
+ #[codec(index = 44)]
+ StateTrieMigration(state_trie_migration::Event),
+ #[codec(index = 45)]
+ ChildBounties(child_bounties::Event),
+ #[codec(index = 46)]
+ Referenda(referenda::Event),
+ #[codec(index = 47)]
+ Remark(remark::Event),
+ #[codec(index = 49)]
+ ConvictionVoting(conviction_voting::Event),
+ #[codec(index = 50)]
+ Whitelist(whitelist::Event),
+ #[codec(index = 51)]
+ AllianceMotion(alliance_motion::Event),
+ #[codec(index = 52)]
+ Alliance(alliance::Event),
+ #[codec(index = 53)]
+ NominationPools(nomination_pools::Event),
+ #[codec(index = 54)]
+ RankedPolls(ranked_polls::Event),
+ #[codec(index = 55)]
+ RankedCollective(ranked_collective::Event),
+ #[codec(index = 56)]
+ FastUnstake(fast_unstake::Event),
+ #[codec(index = 57)]
+ MessageQueue(message_queue::Event),
+ #[codec(index = 58)]
+ Pov(pov::Event),
+ }
+ pub mod system {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Remark {
+ pub remark: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetHeapPages {
+ pub pages: ::core::primitive::u64,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetCode {
+ pub code: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetCodeWithoutChecks {
+ pub code: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetStorage {
+ pub items: ::std::vec::Vec<(
+ ::std::vec::Vec<::core::primitive::u8>,
+ ::std::vec::Vec<::core::primitive::u8>,
+ )>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct KillStorage {
+ pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct KillPrefix {
+ pub prefix: ::std::vec::Vec<::core::primitive::u8>,
+ pub subkeys: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemarkWithEvent {
+ pub remark: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Make some on-chain remark."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(1)`"]
+ #[doc = "# "]
+ pub fn remark(
+ &self,
+ remark: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "remark",
+ Remark { remark },
+ [
+ 101u8, 80u8, 195u8, 226u8, 224u8, 247u8, 60u8, 128u8, 3u8,
+ 101u8, 51u8, 147u8, 96u8, 126u8, 76u8, 230u8, 194u8, 227u8,
+ 191u8, 73u8, 160u8, 146u8, 87u8, 147u8, 243u8, 28u8, 228u8,
+ 116u8, 224u8, 181u8, 129u8, 160u8,
+ ],
+ )
+ }
+ #[doc = "Set the number of pages in the WebAssembly environment's heap."]
+ pub fn set_heap_pages(
+ &self,
+ pages: ::core::primitive::u64,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "set_heap_pages",
+ SetHeapPages { pages },
+ [
+ 43u8, 103u8, 128u8, 49u8, 156u8, 136u8, 11u8, 204u8, 80u8,
+ 6u8, 244u8, 86u8, 171u8, 44u8, 140u8, 225u8, 142u8, 198u8,
+ 43u8, 87u8, 26u8, 45u8, 125u8, 222u8, 165u8, 254u8, 172u8,
+ 158u8, 39u8, 178u8, 86u8, 87u8,
+ ],
+ )
+ }
+ #[doc = "Set the new runtime code."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`"]
+ #[doc = "- 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is"]
+ #[doc = " expensive)."]
+ #[doc = "- 1 storage write (codec `O(C)`)."]
+ #[doc = "- 1 digest item."]
+ #[doc = "- 1 event."]
+ #[doc = "The weight of this function is dependent on the runtime, but generally this is very"]
+ #[doc = "expensive. We will treat this as a full block."]
+ #[doc = "# "]
+ pub fn set_code(
+ &self,
+ code: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "set_code",
+ SetCode { code },
+ [
+ 27u8, 104u8, 244u8, 205u8, 188u8, 254u8, 121u8, 13u8, 106u8,
+ 120u8, 244u8, 108u8, 97u8, 84u8, 100u8, 68u8, 26u8, 69u8,
+ 93u8, 128u8, 107u8, 4u8, 3u8, 142u8, 13u8, 134u8, 196u8,
+ 62u8, 113u8, 181u8, 14u8, 40u8,
+ ],
+ )
+ }
+ #[doc = "Set the new runtime code without doing any checks of the given `code`."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(C)` where `C` length of `code`"]
+ #[doc = "- 1 storage write (codec `O(C)`)."]
+ #[doc = "- 1 digest item."]
+ #[doc = "- 1 event."]
+ #[doc = "The weight of this function is dependent on the runtime. We will treat this as a full"]
+ #[doc = "block. # "]
+ pub fn set_code_without_checks(
+ &self,
+ code: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "set_code_without_checks",
+ SetCodeWithoutChecks { code },
+ [
+ 102u8, 160u8, 125u8, 235u8, 30u8, 23u8, 45u8, 239u8, 112u8,
+ 148u8, 159u8, 158u8, 42u8, 93u8, 206u8, 94u8, 80u8, 250u8,
+ 66u8, 195u8, 60u8, 40u8, 142u8, 169u8, 183u8, 80u8, 80u8,
+ 96u8, 3u8, 231u8, 99u8, 216u8,
+ ],
+ )
+ }
+ #[doc = "Set some items of storage."]
+ pub fn set_storage(
+ &self,
+ items: ::std::vec::Vec<(
+ ::std::vec::Vec<::core::primitive::u8>,
+ ::std::vec::Vec<::core::primitive::u8>,
+ )>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "set_storage",
+ SetStorage { items },
+ [
+ 74u8, 43u8, 106u8, 255u8, 50u8, 151u8, 192u8, 155u8, 14u8,
+ 90u8, 19u8, 45u8, 165u8, 16u8, 235u8, 242u8, 21u8, 131u8,
+ 33u8, 172u8, 119u8, 78u8, 140u8, 10u8, 107u8, 202u8, 122u8,
+ 235u8, 181u8, 191u8, 22u8, 116u8,
+ ],
+ )
+ }
+ #[doc = "Kill some items from storage."]
+ pub fn kill_storage(
+ &self,
+ keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "kill_storage",
+ KillStorage { keys },
+ [
+ 174u8, 174u8, 13u8, 174u8, 75u8, 138u8, 128u8, 235u8, 222u8,
+ 216u8, 85u8, 18u8, 198u8, 1u8, 138u8, 70u8, 19u8, 108u8,
+ 209u8, 41u8, 228u8, 67u8, 130u8, 230u8, 160u8, 207u8, 11u8,
+ 180u8, 139u8, 242u8, 41u8, 15u8,
+ ],
+ )
+ }
+ #[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: ::std::vec::Vec<::core::primitive::u8>,
+ subkeys: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "kill_prefix",
+ KillPrefix { prefix, subkeys },
+ [
+ 203u8, 116u8, 217u8, 42u8, 154u8, 215u8, 77u8, 217u8, 13u8,
+ 22u8, 193u8, 2u8, 128u8, 115u8, 179u8, 115u8, 187u8, 218u8,
+ 129u8, 34u8, 80u8, 4u8, 173u8, 120u8, 92u8, 35u8, 237u8,
+ 112u8, 201u8, 207u8, 200u8, 48u8,
+ ],
+ )
+ }
+ #[doc = "Make some on-chain remark and emit event."]
+ pub fn remark_with_event(
+ &self,
+ remark: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "System",
+ "remark_with_event",
+ RemarkWithEvent { remark },
+ [
+ 123u8, 225u8, 180u8, 179u8, 144u8, 74u8, 27u8, 85u8, 101u8,
+ 75u8, 134u8, 44u8, 181u8, 25u8, 183u8, 158u8, 14u8, 213u8,
+ 56u8, 225u8, 136u8, 88u8, 26u8, 114u8, 178u8, 43u8, 176u8,
+ 43u8, 240u8, 84u8, 116u8, 46u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "Event for the System pallet."]
+ pub type Event = runtime_types::frame_system::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An extrinsic completed successfully."]
+ pub struct ExtrinsicSuccess {
+ pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo,
+ }
+ impl ::subxt::events::StaticEvent for ExtrinsicSuccess {
+ const PALLET: &'static str = "System";
+ const EVENT: &'static str = "ExtrinsicSuccess";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An extrinsic failed."]
+ pub struct ExtrinsicFailed {
+ pub dispatch_error: runtime_types::sp_runtime::DispatchError,
+ pub dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo,
+ }
+ impl ::subxt::events::StaticEvent for ExtrinsicFailed {
+ const PALLET: &'static str = "System";
+ const EVENT: &'static str = "ExtrinsicFailed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "`:code` was updated."]
+ pub struct CodeUpdated;
+ impl ::subxt::events::StaticEvent for CodeUpdated {
+ const PALLET: &'static str = "System";
+ const EVENT: &'static str = "CodeUpdated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new account was created."]
+ pub struct NewAccount {
+ pub account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for NewAccount {
+ const PALLET: &'static str = "System";
+ const EVENT: &'static str = "NewAccount";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account was reaped."]
+ pub struct KilledAccount {
+ pub account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for KilledAccount {
+ const PALLET: &'static str = "System";
+ const EVENT: &'static str = "KilledAccount";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "On on-chain remark happened."]
+ pub struct Remarked {
+ pub sender: ::subxt::utils::AccountId32,
+ pub hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Remarked {
+ const PALLET: &'static str = "System";
+ const EVENT: &'static str = "Remarked";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The full account information for a particular account ID."]
+ pub fn account(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_system::AccountInfo<
+ ::core::primitive::u32,
+ runtime_types::pallet_balances::AccountData<
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "Account",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8,
+ 69u8, 77u8, 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8,
+ 174u8, 243u8, 252u8, 42u8, 65u8, 120u8, 229u8, 38u8, 210u8,
+ 255u8, 22u8, 40u8, 109u8, 223u8,
+ ],
+ )
+ }
+ #[doc = " The full account information for a particular account ID."]
+ pub fn account_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_system::AccountInfo<
+ ::core::primitive::u32,
+ runtime_types::pallet_balances::AccountData<
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "Account",
+ Vec::new(),
+ [
+ 176u8, 187u8, 21u8, 220u8, 159u8, 204u8, 127u8, 14u8, 21u8,
+ 69u8, 77u8, 114u8, 230u8, 141u8, 107u8, 79u8, 23u8, 16u8,
+ 174u8, 243u8, 252u8, 42u8, 65u8, 120u8, 229u8, 38u8, 210u8,
+ 255u8, 22u8, 40u8, 109u8, 223u8,
+ ],
+ )
+ }
+ #[doc = " Total extrinsics count for the current block."]
+ pub fn extrinsic_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "ExtrinsicCount",
+ vec![],
+ [
+ 223u8, 60u8, 201u8, 120u8, 36u8, 44u8, 180u8, 210u8, 242u8,
+ 53u8, 222u8, 154u8, 123u8, 176u8, 249u8, 8u8, 225u8, 28u8,
+ 232u8, 4u8, 136u8, 41u8, 151u8, 82u8, 189u8, 149u8, 49u8,
+ 166u8, 139u8, 9u8, 163u8, 231u8,
+ ],
+ )
+ }
+ #[doc = " The current weight for the block."]
+ pub fn block_weight(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_support::dispatch::PerDispatchClass<
+ runtime_types::sp_weights::weight_v2::Weight,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "BlockWeight",
+ vec![],
+ [
+ 120u8, 67u8, 71u8, 163u8, 36u8, 202u8, 52u8, 106u8, 143u8,
+ 155u8, 144u8, 87u8, 142u8, 241u8, 232u8, 183u8, 56u8, 235u8,
+ 27u8, 237u8, 20u8, 202u8, 33u8, 85u8, 189u8, 0u8, 28u8, 52u8,
+ 198u8, 40u8, 219u8, 54u8,
+ ],
+ )
+ }
+ #[doc = " Total length (in bytes) for all extrinsics put together, for the current block."]
+ pub fn all_extrinsics_len(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "AllExtrinsicsLen",
+ vec![],
+ [
+ 202u8, 145u8, 209u8, 225u8, 40u8, 220u8, 174u8, 74u8, 93u8,
+ 164u8, 254u8, 248u8, 254u8, 192u8, 32u8, 117u8, 96u8, 149u8,
+ 53u8, 145u8, 219u8, 64u8, 234u8, 18u8, 217u8, 200u8, 203u8,
+ 141u8, 145u8, 28u8, 134u8, 60u8,
+ ],
+ )
+ }
+ #[doc = " Map of block numbers to block hashes."]
+ pub fn block_hash(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "BlockHash",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8,
+ 195u8, 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8,
+ 106u8, 20u8, 168u8, 80u8, 76u8, 235u8, 12u8, 51u8, 137u8,
+ 149u8, 200u8, 4u8, 220u8, 237u8,
+ ],
+ )
+ }
+ #[doc = " Map of block numbers to block hashes."]
+ pub fn block_hash_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "BlockHash",
+ Vec::new(),
+ [
+ 50u8, 112u8, 176u8, 239u8, 175u8, 18u8, 205u8, 20u8, 241u8,
+ 195u8, 21u8, 228u8, 186u8, 57u8, 200u8, 25u8, 38u8, 44u8,
+ 106u8, 20u8, 168u8, 80u8, 76u8, 235u8, 12u8, 51u8, 137u8,
+ 149u8, 200u8, 4u8, 220u8, 237u8,
+ ],
+ )
+ }
+ #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."]
+ pub fn extrinsic_data(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::core::primitive::u8>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "ExtrinsicData",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8,
+ 238u8, 211u8, 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8,
+ 125u8, 98u8, 23u8, 241u8, 59u8, 49u8, 86u8, 126u8, 9u8,
+ 114u8, 163u8, 160u8, 62u8, 50u8, 67u8,
+ ],
+ )
+ }
+ #[doc = " Extrinsics data for the current block (maps an extrinsic's index to its data)."]
+ pub fn extrinsic_data_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::core::primitive::u8>,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "ExtrinsicData",
+ Vec::new(),
+ [
+ 210u8, 224u8, 211u8, 186u8, 118u8, 210u8, 185u8, 194u8,
+ 238u8, 211u8, 254u8, 73u8, 67u8, 184u8, 31u8, 229u8, 168u8,
+ 125u8, 98u8, 23u8, 241u8, 59u8, 49u8, 86u8, 126u8, 9u8,
+ 114u8, 163u8, 160u8, 62u8, 50u8, 67u8,
+ ],
+ )
+ }
+ #[doc = " The current block number being processed. Set by `execute_block`."]
+ pub fn number(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "Number",
+ vec![],
+ [
+ 228u8, 96u8, 102u8, 190u8, 252u8, 130u8, 239u8, 172u8, 126u8,
+ 235u8, 246u8, 139u8, 208u8, 15u8, 88u8, 245u8, 141u8, 232u8,
+ 43u8, 204u8, 36u8, 87u8, 211u8, 141u8, 187u8, 68u8, 236u8,
+ 70u8, 193u8, 235u8, 164u8, 191u8,
+ ],
+ )
+ }
+ #[doc = " Hash of the previous block."]
+ pub fn parent_hash(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "ParentHash",
+ vec![],
+ [
+ 232u8, 206u8, 177u8, 119u8, 38u8, 57u8, 233u8, 50u8, 225u8,
+ 49u8, 169u8, 176u8, 210u8, 51u8, 231u8, 176u8, 234u8, 186u8,
+ 188u8, 112u8, 15u8, 152u8, 195u8, 232u8, 201u8, 97u8, 208u8,
+ 249u8, 9u8, 163u8, 69u8, 36u8,
+ ],
+ )
+ }
+ #[doc = " Digest of the current block, also part of the block header."]
+ pub fn digest(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_runtime::generic::digest::Digest,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "Digest",
+ vec![],
+ [
+ 83u8, 141u8, 200u8, 132u8, 182u8, 55u8, 197u8, 122u8, 13u8,
+ 159u8, 31u8, 42u8, 60u8, 191u8, 89u8, 221u8, 242u8, 47u8,
+ 199u8, 213u8, 48u8, 216u8, 131u8, 168u8, 245u8, 82u8, 56u8,
+ 190u8, 62u8, 69u8, 96u8, 37u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::frame_system::EventRecord<
+ runtime_types::kitchensink_runtime::RuntimeEvent,
+ ::subxt::utils::H256,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "Events",
+ vec![],
+ [
+ 91u8, 92u8, 49u8, 153u8, 159u8, 210u8, 114u8, 165u8, 211u8,
+ 119u8, 27u8, 182u8, 225u8, 219u8, 252u8, 159u8, 15u8, 63u8,
+ 214u8, 78u8, 107u8, 167u8, 11u8, 221u8, 2u8, 200u8, 151u8,
+ 212u8, 183u8, 184u8, 40u8, 72u8,
+ ],
+ )
+ }
+ #[doc = " The number of events in the `Events` list."]
+ pub fn event_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "EventCount",
+ vec![],
+ [
+ 236u8, 93u8, 90u8, 177u8, 250u8, 211u8, 138u8, 187u8, 26u8,
+ 208u8, 203u8, 113u8, 221u8, 233u8, 227u8, 9u8, 249u8, 25u8,
+ 202u8, 185u8, 161u8, 144u8, 167u8, 104u8, 127u8, 187u8, 38u8,
+ 18u8, 52u8, 61u8, 66u8, 112u8,
+ ],
+ )
+ }
+ #[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 `(T::BlockNumber, 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 ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "EventTopics",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8,
+ 1u8, 129u8, 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8,
+ 139u8, 196u8, 154u8, 111u8, 110u8, 178u8, 24u8, 44u8, 183u8,
+ 176u8, 232u8, 82u8, 223u8, 38u8,
+ ],
+ )
+ }
+ #[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 `(T::BlockNumber, 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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "EventTopics",
+ Vec::new(),
+ [
+ 205u8, 90u8, 142u8, 190u8, 176u8, 37u8, 94u8, 82u8, 98u8,
+ 1u8, 129u8, 63u8, 246u8, 101u8, 130u8, 58u8, 216u8, 16u8,
+ 139u8, 196u8, 154u8, 111u8, 110u8, 178u8, 24u8, 44u8, 183u8,
+ 176u8, 232u8, 82u8, 223u8, 38u8,
+ ],
+ )
+ }
+ #[doc = " Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened."]
+ pub fn last_runtime_upgrade(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_system::LastRuntimeUpgradeInfo,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "LastRuntimeUpgrade",
+ vec![],
+ [
+ 52u8, 37u8, 117u8, 111u8, 57u8, 130u8, 196u8, 14u8, 99u8,
+ 77u8, 91u8, 126u8, 178u8, 249u8, 78u8, 34u8, 9u8, 194u8,
+ 92u8, 105u8, 113u8, 81u8, 185u8, 127u8, 245u8, 184u8, 60u8,
+ 29u8, 234u8, 182u8, 96u8, 196u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "UpgradedToU32RefCount",
+ vec![],
+ [
+ 171u8, 88u8, 244u8, 92u8, 122u8, 67u8, 27u8, 18u8, 59u8,
+ 175u8, 175u8, 178u8, 20u8, 150u8, 213u8, 59u8, 222u8, 141u8,
+ 32u8, 107u8, 3u8, 114u8, 83u8, 250u8, 180u8, 233u8, 152u8,
+ 54u8, 187u8, 99u8, 131u8, 204u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "UpgradedToTripleRefCount",
+ vec![],
+ [
+ 90u8, 33u8, 56u8, 86u8, 90u8, 101u8, 89u8, 133u8, 203u8,
+ 56u8, 201u8, 210u8, 244u8, 232u8, 150u8, 18u8, 51u8, 105u8,
+ 14u8, 230u8, 103u8, 155u8, 246u8, 99u8, 53u8, 207u8, 225u8,
+ 128u8, 186u8, 76u8, 40u8, 185u8,
+ ],
+ )
+ }
+ #[doc = " The execution phase of the block."]
+ pub fn execution_phase(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_system::Phase,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "System",
+ "ExecutionPhase",
+ vec![],
+ [
+ 230u8, 183u8, 221u8, 135u8, 226u8, 223u8, 55u8, 104u8, 138u8,
+ 224u8, 103u8, 156u8, 222u8, 99u8, 203u8, 199u8, 164u8, 168u8,
+ 193u8, 133u8, 201u8, 155u8, 63u8, 95u8, 17u8, 206u8, 165u8,
+ 123u8, 161u8, 33u8, 172u8, 93u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_system::limits::BlockWeights,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "System",
+ "BlockWeights",
+ [
+ 118u8, 253u8, 239u8, 217u8, 145u8, 115u8, 85u8, 86u8, 172u8,
+ 248u8, 139u8, 32u8, 158u8, 126u8, 172u8, 188u8, 197u8, 105u8,
+ 145u8, 235u8, 171u8, 50u8, 31u8, 225u8, 167u8, 187u8, 241u8,
+ 87u8, 6u8, 17u8, 234u8, 185u8,
+ ],
+ )
+ }
+ #[doc = " The maximum length of a block (in bytes)."]
+ pub fn block_length(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_system::limits::BlockLength,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "System",
+ "BlockLength",
+ [
+ 116u8, 184u8, 225u8, 228u8, 207u8, 203u8, 4u8, 220u8, 234u8,
+ 198u8, 150u8, 108u8, 205u8, 87u8, 194u8, 131u8, 229u8, 51u8,
+ 140u8, 4u8, 47u8, 12u8, 200u8, 144u8, 153u8, 62u8, 51u8,
+ 39u8, 138u8, 205u8, 203u8, 236u8,
+ ],
+ )
+ }
+ #[doc = " Maximum number of block number to block hash mappings to keep (oldest pruned first)."]
+ pub fn block_hash_count(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "System",
+ "BlockHashCount",
+ [
+ 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 weight of runtime database operations the runtime can invoke."]
+ pub fn db_weight(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_weights::RuntimeDbWeight,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "System",
+ "DbWeight",
+ [
+ 124u8, 162u8, 190u8, 149u8, 49u8, 177u8, 162u8, 231u8, 62u8,
+ 167u8, 199u8, 181u8, 43u8, 232u8, 185u8, 116u8, 195u8, 51u8,
+ 233u8, 223u8, 20u8, 129u8, 246u8, 13u8, 65u8, 180u8, 64u8,
+ 9u8, 157u8, 59u8, 245u8, 118u8,
+ ],
+ )
+ }
+ #[doc = " Get the chain's current version."]
+ pub fn version(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_version::RuntimeVersion,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "System",
+ "Version",
+ [
+ 93u8, 98u8, 57u8, 243u8, 229u8, 8u8, 234u8, 231u8, 72u8,
+ 230u8, 139u8, 47u8, 63u8, 181u8, 17u8, 2u8, 220u8, 231u8,
+ 104u8, 237u8, 185u8, 143u8, 165u8, 253u8, 188u8, 76u8, 147u8,
+ 12u8, 170u8, 26u8, 74u8, 200u8,
+ ],
+ )
+ }
+ #[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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u16>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 utility {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Batch {
+ pub calls:
+ ::std::vec::Vec,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AsDerivative {
+ pub index: ::core::primitive::u16,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct BatchAll {
+ pub calls:
+ ::std::vec::Vec,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct DispatchAs {
+ pub as_origin:
+ ::std::boxed::Box,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceBatch {
+ pub calls:
+ ::std::vec::Vec,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct WithWeight {
+ pub call:
+ ::std::boxed::Box,
+ pub weight: runtime_types::sp_weights::weight_v2::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 = "# "]
+ #[doc = "- Complexity: O(C) where C is the number of calls to be batched."]
+ #[doc = "# "]
+ #[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: ::std::vec::Vec<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Utility",
+ "batch",
+ Batch { calls },
+ [
+ 62u8, 21u8, 225u8, 63u8, 112u8, 160u8, 217u8, 217u8, 210u8,
+ 224u8, 3u8, 39u8, 34u8, 100u8, 140u8, 66u8, 175u8, 240u8,
+ 123u8, 175u8, 145u8, 155u8, 143u8, 160u8, 74u8, 52u8, 226u8,
+ 159u8, 207u8, 227u8, 135u8, 127u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u16,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Utility",
+ "as_derivative",
+ AsDerivative {
+ index,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 6u8, 108u8, 208u8, 8u8, 24u8, 200u8, 7u8, 167u8, 176u8,
+ 182u8, 82u8, 0u8, 171u8, 106u8, 68u8, 88u8, 176u8, 160u8,
+ 173u8, 144u8, 165u8, 168u8, 48u8, 177u8, 162u8, 5u8, 30u8,
+ 161u8, 25u8, 55u8, 73u8, 204u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- Complexity: O(C) where C is the number of calls to be batched."]
+ #[doc = "# "]
+ pub fn batch_all(
+ &self,
+ calls: ::std::vec::Vec<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Utility",
+ "batch_all",
+ BatchAll { calls },
+ [
+ 37u8, 115u8, 109u8, 58u8, 133u8, 96u8, 91u8, 125u8, 23u8,
+ 183u8, 213u8, 138u8, 3u8, 3u8, 64u8, 26u8, 183u8, 215u8,
+ 232u8, 60u8, 238u8, 65u8, 61u8, 40u8, 18u8, 148u8, 174u8,
+ 31u8, 140u8, 54u8, 65u8, 186u8,
+ ],
+ )
+ }
+ #[doc = "Dispatches a function call with a provided origin."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Root_."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "- Limited storage reads."]
+ #[doc = "- One DB write (event)."]
+ #[doc = "- Weight of derivative `call` execution + T::WeightInfo::dispatch_as()."]
+ #[doc = "# "]
+ pub fn dispatch_as(
+ &self,
+ as_origin: runtime_types::kitchensink_runtime::OriginCaller,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Utility",
+ "dispatch_as",
+ DispatchAs {
+ as_origin: ::std::boxed::Box::new(as_origin),
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 166u8, 100u8, 2u8, 214u8, 121u8, 241u8, 188u8, 76u8, 89u8,
+ 173u8, 122u8, 143u8, 82u8, 213u8, 147u8, 143u8, 191u8, 188u8,
+ 107u8, 50u8, 153u8, 156u8, 176u8, 164u8, 65u8, 72u8, 144u8,
+ 225u8, 53u8, 163u8, 44u8, 27u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- Complexity: O(C) where C is the number of calls to be batched."]
+ #[doc = "# "]
+ pub fn force_batch(
+ &self,
+ calls: ::std::vec::Vec<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Utility",
+ "force_batch",
+ ForceBatch { calls },
+ [
+ 99u8, 7u8, 38u8, 78u8, 208u8, 141u8, 220u8, 119u8, 251u8,
+ 140u8, 53u8, 194u8, 14u8, 247u8, 104u8, 44u8, 12u8, 67u8,
+ 251u8, 122u8, 123u8, 129u8, 254u8, 31u8, 162u8, 225u8, 56u8,
+ 231u8, 249u8, 117u8, 250u8, 116u8,
+ ],
+ )
+ }
+ #[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: runtime_types::kitchensink_runtime::RuntimeCall,
+ weight: runtime_types::sp_weights::weight_v2::Weight,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Utility",
+ "with_weight",
+ WithWeight {
+ call: ::std::boxed::Box::new(call),
+ weight,
+ },
+ [
+ 143u8, 62u8, 94u8, 208u8, 234u8, 148u8, 151u8, 56u8, 81u8,
+ 45u8, 164u8, 244u8, 234u8, 14u8, 216u8, 252u8, 215u8, 66u8,
+ 150u8, 3u8, 198u8, 11u8, 57u8, 178u8, 136u8, 177u8, 21u8,
+ 173u8, 223u8, 66u8, 127u8, 169u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_utility::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::core::primitive::u32,
+ pub error: runtime_types::sp_runtime::DispatchError,
+ }
+ impl ::subxt::events::StaticEvent for BatchInterrupted {
+ const PALLET: &'static str = "Utility";
+ const EVENT: &'static str = "BatchInterrupted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Batch of dispatches completed fully with no error."]
+ pub struct BatchCompleted;
+ impl ::subxt::events::StaticEvent for BatchCompleted {
+ const PALLET: &'static str = "Utility";
+ const EVENT: &'static str = "BatchCompleted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Batch of dispatches completed but has errors."]
+ pub struct BatchCompletedWithErrors;
+ impl ::subxt::events::StaticEvent for BatchCompletedWithErrors {
+ const PALLET: &'static str = "Utility";
+ const EVENT: &'static str = "BatchCompletedWithErrors";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A single item within a Batch of dispatches has completed with no error."]
+ pub struct ItemCompleted;
+ impl ::subxt::events::StaticEvent for ItemCompleted {
+ const PALLET: &'static str = "Utility";
+ const EVENT: &'static str = "ItemCompleted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A single item within a Batch of dispatches has completed with error."]
+ pub struct ItemFailed {
+ pub error: runtime_types::sp_runtime::DispatchError,
+ }
+ impl ::subxt::events::StaticEvent for ItemFailed {
+ const PALLET: &'static str = "Utility";
+ const EVENT: &'static str = "ItemFailed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A call was dispatched."]
+ pub struct DispatchedAs {
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 babe {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ReportEquivocation {
+ pub equivocation_proof: ::std::boxed::Box<
+ runtime_types::sp_consensus_slots::EquivocationProof<
+ runtime_types::sp_runtime::generic::header::Header<
+ ::core::primitive::u32,
+ runtime_types::sp_runtime::traits::BlakeTwo256,
+ >,
+ runtime_types::sp_consensus_babe::app::Public,
+ >,
+ >,
+ pub key_owner_proof: runtime_types::sp_session::MembershipProof,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ReportEquivocationUnsigned {
+ pub equivocation_proof: ::std::boxed::Box<
+ runtime_types::sp_consensus_slots::EquivocationProof<
+ runtime_types::sp_runtime::generic::header::Header<
+ ::core::primitive::u32,
+ runtime_types::sp_runtime::traits::BlakeTwo256,
+ >,
+ runtime_types::sp_consensus_babe::app::Public,
+ >,
+ >,
+ pub key_owner_proof: runtime_types::sp_session::MembershipProof,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct PlanConfigChange {
+ pub config:
+ runtime_types::sp_consensus_babe::digests::NextConfigDescriptor,
+ }
+ 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 : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >,
+ key_owner_proof: runtime_types::sp_session::MembershipProof,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Babe",
+ "report_equivocation",
+ ReportEquivocation {
+ equivocation_proof: ::std::boxed::Box::new(
+ equivocation_proof,
+ ),
+ key_owner_proof,
+ },
+ [
+ 177u8, 237u8, 107u8, 138u8, 237u8, 233u8, 30u8, 195u8, 112u8,
+ 176u8, 185u8, 113u8, 157u8, 221u8, 134u8, 151u8, 62u8, 151u8,
+ 64u8, 164u8, 254u8, 112u8, 2u8, 94u8, 175u8, 79u8, 160u8,
+ 3u8, 72u8, 145u8, 244u8, 137u8,
+ ],
+ )
+ }
+ #[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 : runtime_types :: sp_consensus_slots :: EquivocationProof < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > , runtime_types :: sp_consensus_babe :: app :: Public >,
+ key_owner_proof: runtime_types::sp_session::MembershipProof,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Babe",
+ "report_equivocation_unsigned",
+ ReportEquivocationUnsigned {
+ equivocation_proof: ::std::boxed::Box::new(
+ equivocation_proof,
+ ),
+ key_owner_proof,
+ },
+ [
+ 56u8, 103u8, 238u8, 118u8, 61u8, 192u8, 222u8, 87u8, 254u8,
+ 24u8, 138u8, 219u8, 210u8, 85u8, 201u8, 147u8, 128u8, 49u8,
+ 199u8, 144u8, 46u8, 158u8, 163u8, 31u8, 101u8, 224u8, 72u8,
+ 98u8, 68u8, 120u8, 215u8, 19u8,
+ ],
+ )
+ }
+ #[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 : runtime_types :: sp_consensus_babe :: digests :: NextConfigDescriptor,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Babe",
+ "plan_config_change",
+ PlanConfigChange { config },
+ [
+ 229u8, 157u8, 41u8, 58u8, 56u8, 4u8, 52u8, 107u8, 104u8,
+ 20u8, 42u8, 110u8, 1u8, 17u8, 45u8, 196u8, 30u8, 135u8, 63u8,
+ 46u8, 40u8, 137u8, 209u8, 37u8, 24u8, 108u8, 251u8, 189u8,
+ 77u8, 208u8, 74u8, 32u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Current epoch index."]
+ pub fn epoch_index(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "EpochIndex",
+ vec![],
+ [
+ 51u8, 27u8, 91u8, 156u8, 118u8, 99u8, 46u8, 219u8, 190u8,
+ 147u8, 205u8, 23u8, 106u8, 169u8, 121u8, 218u8, 208u8, 235u8,
+ 135u8, 127u8, 243u8, 41u8, 55u8, 243u8, 235u8, 122u8, 57u8,
+ 86u8, 37u8, 90u8, 208u8, 71u8,
+ ],
+ )
+ }
+ #[doc = " Current epoch authorities."]
+ pub fn authorities(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ (
+ runtime_types::sp_consensus_babe::app::Public,
+ ::core::primitive::u64,
+ ),
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "Authorities",
+ vec![],
+ [
+ 61u8, 8u8, 133u8, 111u8, 169u8, 120u8, 0u8, 213u8, 31u8,
+ 159u8, 204u8, 212u8, 18u8, 205u8, 93u8, 84u8, 140u8, 108u8,
+ 136u8, 209u8, 234u8, 107u8, 145u8, 9u8, 204u8, 224u8, 105u8,
+ 9u8, 238u8, 241u8, 65u8, 30u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_consensus_slots::Slot,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "GenesisSlot",
+ vec![],
+ [
+ 234u8, 127u8, 243u8, 100u8, 124u8, 160u8, 66u8, 248u8, 48u8,
+ 218u8, 61u8, 52u8, 54u8, 142u8, 158u8, 77u8, 32u8, 63u8,
+ 156u8, 39u8, 94u8, 255u8, 192u8, 238u8, 170u8, 118u8, 58u8,
+ 42u8, 199u8, 61u8, 199u8, 77u8,
+ ],
+ )
+ }
+ #[doc = " Current slot number."]
+ pub fn current_slot(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_consensus_slots::Slot,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "CurrentSlot",
+ vec![],
+ [
+ 139u8, 237u8, 185u8, 137u8, 251u8, 179u8, 69u8, 167u8, 133u8,
+ 168u8, 204u8, 64u8, 178u8, 123u8, 92u8, 250u8, 119u8, 190u8,
+ 208u8, 178u8, 208u8, 176u8, 124u8, 187u8, 74u8, 165u8, 33u8,
+ 78u8, 161u8, 206u8, 8u8, 108u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "Randomness",
+ vec![],
+ [
+ 191u8, 197u8, 25u8, 164u8, 104u8, 248u8, 247u8, 193u8, 244u8,
+ 60u8, 181u8, 195u8, 248u8, 90u8, 41u8, 199u8, 82u8, 123u8,
+ 72u8, 126u8, 18u8, 17u8, 128u8, 215u8, 34u8, 251u8, 227u8,
+ 70u8, 166u8, 10u8, 104u8, 140u8,
+ ],
+ )
+ }
+ #[doc = " Pending epoch configuration change that will be applied when the next epoch is enacted."]
+ pub fn pending_epoch_config_change(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_consensus_babe::digests::NextConfigDescriptor,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "PendingEpochConfigChange",
+ vec![],
+ [
+ 4u8, 201u8, 0u8, 204u8, 47u8, 246u8, 4u8, 185u8, 163u8,
+ 242u8, 242u8, 152u8, 29u8, 222u8, 71u8, 127u8, 49u8, 203u8,
+ 206u8, 180u8, 244u8, 50u8, 80u8, 49u8, 199u8, 97u8, 3u8,
+ 170u8, 156u8, 139u8, 106u8, 113u8,
+ ],
+ )
+ }
+ #[doc = " Next epoch randomness."]
+ pub fn next_randomness(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 32usize]>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "NextRandomness",
+ vec![],
+ [
+ 185u8, 98u8, 45u8, 109u8, 253u8, 38u8, 238u8, 221u8, 240u8,
+ 29u8, 38u8, 107u8, 118u8, 117u8, 131u8, 115u8, 21u8, 255u8,
+ 203u8, 81u8, 243u8, 251u8, 91u8, 60u8, 163u8, 202u8, 125u8,
+ 193u8, 173u8, 234u8, 166u8, 92u8,
+ ],
+ )
+ }
+ #[doc = " Next epoch authorities."]
+ pub fn next_authorities(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ (
+ runtime_types::sp_consensus_babe::app::Public,
+ ::core::primitive::u64,
+ ),
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "NextAuthorities",
+ vec![],
+ [
+ 201u8, 193u8, 164u8, 18u8, 155u8, 253u8, 124u8, 163u8, 143u8,
+ 73u8, 212u8, 20u8, 241u8, 108u8, 110u8, 5u8, 171u8, 66u8,
+ 224u8, 208u8, 10u8, 65u8, 148u8, 164u8, 1u8, 12u8, 216u8,
+ 83u8, 20u8, 226u8, 254u8, 183u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "SegmentIndex",
+ vec![],
+ [
+ 128u8, 45u8, 87u8, 58u8, 174u8, 152u8, 241u8, 156u8, 56u8,
+ 192u8, 19u8, 45u8, 75u8, 160u8, 35u8, 253u8, 145u8, 11u8,
+ 178u8, 81u8, 114u8, 117u8, 112u8, 107u8, 163u8, 208u8, 240u8,
+ 151u8, 102u8, 176u8, 246u8, 5u8,
+ ],
+ )
+ }
+ #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."]
+ pub fn under_construction(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ [::core::primitive::u8; 32usize],
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "UnderConstruction",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8,
+ 172u8, 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8,
+ 7u8, 84u8, 220u8, 89u8, 195u8, 177u8, 235u8, 51u8, 98u8,
+ 144u8, 73u8, 238u8, 59u8, 164u8,
+ ],
+ )
+ }
+ #[doc = " TWOX-NOTE: `SegmentIndex` is an increasing integer, so this is okay."]
+ pub fn under_construction_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ [::core::primitive::u8; 32usize],
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "UnderConstruction",
+ Vec::new(),
+ [
+ 180u8, 4u8, 149u8, 245u8, 231u8, 92u8, 99u8, 170u8, 254u8,
+ 172u8, 182u8, 3u8, 152u8, 156u8, 132u8, 196u8, 140u8, 97u8,
+ 7u8, 84u8, 220u8, 89u8, 195u8, 177u8, 235u8, 51u8, 98u8,
+ 144u8, 73u8, 238u8, 59u8, 164u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::core::option::Option<
+ runtime_types::sp_consensus_babe::digests::PreDigest,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "Initialized",
+ vec![],
+ [
+ 142u8, 101u8, 250u8, 113u8, 93u8, 201u8, 157u8, 18u8, 166u8,
+ 153u8, 59u8, 197u8, 107u8, 247u8, 124u8, 110u8, 202u8, 67u8,
+ 62u8, 57u8, 186u8, 134u8, 49u8, 182u8, 149u8, 44u8, 255u8,
+ 85u8, 87u8, 177u8, 149u8, 121u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::core::option::Option<[::core::primitive::u8; 32usize]>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "AuthorVrfRandomness",
+ vec![],
+ [
+ 66u8, 235u8, 74u8, 252u8, 222u8, 135u8, 19u8, 28u8, 74u8,
+ 191u8, 170u8, 197u8, 207u8, 127u8, 77u8, 121u8, 138u8, 138u8,
+ 110u8, 187u8, 34u8, 14u8, 230u8, 43u8, 241u8, 241u8, 63u8,
+ 163u8, 53u8, 179u8, 250u8, 247u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "EpochStart",
+ vec![],
+ [
+ 196u8, 39u8, 241u8, 20u8, 150u8, 180u8, 136u8, 4u8, 195u8,
+ 205u8, 218u8, 10u8, 130u8, 131u8, 168u8, 243u8, 207u8, 249u8,
+ 58u8, 195u8, 177u8, 119u8, 110u8, 243u8, 241u8, 3u8, 245u8,
+ 56u8, 157u8, 5u8, 68u8, 60u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "Lateness",
+ vec![],
+ [
+ 229u8, 230u8, 224u8, 89u8, 49u8, 213u8, 198u8, 236u8, 144u8,
+ 56u8, 193u8, 234u8, 62u8, 242u8, 191u8, 199u8, 105u8, 131u8,
+ 74u8, 63u8, 75u8, 1u8, 210u8, 49u8, 3u8, 128u8, 18u8, 77u8,
+ 219u8, 146u8, 60u8, 88u8,
+ ],
+ )
+ }
+ #[doc = " The configuration for the current epoch. Should never be `None` as it is initialized in"]
+ #[doc = " genesis."]
+ pub fn epoch_config(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_consensus_babe::BabeEpochConfiguration,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "EpochConfig",
+ vec![],
+ [
+ 41u8, 118u8, 141u8, 244u8, 72u8, 17u8, 125u8, 203u8, 43u8,
+ 153u8, 203u8, 119u8, 117u8, 223u8, 123u8, 133u8, 73u8, 235u8,
+ 130u8, 21u8, 160u8, 167u8, 16u8, 173u8, 177u8, 35u8, 117u8,
+ 97u8, 149u8, 49u8, 220u8, 24u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_consensus_babe::BabeEpochConfiguration,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Babe",
+ "NextEpochConfig",
+ vec![],
+ [
+ 111u8, 182u8, 144u8, 180u8, 92u8, 146u8, 102u8, 249u8, 196u8,
+ 229u8, 226u8, 30u8, 25u8, 198u8, 133u8, 9u8, 136u8, 95u8,
+ 11u8, 151u8, 139u8, 156u8, 105u8, 228u8, 181u8, 12u8, 175u8,
+ 148u8, 174u8, 33u8, 233u8, 228u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod timestamp {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Set {
+ #[codec(compact)]
+ pub now: ::core::primitive::u64,
+ }
+ 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 = "`MinimumPeriod`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be `Inherent`."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[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)`."]
+ #[doc = "# "]
+ pub fn set(
+ &self,
+ now: ::core::primitive::u64,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Timestamp",
+ "set",
+ Set { now },
+ [
+ 6u8, 97u8, 172u8, 236u8, 118u8, 238u8, 228u8, 114u8, 15u8,
+ 115u8, 102u8, 85u8, 66u8, 151u8, 16u8, 33u8, 187u8, 17u8,
+ 166u8, 88u8, 127u8, 214u8, 182u8, 51u8, 168u8, 88u8, 43u8,
+ 101u8, 185u8, 8u8, 1u8, 28u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Current time for the current block."]
+ pub fn now(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Timestamp",
+ "Now",
+ vec![],
+ [
+ 148u8, 53u8, 50u8, 54u8, 13u8, 161u8, 57u8, 150u8, 16u8,
+ 83u8, 144u8, 221u8, 59u8, 75u8, 158u8, 130u8, 39u8, 123u8,
+ 106u8, 134u8, 202u8, 185u8, 83u8, 85u8, 60u8, 41u8, 120u8,
+ 96u8, 210u8, 34u8, 2u8, 250u8,
+ ],
+ )
+ }
+ #[doc = " Did the timestamp get updated in this block?"]
+ pub fn did_update(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Timestamp",
+ "DidUpdate",
+ vec![],
+ [
+ 70u8, 13u8, 92u8, 186u8, 80u8, 151u8, 167u8, 90u8, 158u8,
+ 232u8, 175u8, 13u8, 103u8, 135u8, 2u8, 78u8, 16u8, 6u8, 39u8,
+ 158u8, 167u8, 85u8, 27u8, 47u8, 122u8, 73u8, 127u8, 26u8,
+ 35u8, 168u8, 72u8, 204u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " The minimum period between blocks. Beware that this is different to the *expected*"]
+ #[doc = " period that the block production apparatus provides. Your chosen consensus system will"]
+ #[doc = " generally work with this to determine a sensible block time. e.g. For Aura, it will be"]
+ #[doc = " double this period on default settings."]
+ pub fn minimum_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 authorship {
+ use super::root_mod;
+ use super::runtime_types;
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Author of current block."]
+ pub fn author(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Authorship",
+ "Author",
+ vec![],
+ [
+ 149u8, 42u8, 33u8, 147u8, 190u8, 207u8, 174u8, 227u8, 190u8,
+ 110u8, 25u8, 131u8, 5u8, 167u8, 237u8, 188u8, 188u8, 33u8,
+ 177u8, 126u8, 181u8, 49u8, 126u8, 118u8, 46u8, 128u8, 154u8,
+ 95u8, 15u8, 91u8, 103u8, 113u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod indices {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Claim {
+ pub index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Transfer {
+ pub new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Free {
+ pub index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceTransfer {
+ pub new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub index: ::core::primitive::u32,
+ pub freeze: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Freeze {
+ pub index: ::core::primitive::u32,
+ }
+ 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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- One storage mutation (codec `O(1)`)."]
+ #[doc = "- One reserve operation."]
+ #[doc = "- One event."]
+ #[doc = "-------------------"]
+ #[doc = "- DB Weight: 1 Read/Write (Accounts)"]
+ #[doc = "# "]
+ pub fn claim(
+ &self,
+ index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Indices",
+ "claim",
+ Claim { index },
+ [
+ 5u8, 24u8, 11u8, 173u8, 226u8, 170u8, 0u8, 30u8, 193u8,
+ 102u8, 214u8, 59u8, 252u8, 32u8, 221u8, 88u8, 196u8, 189u8,
+ 244u8, 18u8, 233u8, 37u8, 228u8, 248u8, 76u8, 175u8, 212u8,
+ 233u8, 238u8, 203u8, 162u8, 68u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- One storage mutation (codec `O(1)`)."]
+ #[doc = "- One transfer operation."]
+ #[doc = "- One event."]
+ #[doc = "-------------------"]
+ #[doc = "- DB Weight:"]
+ #[doc = " - Reads: Indices Accounts, System Account (recipient)"]
+ #[doc = " - Writes: Indices Accounts, System Account (recipient)"]
+ #[doc = "# "]
+ pub fn transfer(
+ &self,
+ new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Indices",
+ "transfer",
+ Transfer { new, index },
+ [
+ 1u8, 83u8, 197u8, 184u8, 8u8, 96u8, 48u8, 146u8, 116u8, 76u8,
+ 229u8, 115u8, 226u8, 215u8, 41u8, 154u8, 27u8, 34u8, 205u8,
+ 188u8, 10u8, 169u8, 203u8, 39u8, 2u8, 236u8, 181u8, 162u8,
+ 115u8, 254u8, 42u8, 28u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- One storage mutation (codec `O(1)`)."]
+ #[doc = "- One reserve operation."]
+ #[doc = "- One event."]
+ #[doc = "-------------------"]
+ #[doc = "- DB Weight: 1 Read/Write (Accounts)"]
+ #[doc = "# "]
+ pub fn free(
+ &self,
+ index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Indices",
+ "free",
+ Free { index },
+ [
+ 133u8, 202u8, 225u8, 127u8, 69u8, 145u8, 43u8, 13u8, 160u8,
+ 248u8, 215u8, 243u8, 232u8, 166u8, 74u8, 203u8, 235u8, 138u8,
+ 255u8, 27u8, 163u8, 71u8, 254u8, 217u8, 6u8, 208u8, 202u8,
+ 204u8, 238u8, 70u8, 126u8, 252u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- One storage mutation (codec `O(1)`)."]
+ #[doc = "- Up to one reserve operation."]
+ #[doc = "- One event."]
+ #[doc = "-------------------"]
+ #[doc = "- DB Weight:"]
+ #[doc = " - Reads: Indices Accounts, System Account (original owner)"]
+ #[doc = " - Writes: Indices Accounts, System Account (original owner)"]
+ #[doc = "# "]
+ pub fn force_transfer(
+ &self,
+ new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ index: ::core::primitive::u32,
+ freeze: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Indices",
+ "force_transfer",
+ ForceTransfer { new, index, freeze },
+ [
+ 126u8, 8u8, 145u8, 175u8, 177u8, 153u8, 131u8, 123u8, 184u8,
+ 53u8, 72u8, 207u8, 21u8, 140u8, 87u8, 181u8, 172u8, 64u8,
+ 37u8, 165u8, 121u8, 111u8, 173u8, 224u8, 181u8, 79u8, 76u8,
+ 134u8, 93u8, 169u8, 65u8, 131u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- One storage mutation (codec `O(1)`)."]
+ #[doc = "- Up to one slash operation."]
+ #[doc = "- One event."]
+ #[doc = "-------------------"]
+ #[doc = "- DB Weight: 1 Read/Write (Accounts)"]
+ #[doc = "# "]
+ pub fn freeze(
+ &self,
+ index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Indices",
+ "freeze",
+ Freeze { index },
+ [
+ 121u8, 45u8, 118u8, 2u8, 72u8, 48u8, 38u8, 7u8, 234u8, 204u8,
+ 68u8, 20u8, 76u8, 251u8, 205u8, 246u8, 149u8, 31u8, 168u8,
+ 186u8, 208u8, 90u8, 40u8, 47u8, 100u8, 228u8, 188u8, 33u8,
+ 79u8, 220u8, 105u8, 209u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_indices::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A account index was assigned."]
+ pub struct IndexAssigned {
+ pub who: ::subxt::utils::AccountId32,
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for IndexAssigned {
+ const PALLET: &'static str = "Indices";
+ const EVENT: &'static str = "IndexAssigned";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A account index has been freed up (unassigned)."]
+ pub struct IndexFreed {
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for IndexFreed {
+ const PALLET: &'static str = "Indices";
+ const EVENT: &'static str = "IndexFreed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A account index has been frozen to its current account ID."]
+ pub struct IndexFrozen {
+ pub index: ::core::primitive::u32,
+ pub who: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for IndexFrozen {
+ const PALLET: &'static str = "Indices";
+ const EVENT: &'static str = "IndexFrozen";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The lookup from index to account."]
+ pub fn accounts(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ ::core::primitive::bool,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Indices",
+ "Accounts",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8,
+ 27u8, 38u8, 9u8, 202u8, 209u8, 111u8, 209u8, 144u8, 13u8,
+ 211u8, 114u8, 239u8, 127u8, 75u8, 166u8, 234u8, 222u8, 225u8,
+ 35u8, 160u8, 163u8, 112u8, 242u8,
+ ],
+ )
+ }
+ #[doc = " The lookup from index to account."]
+ pub fn accounts_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ ::core::primitive::bool,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Indices",
+ "Accounts",
+ Vec::new(),
+ [
+ 211u8, 169u8, 54u8, 254u8, 88u8, 57u8, 22u8, 223u8, 108u8,
+ 27u8, 38u8, 9u8, 202u8, 209u8, 111u8, 209u8, 144u8, 13u8,
+ 211u8, 114u8, 239u8, 127u8, 75u8, 166u8, 234u8, 222u8, 225u8,
+ 35u8, 160u8, 163u8, 112u8, 242u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 balances {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Transfer {
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetBalance {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub new_free: ::core::primitive::u128,
+ #[codec(compact)]
+ pub new_reserved: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceTransfer {
+ pub source: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct TransferKeepAlive {
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct TransferAll {
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub keep_alive: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceUnreserve {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub amount: ::core::primitive::u128,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Transfer some liquid free balance to another account."]
+ #[doc = ""]
+ #[doc = "`transfer` 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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Dependent on arguments but not critical, given proper implementations for input config"]
+ #[doc = " types. See related functions below."]
+ #[doc = "- It contains a limited number of reads and writes internally and no complex"]
+ #[doc = " computation."]
+ #[doc = ""]
+ #[doc = "Related functions:"]
+ #[doc = ""]
+ #[doc = " - `ensure_can_withdraw` is always called internally but has a bounded complexity."]
+ #[doc = " - Transferring balances to accounts that did not exist before will cause"]
+ #[doc = " `T::OnNewAccount::on_new_account` to be called."]
+ #[doc = " - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`."]
+ #[doc = " - `transfer_keep_alive` works the same way as `transfer`, but has an additional check"]
+ #[doc = " that the transfer will not kill the origin account."]
+ #[doc = "---------------------------------"]
+ #[doc = "- Origin account is already in memory, so no DB operations for them."]
+ #[doc = "# "]
+ pub fn transfer(
+ &self,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Balances",
+ "transfer",
+ Transfer { dest, value },
+ [
+ 255u8, 181u8, 144u8, 248u8, 64u8, 167u8, 5u8, 134u8, 208u8,
+ 20u8, 223u8, 103u8, 235u8, 35u8, 66u8, 184u8, 27u8, 94u8,
+ 176u8, 60u8, 233u8, 236u8, 145u8, 218u8, 44u8, 138u8, 240u8,
+ 224u8, 16u8, 193u8, 220u8, 95u8,
+ ],
+ )
+ }
+ #[doc = "Set the balances of a given account."]
+ #[doc = ""]
+ #[doc = "This will alter `FreeBalance` and `ReservedBalance` in storage. it will"]
+ #[doc = "also alter the total issuance of the system (`TotalIssuance`) appropriately."]
+ #[doc = "If the new free or reserved balance is below the existential deposit,"]
+ #[doc = "it will reset the account nonce (`frame_system::AccountNonce`)."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call is `root`."]
+ pub fn set_balance(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ new_free: ::core::primitive::u128,
+ new_reserved: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Balances",
+ "set_balance",
+ SetBalance {
+ who,
+ new_free,
+ new_reserved,
+ },
+ [
+ 174u8, 34u8, 80u8, 252u8, 193u8, 51u8, 228u8, 236u8, 234u8,
+ 16u8, 173u8, 214u8, 122u8, 21u8, 254u8, 7u8, 49u8, 176u8,
+ 18u8, 128u8, 122u8, 68u8, 72u8, 181u8, 119u8, 90u8, 167u8,
+ 46u8, 203u8, 220u8, 109u8, 110u8,
+ ],
+ )
+ }
+ #[doc = "Exactly as `transfer`, except the origin must be root and the source account may be"]
+ #[doc = "specified."]
+ #[doc = "# "]
+ #[doc = "- Same as transfer, but additional read and write because the source account is not"]
+ #[doc = " assumed to be in the overlay."]
+ #[doc = "# "]
+ pub fn force_transfer(
+ &self,
+ source: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Balances",
+ "force_transfer",
+ ForceTransfer {
+ source,
+ dest,
+ value,
+ },
+ [
+ 56u8, 80u8, 186u8, 45u8, 134u8, 147u8, 200u8, 19u8, 53u8,
+ 221u8, 213u8, 32u8, 13u8, 51u8, 130u8, 42u8, 244u8, 85u8,
+ 50u8, 246u8, 189u8, 51u8, 93u8, 1u8, 108u8, 142u8, 112u8,
+ 245u8, 104u8, 255u8, 15u8, 62u8,
+ ],
+ )
+ }
+ #[doc = "Same as the [`transfer`] call, but with a check that the transfer will not kill the"]
+ #[doc = "origin account."]
+ #[doc = ""]
+ #[doc = "99% of the time you want [`transfer`] instead."]
+ #[doc = ""]
+ #[doc = "[`transfer`]: struct.Pallet.html#method.transfer"]
+ pub fn transfer_keep_alive(
+ &self,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Balances",
+ "transfer_keep_alive",
+ TransferKeepAlive { dest, value },
+ [
+ 202u8, 239u8, 204u8, 0u8, 52u8, 57u8, 158u8, 8u8, 252u8,
+ 178u8, 91u8, 197u8, 238u8, 186u8, 205u8, 56u8, 217u8, 250u8,
+ 21u8, 44u8, 239u8, 66u8, 79u8, 99u8, 25u8, 106u8, 70u8,
+ 226u8, 50u8, 255u8, 176u8, 71u8,
+ ],
+ )
+ }
+ #[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). # "]
+ #[doc = "- O(1). Just like transfer, but reading the user's transferable balance first."]
+ #[doc = " #"]
+ pub fn transfer_all(
+ &self,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ keep_alive: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Balances",
+ "transfer_all",
+ TransferAll { dest, keep_alive },
+ [
+ 118u8, 215u8, 198u8, 243u8, 4u8, 173u8, 108u8, 224u8, 113u8,
+ 203u8, 149u8, 23u8, 130u8, 176u8, 53u8, 205u8, 112u8, 147u8,
+ 88u8, 167u8, 197u8, 32u8, 104u8, 117u8, 201u8, 168u8, 144u8,
+ 230u8, 120u8, 29u8, 122u8, 159u8,
+ ],
+ )
+ }
+ #[doc = "Unreserve some balance from a user by force."]
+ #[doc = ""]
+ #[doc = "Can only be called by ROOT."]
+ pub fn force_unreserve(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ amount: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Balances",
+ "force_unreserve",
+ ForceUnreserve { who, amount },
+ [
+ 39u8, 229u8, 111u8, 44u8, 147u8, 80u8, 7u8, 26u8, 185u8,
+ 121u8, 149u8, 25u8, 151u8, 37u8, 124u8, 46u8, 108u8, 136u8,
+ 167u8, 145u8, 103u8, 65u8, 33u8, 168u8, 36u8, 214u8, 126u8,
+ 237u8, 180u8, 61u8, 108u8, 110u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_balances::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account was created with some free balance."]
+ pub struct Endowed {
+ pub account: ::subxt::utils::AccountId32,
+ pub free_balance: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Endowed {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Endowed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account was removed whose balance was non-zero but below ExistentialDeposit,"]
+ #[doc = "resulting in an outright loss."]
+ pub struct DustLost {
+ pub account: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for DustLost {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "DustLost";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Transfer succeeded."]
+ pub struct Transfer {
+ pub from: ::subxt::utils::AccountId32,
+ pub to: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Transfer {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Transfer";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A balance was set by root."]
+ pub struct BalanceSet {
+ pub who: ::subxt::utils::AccountId32,
+ pub free: ::core::primitive::u128,
+ pub reserved: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for BalanceSet {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "BalanceSet";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some balance was reserved (moved from free to reserved)."]
+ pub struct Reserved {
+ pub who: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Reserved {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Reserved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some balance was unreserved (moved from reserved to free)."]
+ pub struct Unreserved {
+ pub who: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Unreserved {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Unreserved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub to: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ pub destination_status:
+ runtime_types::frame_support::traits::tokens::misc::BalanceStatus,
+ }
+ impl ::subxt::events::StaticEvent for ReserveRepatriated {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "ReserveRepatriated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some amount was deposited (e.g. for transaction fees)."]
+ pub struct Deposit {
+ pub who: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Deposit {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Deposit";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some amount was withdrawn from the account (e.g. for transaction fees)."]
+ pub struct Withdraw {
+ pub who: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Withdraw {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Withdraw";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some amount was removed from the account (e.g. for misbehavior)."]
+ pub struct Slashed {
+ pub who: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Slashed {
+ const PALLET: &'static str = "Balances";
+ const EVENT: &'static str = "Slashed";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The total units issued in the system."]
+ pub fn total_issuance(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "TotalIssuance",
+ vec![],
+ [
+ 1u8, 206u8, 252u8, 237u8, 6u8, 30u8, 20u8, 232u8, 164u8,
+ 115u8, 51u8, 156u8, 156u8, 206u8, 241u8, 187u8, 44u8, 84u8,
+ 25u8, 164u8, 235u8, 20u8, 86u8, 242u8, 124u8, 23u8, 28u8,
+ 140u8, 26u8, 73u8, 231u8, 51u8,
+ ],
+ )
+ }
+ #[doc = " The total units of outstanding deactivated balance in the system."]
+ pub fn inactive_issuance(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "InactiveIssuance",
+ vec![],
+ [
+ 74u8, 203u8, 111u8, 142u8, 225u8, 104u8, 173u8, 51u8, 226u8,
+ 12u8, 85u8, 135u8, 41u8, 206u8, 177u8, 238u8, 94u8, 246u8,
+ 184u8, 250u8, 140u8, 213u8, 91u8, 118u8, 163u8, 111u8, 211u8,
+ 46u8, 204u8, 160u8, 154u8, 21u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_balances::AccountData<
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "Account",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8,
+ 80u8, 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8,
+ 141u8, 240u8, 172u8, 217u8, 215u8, 109u8, 87u8, 135u8, 248u8,
+ 57u8, 98u8, 185u8, 22u8, 4u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_balances::AccountData<
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "Account",
+ Vec::new(),
+ [
+ 246u8, 154u8, 253u8, 71u8, 192u8, 192u8, 192u8, 236u8, 128u8,
+ 80u8, 40u8, 252u8, 201u8, 43u8, 3u8, 131u8, 19u8, 49u8,
+ 141u8, 240u8, 172u8, 217u8, 215u8, 109u8, 87u8, 135u8, 248u8,
+ 57u8, 98u8, 185u8, 22u8, 4u8,
+ ],
+ )
+ }
+ #[doc = " Any liquidity locks on some account balances."]
+ #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."]
+ pub fn locks(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ runtime_types::pallet_balances::BalanceLock<
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "Locks",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8,
+ 134u8, 195u8, 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8,
+ 4u8, 122u8, 90u8, 212u8, 136u8, 14u8, 127u8, 232u8, 8u8,
+ 192u8, 40u8, 233u8, 18u8, 250u8,
+ ],
+ )
+ }
+ #[doc = " Any liquidity locks on some account balances."]
+ #[doc = " NOTE: Should only be accessed when setting, changing and freeing a lock."]
+ pub fn locks_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ runtime_types::pallet_balances::BalanceLock<
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "Locks",
+ Vec::new(),
+ [
+ 216u8, 253u8, 87u8, 73u8, 24u8, 218u8, 35u8, 0u8, 244u8,
+ 134u8, 195u8, 58u8, 255u8, 64u8, 153u8, 212u8, 210u8, 232u8,
+ 4u8, 122u8, 90u8, 212u8, 136u8, 14u8, 127u8, 232u8, 8u8,
+ 192u8, 40u8, 233u8, 18u8, 250u8,
+ ],
+ )
+ }
+ #[doc = " Named reserves on some account balances."]
+ pub fn reserves(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_balances::ReserveData<
+ [::core::primitive::u8; 8usize],
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "Reserves",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8,
+ 250u8, 128u8, 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8,
+ 16u8, 147u8, 74u8, 55u8, 183u8, 94u8, 160u8, 177u8, 26u8,
+ 187u8, 71u8, 197u8, 187u8, 163u8,
+ ],
+ )
+ }
+ #[doc = " Named reserves on some account balances."]
+ pub fn reserves_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_balances::ReserveData<
+ [::core::primitive::u8; 8usize],
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Balances",
+ "Reserves",
+ Vec::new(),
+ [
+ 17u8, 32u8, 191u8, 46u8, 76u8, 220u8, 101u8, 100u8, 42u8,
+ 250u8, 128u8, 167u8, 117u8, 44u8, 85u8, 96u8, 105u8, 216u8,
+ 16u8, 147u8, 74u8, 55u8, 183u8, 94u8, 160u8, 177u8, 26u8,
+ 187u8, 71u8, 197u8, 187u8, 163u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " The minimum amount required to keep an account open."]
+ pub fn existential_deposit(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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."]
+ pub fn max_locks(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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."]
+ pub fn max_reserves(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod transaction_payment {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_transaction_payment::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub actual_fee: ::core::primitive::u128,
+ pub tip: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for TransactionFeePaid {
+ const PALLET: &'static str = "TransactionPayment";
+ const EVENT: &'static str = "TransactionFeePaid";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ pub fn next_fee_multiplier(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::fixed_point::FixedU128,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TransactionPayment",
+ "NextFeeMultiplier",
+ vec![],
+ [
+ 210u8, 0u8, 206u8, 165u8, 183u8, 10u8, 206u8, 52u8, 14u8,
+ 90u8, 218u8, 197u8, 189u8, 125u8, 113u8, 216u8, 52u8, 161u8,
+ 45u8, 24u8, 245u8, 237u8, 121u8, 41u8, 106u8, 29u8, 45u8,
+ 129u8, 250u8, 203u8, 206u8, 180u8,
+ ],
+ )
+ }
+ pub fn storage_version(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_transaction_payment::Releases,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TransactionPayment",
+ "StorageVersion",
+ vec![],
+ [
+ 219u8, 243u8, 82u8, 176u8, 65u8, 5u8, 132u8, 114u8, 8u8,
+ 82u8, 176u8, 200u8, 97u8, 150u8, 177u8, 164u8, 166u8, 11u8,
+ 34u8, 12u8, 12u8, 198u8, 58u8, 191u8, 186u8, 221u8, 221u8,
+ 119u8, 181u8, 253u8, 154u8, 228u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " A fee mulitplier for `Operational` extrinsics to compute \"virtual tip\" to boost their"]
+ #[doc = " `priority`"]
+ #[doc = ""]
+ #[doc = " This value is multipled 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u8>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 asset_tx_payment {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_asset_tx_payment::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,"]
+ #[doc = "has been paid by `who` in an asset `asset_id`."]
+ pub struct AssetTxFeePaid {
+ pub who: ::subxt::utils::AccountId32,
+ pub actual_fee: ::core::primitive::u128,
+ pub tip: ::core::primitive::u128,
+ pub asset_id: ::core::option::Option<::core::primitive::u32>,
+ }
+ impl ::subxt::events::StaticEvent for AssetTxFeePaid {
+ const PALLET: &'static str = "AssetTxPayment";
+ const EVENT: &'static str = "AssetTxFeePaid";
+ }
+ }
+ }
+ pub mod election_provider_multi_phase {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetMinimumUntrustedScore {
+ pub maybe_next_score: ::core::option::Option<
+ runtime_types::sp_npos_elections::ElectionScore,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetEmergencyElectionResult {
+ pub supports: ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ runtime_types::sp_npos_elections::Support<
+ ::subxt::utils::AccountId32,
+ >,
+ )>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Submit {
+ pub raw_solution: ::std::boxed::Box<
+ runtime_types::pallet_election_provider_multi_phase::RawSolution<
+ runtime_types::kitchensink_runtime::NposSolution16,
+ >,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct GovernanceFallback {
+ pub maybe_max_voters: ::core::option::Option<::core::primitive::u32>,
+ pub maybe_max_targets: ::core::option::Option<::core::primitive::u32>,
+ }
+ 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 : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >,
+ witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "ElectionProviderMultiPhase",
+ "submit_unsigned",
+ SubmitUnsigned {
+ raw_solution: ::std::boxed::Box::new(raw_solution),
+ witness,
+ },
+ [
+ 100u8, 240u8, 31u8, 34u8, 93u8, 98u8, 93u8, 57u8, 41u8,
+ 197u8, 97u8, 58u8, 242u8, 10u8, 69u8, 250u8, 185u8, 169u8,
+ 21u8, 8u8, 202u8, 61u8, 36u8, 25u8, 4u8, 148u8, 82u8, 56u8,
+ 242u8, 18u8, 27u8, 219u8,
+ ],
+ )
+ }
+ #[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: ::core::option::Option<
+ runtime_types::sp_npos_elections::ElectionScore,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "ElectionProviderMultiPhase",
+ "set_minimum_untrusted_score",
+ SetMinimumUntrustedScore { maybe_next_score },
+ [
+ 63u8, 101u8, 105u8, 146u8, 133u8, 162u8, 149u8, 112u8, 150u8,
+ 219u8, 183u8, 213u8, 234u8, 211u8, 144u8, 74u8, 106u8, 15u8,
+ 62u8, 196u8, 247u8, 49u8, 20u8, 48u8, 3u8, 105u8, 85u8, 46u8,
+ 76u8, 4u8, 67u8, 81u8,
+ ],
+ )
+ }
+ #[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: ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ runtime_types::sp_npos_elections::Support<
+ ::subxt::utils::AccountId32,
+ >,
+ )>,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "ElectionProviderMultiPhase",
+ "set_emergency_election_result",
+ SetEmergencyElectionResult { supports },
+ [
+ 115u8, 255u8, 205u8, 58u8, 153u8, 1u8, 246u8, 8u8, 225u8,
+ 36u8, 66u8, 144u8, 250u8, 145u8, 70u8, 76u8, 54u8, 63u8,
+ 251u8, 51u8, 214u8, 204u8, 55u8, 112u8, 46u8, 228u8, 255u8,
+ 250u8, 151u8, 5u8, 44u8, 133u8,
+ ],
+ )
+ }
+ #[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 : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: kitchensink_runtime :: NposSolution16 >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "ElectionProviderMultiPhase",
+ "submit",
+ Submit {
+ raw_solution: ::std::boxed::Box::new(raw_solution),
+ },
+ [
+ 220u8, 167u8, 40u8, 47u8, 253u8, 244u8, 72u8, 124u8, 30u8,
+ 123u8, 127u8, 227u8, 2u8, 66u8, 119u8, 64u8, 211u8, 200u8,
+ 210u8, 98u8, 248u8, 132u8, 68u8, 25u8, 34u8, 182u8, 230u8,
+ 225u8, 241u8, 58u8, 193u8, 134u8,
+ ],
+ )
+ }
+ #[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: ::core::option::Option<::core::primitive::u32>,
+ maybe_max_targets: ::core::option::Option<::core::primitive::u32>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "ElectionProviderMultiPhase",
+ "governance_fallback",
+ GovernanceFallback {
+ maybe_max_voters,
+ maybe_max_targets,
+ },
+ [
+ 206u8, 247u8, 76u8, 85u8, 7u8, 24u8, 231u8, 226u8, 192u8,
+ 143u8, 43u8, 67u8, 91u8, 202u8, 88u8, 176u8, 130u8, 1u8,
+ 83u8, 229u8, 227u8, 200u8, 179u8, 4u8, 113u8, 60u8, 99u8,
+ 190u8, 53u8, 226u8, 142u8, 182u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event =
+ runtime_types::pallet_election_provider_multi_phase::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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 submited 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:
+ runtime_types::pallet_election_provider_multi_phase::ElectionCompute,
+ pub origin: ::core::option::Option<::subxt::utils::AccountId32>,
+ pub prev_ejected: ::core::primitive::bool,
+ }
+ impl ::subxt::events::StaticEvent for SolutionStored {
+ const PALLET: &'static str = "ElectionProviderMultiPhase";
+ const EVENT: &'static str = "SolutionStored";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The election has been finalized, with the given computation and score."]
+ pub struct ElectionFinalized {
+ pub compute:
+ runtime_types::pallet_election_provider_multi_phase::ElectionCompute,
+ pub score: runtime_types::sp_npos_elections::ElectionScore,
+ }
+ impl ::subxt::events::StaticEvent for ElectionFinalized {
+ const PALLET: &'static str = "ElectionProviderMultiPhase";
+ const EVENT: &'static str = "ElectionFinalized";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An election failed."]
+ #[doc = ""]
+ #[doc = "Not much can be said about which computes failed in the process."]
+ pub struct ElectionFailed;
+ impl ::subxt::events::StaticEvent for ElectionFailed {
+ const PALLET: &'static str = "ElectionProviderMultiPhase";
+ const EVENT: &'static str = "ElectionFailed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has been rewarded for their signed submission being finalized."]
+ pub struct Rewarded {
+ pub account: ::subxt::utils::AccountId32,
+ pub value: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Rewarded {
+ const PALLET: &'static str = "ElectionProviderMultiPhase";
+ const EVENT: &'static str = "Rewarded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has been slashed for submitting an invalid signed submission."]
+ pub struct Slashed {
+ pub account: ::subxt::utils::AccountId32,
+ pub value: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Slashed {
+ const PALLET: &'static str = "ElectionProviderMultiPhase";
+ const EVENT: &'static str = "Slashed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "There was a phase transition in a given round."]
+ pub struct PhaseTransitioned {
+ pub from: runtime_types::pallet_election_provider_multi_phase::Phase<
+ ::core::primitive::u32,
+ >,
+ pub to: runtime_types::pallet_election_provider_multi_phase::Phase<
+ ::core::primitive::u32,
+ >,
+ pub round: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for PhaseTransitioned {
+ const PALLET: &'static str = "ElectionProviderMultiPhase";
+ const EVENT: &'static str = "PhaseTransitioned";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ 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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "Round",
+ vec![],
+ [
+ 16u8, 49u8, 176u8, 52u8, 202u8, 111u8, 120u8, 8u8, 217u8,
+ 96u8, 35u8, 14u8, 233u8, 130u8, 47u8, 98u8, 34u8, 44u8,
+ 166u8, 188u8, 199u8, 210u8, 21u8, 19u8, 70u8, 96u8, 139u8,
+ 8u8, 53u8, 82u8, 165u8, 239u8,
+ ],
+ )
+ }
+ #[doc = " Current phase."]
+ pub fn current_phase(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_election_provider_multi_phase::Phase<
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "CurrentPhase",
+ vec![],
+ [
+ 236u8, 101u8, 8u8, 52u8, 68u8, 240u8, 74u8, 159u8, 181u8,
+ 53u8, 153u8, 101u8, 228u8, 81u8, 96u8, 161u8, 34u8, 67u8,
+ 35u8, 28u8, 121u8, 44u8, 229u8, 45u8, 196u8, 87u8, 73u8,
+ 125u8, 216u8, 245u8, 255u8, 15u8,
+ ],
+ )
+ }
+ #[doc = " Current best solution, signed or unsigned, queued to be returned upon `elect`."] pub fn queued_solution (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: ReadySolution > , :: subxt :: storage :: address :: Yes , () , () >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "QueuedSolution",
+ vec![],
+ [
+ 11u8, 152u8, 13u8, 167u8, 204u8, 209u8, 171u8, 249u8, 59u8,
+ 250u8, 58u8, 152u8, 164u8, 121u8, 146u8, 112u8, 241u8, 16u8,
+ 159u8, 251u8, 209u8, 251u8, 114u8, 29u8, 188u8, 30u8, 84u8,
+ 71u8, 136u8, 173u8, 145u8, 236u8,
+ ],
+ )
+ }
+ #[doc = " Snapshot data of the round."]
+ #[doc = ""]
+ #[doc = " This is created at the beginning of the signed phase and cleared upon calling `elect`."] pub fn snapshot (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: RoundSnapshot > , :: subxt :: storage :: address :: Yes , () , () >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "Snapshot",
+ vec![],
+ [
+ 239u8, 56u8, 191u8, 77u8, 150u8, 224u8, 248u8, 88u8, 132u8,
+ 224u8, 164u8, 83u8, 253u8, 36u8, 46u8, 156u8, 72u8, 152u8,
+ 36u8, 206u8, 72u8, 27u8, 226u8, 87u8, 146u8, 220u8, 93u8,
+ 178u8, 26u8, 115u8, 232u8, 71u8,
+ ],
+ )
+ }
+ #[doc = " Desired number of targets to elect for this round."]
+ #[doc = ""]
+ #[doc = " Only exists when [`Snapshot`] is present."]
+ pub fn desired_targets(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "DesiredTargets",
+ vec![],
+ [
+ 16u8, 247u8, 4u8, 181u8, 93u8, 79u8, 12u8, 212u8, 146u8,
+ 167u8, 80u8, 58u8, 118u8, 52u8, 68u8, 87u8, 90u8, 140u8,
+ 31u8, 210u8, 2u8, 116u8, 220u8, 231u8, 115u8, 112u8, 118u8,
+ 118u8, 68u8, 34u8, 151u8, 165u8,
+ ],
+ )
+ }
+ #[doc = " The metadata of the [`RoundSnapshot`]"]
+ #[doc = ""]
+ #[doc = " Only exists when [`Snapshot`] is present."] pub fn snapshot_metadata (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize > , :: subxt :: storage :: address :: Yes , () , () >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "SnapshotMetadata",
+ vec![],
+ [
+ 135u8, 122u8, 60u8, 75u8, 194u8, 240u8, 187u8, 96u8, 240u8,
+ 203u8, 192u8, 22u8, 117u8, 148u8, 118u8, 24u8, 240u8, 213u8,
+ 94u8, 22u8, 194u8, 47u8, 181u8, 245u8, 77u8, 149u8, 11u8,
+ 251u8, 117u8, 220u8, 205u8, 78u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedSubmissionNextIndex",
+ vec![],
+ [
+ 242u8, 11u8, 157u8, 105u8, 96u8, 7u8, 31u8, 20u8, 51u8,
+ 141u8, 182u8, 180u8, 13u8, 172u8, 155u8, 59u8, 42u8, 238u8,
+ 115u8, 8u8, 6u8, 137u8, 45u8, 2u8, 123u8, 187u8, 53u8, 215u8,
+ 19u8, 129u8, 54u8, 22u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<(
+ runtime_types::sp_npos_elections::ElectionScore,
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedSubmissionIndices",
+ vec![],
+ [
+ 228u8, 166u8, 94u8, 248u8, 71u8, 26u8, 125u8, 81u8, 32u8,
+ 22u8, 46u8, 185u8, 209u8, 123u8, 46u8, 17u8, 152u8, 149u8,
+ 222u8, 125u8, 112u8, 230u8, 29u8, 177u8, 162u8, 214u8, 66u8,
+ 38u8, 170u8, 121u8, 129u8, 100u8,
+ ],
+ )
+ }
+ #[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 :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kitchensink_runtime :: NposSolution16 > > , :: subxt :: storage :: address :: Yes , () , :: subxt :: storage :: address :: Yes >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedSubmissionsMap",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8,
+ 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8,
+ 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8,
+ 132u8, 118u8, 53u8, 2u8, 135u8,
+ ],
+ )
+ }
+ #[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_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: utils :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kitchensink_runtime :: NposSolution16 > > , () , () , :: subxt :: storage :: address :: Yes >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedSubmissionsMap",
+ Vec::new(),
+ [
+ 84u8, 65u8, 205u8, 191u8, 143u8, 246u8, 239u8, 27u8, 243u8,
+ 54u8, 250u8, 8u8, 125u8, 32u8, 241u8, 141u8, 210u8, 225u8,
+ 56u8, 101u8, 241u8, 52u8, 157u8, 29u8, 13u8, 155u8, 73u8,
+ 132u8, 118u8, 53u8, 2u8, 135u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_npos_elections::ElectionScore,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ElectionProviderMultiPhase",
+ "MinimumUntrustedScore",
+ vec![],
+ [
+ 77u8, 235u8, 181u8, 45u8, 230u8, 12u8, 0u8, 179u8, 152u8,
+ 38u8, 74u8, 199u8, 47u8, 84u8, 85u8, 55u8, 171u8, 226u8,
+ 217u8, 125u8, 17u8, 194u8, 95u8, 157u8, 73u8, 245u8, 75u8,
+ 130u8, 248u8, 7u8, 53u8, 226u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " Duration of the unsigned phase."]
+ pub fn unsigned_phase(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "UnsignedPhase",
+ [
+ 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 = " Duration of the signed phase."]
+ pub fn signed_phase(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedPhase",
+ [
+ 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 improvement to the solution score that defines a solution as"]
+ #[doc = " \"better\" in the Signed phase."]
+ pub fn better_signed_threshold(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "BetterSignedThreshold",
+ [
+ 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8,
+ 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8,
+ 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8,
+ 104u8, 222u8, 75u8, 86u8, 227u8,
+ ],
+ )
+ }
+ #[doc = " The minimum amount of improvement to the solution score that defines a solution as"]
+ #[doc = " \"better\" in the Unsigned phase."]
+ pub fn better_unsigned_threshold(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "BetterUnsignedThreshold",
+ [
+ 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8,
+ 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8,
+ 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8,
+ 104u8, 222u8, 75u8, 86u8, 227u8,
+ ],
+ )
+ }
+ #[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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "OffchainRepeat",
+ [
+ 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 priority of the unsigned transaction submitted in the unsigned-phase"]
+ pub fn miner_tx_priority(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_weights::weight_v2::Weight,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedMaxWeight",
+ [
+ 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8,
+ 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8,
+ 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8,
+ 165u8, 147u8, 134u8, 106u8, 76u8,
+ ],
+ )
+ }
+ #[doc = " The maximum amount of unchecked solutions to refund the call fee for."]
+ pub fn signed_max_refunds(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 = " Base deposit for a signed solution."]
+ pub fn signed_deposit_base(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "SignedDepositBase",
+ [
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 electing voters to put in the snapshot. At the moment, snapshots"]
+ #[doc = " are only over a single block, but once multi-block elections are introduced they will"]
+ #[doc = " take place over multiple blocks."]
+ pub fn max_electing_voters(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "MaxElectingVoters",
+ [
+ 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 electable targets to put in the snapshot."]
+ pub fn max_electable_targets(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u16>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "MaxElectableTargets",
+ [
+ 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,
+ ],
+ )
+ }
+ #[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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_weights::weight_v2::Weight,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "ElectionProviderMultiPhase",
+ "MinerMaxWeight",
+ [
+ 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8,
+ 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8,
+ 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8,
+ 165u8, 147u8, 134u8, 106u8, 76u8,
+ ],
+ )
+ }
+ pub fn miner_max_votes_per_voter(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 mod staking {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Bond {
+ pub controller: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ pub payee: runtime_types::pallet_staking::RewardDestination<
+ ::subxt::utils::AccountId32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct BondExtra {
+ #[codec(compact)]
+ pub max_additional: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Unbond {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct WithdrawUnbonded {
+ pub num_slashing_spans: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Validate {
+ pub prefs: runtime_types::pallet_staking::ValidatorPrefs,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Nominate {
+ pub targets: ::std::vec::Vec<
+ ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Chill;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetPayee {
+ pub payee: runtime_types::pallet_staking::RewardDestination<
+ ::subxt::utils::AccountId32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetController {
+ pub controller: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetValidatorCount {
+ #[codec(compact)]
+ pub new: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct IncreaseValidatorCount {
+ #[codec(compact)]
+ pub additional: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ScaleValidatorCount {
+ pub factor: runtime_types::sp_arithmetic::per_things::Percent,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceNoEras;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceNewEra;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetInvulnerables {
+ pub invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceUnstake {
+ pub stash: ::subxt::utils::AccountId32,
+ pub num_slashing_spans: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceNewEraAlways;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelDeferredSlash {
+ pub era: ::core::primitive::u32,
+ pub slash_indices: ::std::vec::Vec<::core::primitive::u32>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct PayoutStakers {
+ pub validator_stash: ::subxt::utils::AccountId32,
+ pub era: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Rebond {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ReapStash {
+ pub stash: ::subxt::utils::AccountId32,
+ pub num_slashing_spans: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Kick {
+ pub who: ::std::vec::Vec<
+ ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetStakingConfigs {
+ pub min_nominator_bond:
+ runtime_types::pallet_staking::pallet::pallet::ConfigOp<
+ ::core::primitive::u128,
+ >,
+ pub min_validator_bond:
+ runtime_types::pallet_staking::pallet::pallet::ConfigOp<
+ ::core::primitive::u128,
+ >,
+ pub max_nominator_count:
+ runtime_types::pallet_staking::pallet::pallet::ConfigOp<
+ ::core::primitive::u32,
+ >,
+ pub max_validator_count:
+ runtime_types::pallet_staking::pallet::pallet::ConfigOp<
+ ::core::primitive::u32,
+ >,
+ pub chill_threshold:
+ runtime_types::pallet_staking::pallet::pallet::ConfigOp<
+ runtime_types::sp_arithmetic::per_things::Percent,
+ >,
+ pub min_commission:
+ runtime_types::pallet_staking::pallet::pallet::ConfigOp<
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ChillOther {
+ pub controller: ::subxt::utils::AccountId32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceApplyMinCommission {
+ pub validator_stash: ::subxt::utils::AccountId32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetMinCommission {
+ pub new: runtime_types::sp_arithmetic::per_things::Perbill,
+ }
+ 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 = "# "]
+ #[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_ and gets removed as dust."]
+ #[doc = "------------------"]
+ #[doc = "# "]
+ pub fn bond(
+ &self,
+ controller: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ payee: runtime_types::pallet_staking::RewardDestination<
+ ::subxt::utils::AccountId32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "bond",
+ Bond {
+ controller,
+ value,
+ payee,
+ },
+ [
+ 140u8, 13u8, 108u8, 181u8, 212u8, 177u8, 190u8, 212u8, 163u8,
+ 40u8, 120u8, 232u8, 126u8, 213u8, 6u8, 181u8, 99u8, 252u8,
+ 58u8, 54u8, 139u8, 64u8, 67u8, 76u8, 53u8, 226u8, 11u8,
+ 133u8, 235u8, 159u8, 103u8, 210u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- Independent of the arguments. Insignificant complexity."]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn bond_extra(
+ &self,
+ max_additional: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "bond_extra",
+ BondExtra { max_additional },
+ [
+ 60u8, 45u8, 82u8, 223u8, 113u8, 95u8, 0u8, 71u8, 59u8, 108u8,
+ 228u8, 9u8, 95u8, 210u8, 113u8, 106u8, 252u8, 15u8, 19u8,
+ 128u8, 11u8, 187u8, 4u8, 151u8, 103u8, 143u8, 24u8, 33u8,
+ 149u8, 82u8, 35u8, 192u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "unbond",
+ Unbond { value },
+ [
+ 85u8, 62u8, 34u8, 127u8, 60u8, 241u8, 134u8, 60u8, 125u8,
+ 91u8, 31u8, 193u8, 50u8, 230u8, 237u8, 42u8, 114u8, 230u8,
+ 240u8, 146u8, 14u8, 109u8, 185u8, 151u8, 148u8, 44u8, 147u8,
+ 182u8, 192u8, 253u8, 51u8, 87u8,
+ ],
+ )
+ }
+ #[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"]
+ #[doc = "whatever 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 = "# "]
+ #[doc = "Complexity O(S) where S is the number of slashing spans to remove"]
+ #[doc = "NOTE: Weight annotation is the kill scenario, we refund otherwise."]
+ #[doc = "# "]
+ pub fn withdraw_unbonded(
+ &self,
+ num_slashing_spans: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "withdraw_unbonded",
+ WithdrawUnbonded { num_slashing_spans },
+ [
+ 95u8, 223u8, 122u8, 217u8, 76u8, 208u8, 86u8, 129u8, 31u8,
+ 104u8, 70u8, 154u8, 23u8, 250u8, 165u8, 192u8, 149u8, 249u8,
+ 158u8, 159u8, 194u8, 224u8, 118u8, 134u8, 204u8, 157u8, 72u8,
+ 136u8, 19u8, 193u8, 183u8, 84u8,
+ ],
+ )
+ }
+ #[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: runtime_types::pallet_staking::ValidatorPrefs,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "validate",
+ Validate { prefs },
+ [
+ 191u8, 116u8, 139u8, 35u8, 250u8, 211u8, 86u8, 240u8, 35u8,
+ 9u8, 19u8, 44u8, 148u8, 35u8, 91u8, 106u8, 200u8, 172u8,
+ 108u8, 145u8, 194u8, 146u8, 61u8, 145u8, 233u8, 168u8, 2u8,
+ 26u8, 145u8, 101u8, 114u8, 157u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[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."]
+ #[doc = "# "]
+ pub fn nominate(
+ &self,
+ targets: ::std::vec::Vec<
+ ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "nominate",
+ Nominate { targets },
+ [
+ 249u8, 66u8, 140u8, 39u8, 26u8, 221u8, 135u8, 225u8, 98u8,
+ 255u8, 13u8, 54u8, 106u8, 215u8, 129u8, 156u8, 190u8, 83u8,
+ 178u8, 170u8, 116u8, 27u8, 8u8, 244u8, 56u8, 73u8, 164u8,
+ 223u8, 199u8, 115u8, 168u8, 83u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- Independent of the arguments. Insignificant complexity."]
+ #[doc = "- Contains one read."]
+ #[doc = "- Writes are limited to the `origin` account key."]
+ #[doc = "# "]
+ pub fn chill(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "chill",
+ Chill {},
+ [
+ 94u8, 20u8, 196u8, 31u8, 220u8, 125u8, 115u8, 167u8, 140u8,
+ 3u8, 20u8, 132u8, 81u8, 120u8, 215u8, 166u8, 230u8, 56u8,
+ 16u8, 222u8, 31u8, 153u8, 120u8, 62u8, 153u8, 67u8, 220u8,
+ 239u8, 11u8, 234u8, 127u8, 122u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- Independent of the arguments. Insignificant complexity."]
+ #[doc = "- Contains a limited number of reads."]
+ #[doc = "- Writes are limited to the `origin` account key."]
+ #[doc = "---------"]
+ #[doc = "- Weight: O(1)"]
+ #[doc = "- DB Weight:"]
+ #[doc = " - Read: Ledger"]
+ #[doc = " - Write: Payee"]
+ #[doc = "# "]
+ pub fn set_payee(
+ &self,
+ payee: runtime_types::pallet_staking::RewardDestination<
+ ::subxt::utils::AccountId32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "set_payee",
+ SetPayee { payee },
+ [
+ 96u8, 8u8, 254u8, 164u8, 87u8, 46u8, 120u8, 11u8, 197u8,
+ 63u8, 20u8, 178u8, 167u8, 236u8, 149u8, 245u8, 14u8, 171u8,
+ 108u8, 195u8, 250u8, 133u8, 0u8, 75u8, 192u8, 159u8, 84u8,
+ 220u8, 242u8, 133u8, 60u8, 62u8,
+ ],
+ )
+ }
+ #[doc = "(Re-)set the controller of a stash."]
+ #[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 = "# "]
+ #[doc = "- Independent of the arguments. Insignificant complexity."]
+ #[doc = "- Contains a limited number of reads."]
+ #[doc = "- Writes are limited to the `origin` account key."]
+ #[doc = "----------"]
+ #[doc = "Weight: O(1)"]
+ #[doc = "DB Weight:"]
+ #[doc = "- Read: Bonded, Ledger New Controller, Ledger Old Controller"]
+ #[doc = "- Write: Bonded, Ledger New Controller, Ledger Old Controller"]
+ #[doc = "# "]
+ pub fn set_controller(
+ &self,
+ controller: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "set_controller",
+ SetController { controller },
+ [
+ 154u8, 80u8, 184u8, 176u8, 74u8, 106u8, 72u8, 242u8, 64u8,
+ 81u8, 169u8, 157u8, 200u8, 97u8, 117u8, 192u8, 143u8, 166u8,
+ 38u8, 235u8, 75u8, 161u8, 177u8, 229u8, 229u8, 82u8, 95u8,
+ 39u8, 40u8, 116u8, 9u8, 204u8,
+ ],
+ )
+ }
+ #[doc = "Sets the ideal number of validators."]
+ #[doc = ""]
+ #[doc = "The dispatch origin must be Root."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Weight: O(1)"]
+ #[doc = "Write: Validator Count"]
+ #[doc = "# "]
+ pub fn set_validator_count(
+ &self,
+ new: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "set_validator_count",
+ SetValidatorCount { new },
+ [
+ 55u8, 232u8, 95u8, 66u8, 228u8, 217u8, 11u8, 27u8, 3u8,
+ 202u8, 199u8, 242u8, 70u8, 160u8, 250u8, 187u8, 194u8, 91u8,
+ 15u8, 36u8, 215u8, 36u8, 160u8, 108u8, 251u8, 60u8, 240u8,
+ 202u8, 249u8, 235u8, 28u8, 94u8,
+ ],
+ )
+ }
+ #[doc = "Increments the ideal number of validators upto maximum of"]
+ #[doc = "`ElectionProviderBase::MaxWinners`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin must be Root."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Same as [`Self::set_validator_count`]."]
+ #[doc = "# "]
+ pub fn increase_validator_count(
+ &self,
+ additional: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "increase_validator_count",
+ IncreaseValidatorCount { additional },
+ [
+ 239u8, 184u8, 155u8, 213u8, 25u8, 22u8, 193u8, 13u8, 102u8,
+ 192u8, 82u8, 153u8, 249u8, 192u8, 60u8, 158u8, 8u8, 78u8,
+ 175u8, 219u8, 46u8, 51u8, 222u8, 193u8, 193u8, 201u8, 78u8,
+ 90u8, 58u8, 86u8, 196u8, 17u8,
+ ],
+ )
+ }
+ #[doc = "Scale up the ideal number of validators by a factor upto maximum of"]
+ #[doc = "`ElectionProviderBase::MaxWinners`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin must be Root."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Same as [`Self::set_validator_count`]."]
+ #[doc = "# "]
+ pub fn scale_validator_count(
+ &self,
+ factor: runtime_types::sp_arithmetic::per_things::Percent,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "scale_validator_count",
+ ScaleValidatorCount { factor },
+ [
+ 198u8, 68u8, 227u8, 94u8, 110u8, 157u8, 209u8, 217u8, 112u8,
+ 37u8, 78u8, 142u8, 12u8, 193u8, 219u8, 167u8, 149u8, 112u8,
+ 49u8, 139u8, 74u8, 81u8, 172u8, 72u8, 253u8, 224u8, 56u8,
+ 194u8, 185u8, 90u8, 87u8, 125u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- No arguments."]
+ #[doc = "- Weight: O(1)"]
+ #[doc = "- Write: ForceEra"]
+ #[doc = "# "]
+ pub fn force_no_eras(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "force_no_eras",
+ ForceNoEras {},
+ [
+ 16u8, 81u8, 207u8, 168u8, 23u8, 236u8, 11u8, 75u8, 141u8,
+ 107u8, 92u8, 2u8, 53u8, 111u8, 252u8, 116u8, 91u8, 120u8,
+ 75u8, 24u8, 125u8, 53u8, 9u8, 28u8, 242u8, 87u8, 245u8, 55u8,
+ 40u8, 103u8, 151u8, 178u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- No arguments."]
+ #[doc = "- Weight: O(1)"]
+ #[doc = "- Write ForceEra"]
+ #[doc = "# "]
+ pub fn force_new_era(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "force_new_era",
+ ForceNewEra {},
+ [
+ 230u8, 242u8, 169u8, 196u8, 78u8, 145u8, 24u8, 191u8, 113u8,
+ 68u8, 5u8, 138u8, 48u8, 51u8, 109u8, 126u8, 73u8, 136u8,
+ 162u8, 158u8, 174u8, 201u8, 213u8, 230u8, 215u8, 44u8, 200u8,
+ 32u8, 75u8, 27u8, 23u8, 254u8,
+ ],
+ )
+ }
+ #[doc = "Set the validators who cannot be slashed (if any)."]
+ #[doc = ""]
+ #[doc = "The dispatch origin must be Root."]
+ pub fn set_invulnerables(
+ &self,
+ invulnerables: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "set_invulnerables",
+ SetInvulnerables { invulnerables },
+ [
+ 2u8, 148u8, 221u8, 111u8, 153u8, 48u8, 222u8, 36u8, 228u8,
+ 84u8, 18u8, 35u8, 168u8, 239u8, 53u8, 245u8, 27u8, 76u8,
+ 18u8, 203u8, 206u8, 9u8, 8u8, 81u8, 35u8, 224u8, 22u8, 133u8,
+ 58u8, 99u8, 103u8, 39u8,
+ ],
+ )
+ }
+ #[doc = "Force a current staker to become completely unstaked, immediately."]
+ #[doc = ""]
+ #[doc = "The dispatch origin must be Root."]
+ pub fn force_unstake(
+ &self,
+ stash: ::subxt::utils::AccountId32,
+ num_slashing_spans: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "force_unstake",
+ ForceUnstake {
+ stash,
+ num_slashing_spans,
+ },
+ [
+ 94u8, 247u8, 238u8, 47u8, 250u8, 6u8, 96u8, 175u8, 173u8,
+ 123u8, 161u8, 187u8, 162u8, 214u8, 176u8, 233u8, 33u8, 33u8,
+ 167u8, 239u8, 40u8, 223u8, 19u8, 131u8, 230u8, 39u8, 175u8,
+ 200u8, 36u8, 182u8, 76u8, 207u8,
+ ],
+ )
+ }
+ #[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::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "force_new_era_always",
+ ForceNewEraAlways {},
+ [
+ 179u8, 118u8, 189u8, 54u8, 248u8, 141u8, 207u8, 142u8, 80u8,
+ 37u8, 241u8, 185u8, 138u8, 254u8, 117u8, 147u8, 225u8, 118u8,
+ 34u8, 177u8, 197u8, 158u8, 8u8, 82u8, 202u8, 108u8, 208u8,
+ 26u8, 64u8, 33u8, 74u8, 43u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ slash_indices: ::std::vec::Vec<::core::primitive::u32>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "cancel_deferred_slash",
+ CancelDeferredSlash { era, slash_indices },
+ [
+ 120u8, 57u8, 162u8, 105u8, 91u8, 250u8, 129u8, 240u8, 110u8,
+ 234u8, 170u8, 98u8, 164u8, 65u8, 106u8, 101u8, 19u8, 88u8,
+ 146u8, 210u8, 171u8, 44u8, 37u8, 50u8, 65u8, 178u8, 37u8,
+ 223u8, 239u8, 197u8, 116u8, 168u8,
+ ],
+ )
+ }
+ #[doc = "Pay out all the stakers behind a single validator for a single era."]
+ #[doc = ""]
+ #[doc = "- `validator_stash` is the stash account of the validator. Their nominators, up to"]
+ #[doc = " `T::MaxNominatorRewardedPerValidator`, will also receive their rewards."]
+ #[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 = "# "]
+ #[doc = "- Time complexity: at most O(MaxNominatorRewardedPerValidator)."]
+ #[doc = "- Contains a limited number of reads and writes."]
+ #[doc = "-----------"]
+ #[doc = "N is the Number of payouts for the validator (including the validator)"]
+ #[doc = "Weight:"]
+ #[doc = "- Reward Destination Staked: O(N)"]
+ #[doc = "- Reward Destination Controller (Creating): O(N)"]
+ #[doc = ""]
+ #[doc = " NOTE: weights are assuming that payouts are made to alive stash account (Staked)."]
+ #[doc = " Paying even a dead controller is cheaper weight-wise. We don't do any refunds here."]
+ #[doc = "# "]
+ pub fn payout_stakers(
+ &self,
+ validator_stash: ::subxt::utils::AccountId32,
+ era: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "payout_stakers",
+ PayoutStakers {
+ validator_stash,
+ era,
+ },
+ [
+ 184u8, 194u8, 33u8, 118u8, 7u8, 203u8, 89u8, 119u8, 214u8,
+ 76u8, 178u8, 20u8, 82u8, 111u8, 57u8, 132u8, 212u8, 43u8,
+ 232u8, 91u8, 252u8, 49u8, 42u8, 115u8, 1u8, 181u8, 154u8,
+ 207u8, 144u8, 206u8, 205u8, 33u8,
+ ],
+ )
+ }
+ #[doc = "Rebond a portion of the stash scheduled to be unlocked."]
+ #[doc = ""]
+ #[doc = "The dispatch origin must be signed by the controller."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Time complexity: O(L), where L is unlocking chunks"]
+ #[doc = "- Bounded by `MaxUnlockingChunks`."]
+ #[doc = "- Storage changes: Can't increase storage, only decrease it."]
+ #[doc = "# "]
+ pub fn rebond(
+ &self,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "rebond",
+ Rebond { value },
+ [
+ 25u8, 22u8, 191u8, 172u8, 133u8, 101u8, 139u8, 102u8, 134u8,
+ 16u8, 136u8, 56u8, 137u8, 162u8, 4u8, 253u8, 196u8, 30u8,
+ 234u8, 49u8, 102u8, 68u8, 145u8, 96u8, 148u8, 219u8, 162u8,
+ 17u8, 177u8, 184u8, 34u8, 113u8,
+ ],
+ )
+ }
+ #[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 = ""]
+ #[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."]
+ pub fn reap_stash(
+ &self,
+ stash: ::subxt::utils::AccountId32,
+ num_slashing_spans: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "reap_stash",
+ ReapStash {
+ stash,
+ num_slashing_spans,
+ },
+ [
+ 34u8, 168u8, 120u8, 161u8, 95u8, 199u8, 106u8, 233u8, 61u8,
+ 240u8, 166u8, 31u8, 183u8, 165u8, 158u8, 179u8, 32u8, 130u8,
+ 27u8, 164u8, 112u8, 44u8, 14u8, 125u8, 227u8, 87u8, 70u8,
+ 203u8, 194u8, 24u8, 212u8, 177u8,
+ ],
+ )
+ }
+ #[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: ::std::vec::Vec<
+ ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "kick",
+ Kick { who },
+ [
+ 94u8, 27u8, 18u8, 16u8, 126u8, 129u8, 47u8, 169u8, 114u8,
+ 84u8, 48u8, 95u8, 235u8, 237u8, 33u8, 118u8, 115u8, 243u8,
+ 166u8, 120u8, 121u8, 70u8, 227u8, 240u8, 205u8, 240u8, 211u8,
+ 202u8, 251u8, 232u8, 209u8, 12u8,
+ ],
+ )
+ }
+ #[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 : 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 >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "set_staking_configs",
+ SetStakingConfigs {
+ min_nominator_bond,
+ min_validator_bond,
+ max_nominator_count,
+ max_validator_count,
+ chill_threshold,
+ min_commission,
+ },
+ [
+ 176u8, 168u8, 155u8, 176u8, 27u8, 79u8, 223u8, 92u8, 88u8,
+ 93u8, 223u8, 69u8, 179u8, 250u8, 138u8, 138u8, 87u8, 220u8,
+ 36u8, 3u8, 126u8, 213u8, 16u8, 68u8, 3u8, 16u8, 218u8, 151u8,
+ 98u8, 169u8, 217u8, 75u8,
+ ],
+ )
+ }
+ #[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,
+ controller: ::subxt::utils::AccountId32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "chill_other",
+ ChillOther { controller },
+ [
+ 140u8, 98u8, 4u8, 203u8, 91u8, 131u8, 123u8, 119u8, 169u8,
+ 47u8, 188u8, 23u8, 205u8, 170u8, 82u8, 220u8, 166u8, 170u8,
+ 135u8, 176u8, 68u8, 228u8, 14u8, 67u8, 42u8, 52u8, 140u8,
+ 231u8, 62u8, 167u8, 80u8, 173u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::AccountId32,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "force_apply_min_commission",
+ ForceApplyMinCommission { validator_stash },
+ [
+ 136u8, 163u8, 85u8, 134u8, 240u8, 247u8, 183u8, 227u8, 226u8,
+ 202u8, 102u8, 186u8, 138u8, 119u8, 78u8, 123u8, 229u8, 135u8,
+ 129u8, 241u8, 119u8, 106u8, 41u8, 182u8, 121u8, 181u8, 242u8,
+ 175u8, 74u8, 207u8, 64u8, 106u8,
+ ],
+ )
+ }
+ #[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: runtime_types::sp_arithmetic::per_things::Perbill,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Staking",
+ "set_min_commission",
+ SetMinCommission { new },
+ [
+ 62u8, 139u8, 175u8, 245u8, 212u8, 113u8, 117u8, 130u8, 191u8,
+ 173u8, 78u8, 97u8, 19u8, 104u8, 185u8, 207u8, 201u8, 14u8,
+ 200u8, 208u8, 184u8, 195u8, 242u8, 175u8, 158u8, 156u8, 51u8,
+ 58u8, 118u8, 154u8, 68u8, 221u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_staking::pallet::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::core::primitive::u32,
+ pub validator_payout: ::core::primitive::u128,
+ pub remainder: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for EraPaid {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "EraPaid";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The nominator has been rewarded by this amount."]
+ pub struct Rewarded {
+ pub stash: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Rewarded {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Rewarded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A staker (validator or nominator) has been slashed by the given amount."]
+ pub struct Slashed {
+ pub staker: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Slashed {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Slashed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub fraction: runtime_types::sp_arithmetic::per_things::Perbill,
+ pub slash_era: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for SlashReported {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "SlashReported";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An old slashing report from a prior era was discarded because it could"]
+ #[doc = "not be processed."]
+ pub struct OldSlashingReportDiscarded {
+ pub session_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for OldSlashingReportDiscarded {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "OldSlashingReportDiscarded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new set of stakers was elected."]
+ pub struct StakersElected;
+ impl ::subxt::events::StaticEvent for StakersElected {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "StakersElected";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Bonded {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Bonded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has unbonded this amount."]
+ pub struct Unbonded {
+ pub stash: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Unbonded {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Unbonded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`"]
+ #[doc = "from the unlocking queue."]
+ pub struct Withdrawn {
+ pub stash: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Withdrawn {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Withdrawn";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A nominator has been kicked from a validator."]
+ pub struct Kicked {
+ pub nominator: ::subxt::utils::AccountId32,
+ pub stash: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Kicked {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Kicked";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The election failed. No new era is planned."]
+ pub struct StakingElectionFailed;
+ impl ::subxt::events::StaticEvent for StakingElectionFailed {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "StakingElectionFailed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has stopped participating as either a validator or nominator."]
+ pub struct Chilled {
+ pub stash: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Chilled {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "Chilled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The stakers' rewards are getting paid."]
+ pub struct PayoutStarted {
+ pub era_index: ::core::primitive::u32,
+ pub validator_stash: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for PayoutStarted {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "PayoutStarted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A validator has set their preferences."]
+ pub struct ValidatorPrefsSet {
+ pub stash: ::subxt::utils::AccountId32,
+ pub prefs: runtime_types::pallet_staking::ValidatorPrefs,
+ }
+ impl ::subxt::events::StaticEvent for ValidatorPrefsSet {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "ValidatorPrefsSet";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new force era mode was set."]
+ pub struct ForceEra {
+ pub mode: runtime_types::pallet_staking::Forcing,
+ }
+ impl ::subxt::events::StaticEvent for ForceEra {
+ const PALLET: &'static str = "Staking";
+ const EVENT: &'static str = "ForceEra";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The ideal number of active validators."]
+ pub fn validator_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ValidatorCount",
+ vec![],
+ [
+ 245u8, 75u8, 214u8, 110u8, 66u8, 164u8, 86u8, 206u8, 69u8,
+ 89u8, 12u8, 111u8, 117u8, 16u8, 228u8, 184u8, 207u8, 6u8,
+ 0u8, 126u8, 221u8, 67u8, 125u8, 218u8, 188u8, 245u8, 156u8,
+ 188u8, 34u8, 85u8, 208u8, 197u8,
+ ],
+ )
+ }
+ #[doc = " Minimum number of staking participants before emergency conditions are imposed."]
+ pub fn minimum_validator_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MinimumValidatorCount",
+ vec![],
+ [
+ 82u8, 95u8, 128u8, 55u8, 136u8, 134u8, 71u8, 117u8, 135u8,
+ 76u8, 44u8, 46u8, 174u8, 34u8, 170u8, 228u8, 175u8, 1u8,
+ 234u8, 162u8, 91u8, 252u8, 127u8, 68u8, 243u8, 241u8, 13u8,
+ 107u8, 214u8, 70u8, 87u8, 249u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::AccountId32>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Invulnerables",
+ vec![],
+ [
+ 77u8, 78u8, 63u8, 199u8, 150u8, 167u8, 135u8, 130u8, 192u8,
+ 51u8, 202u8, 119u8, 68u8, 49u8, 241u8, 68u8, 82u8, 90u8,
+ 226u8, 201u8, 96u8, 170u8, 21u8, 173u8, 236u8, 116u8, 148u8,
+ 8u8, 174u8, 92u8, 7u8, 11u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Bonded",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 35u8, 197u8, 156u8, 60u8, 22u8, 59u8, 103u8, 83u8, 77u8,
+ 15u8, 118u8, 193u8, 155u8, 97u8, 229u8, 36u8, 119u8, 128u8,
+ 224u8, 162u8, 21u8, 46u8, 199u8, 221u8, 15u8, 74u8, 59u8,
+ 70u8, 77u8, 218u8, 73u8, 165u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Bonded",
+ Vec::new(),
+ [
+ 35u8, 197u8, 156u8, 60u8, 22u8, 59u8, 103u8, 83u8, 77u8,
+ 15u8, 118u8, 193u8, 155u8, 97u8, 229u8, 36u8, 119u8, 128u8,
+ 224u8, 162u8, 21u8, 46u8, 199u8, 221u8, 15u8, 74u8, 59u8,
+ 70u8, 77u8, 218u8, 73u8, 165u8,
+ ],
+ )
+ }
+ #[doc = " The minimum active bond to become and maintain the role of a nominator."]
+ pub fn min_nominator_bond(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MinNominatorBond",
+ vec![],
+ [
+ 187u8, 66u8, 149u8, 226u8, 72u8, 219u8, 57u8, 246u8, 102u8,
+ 47u8, 71u8, 12u8, 219u8, 204u8, 127u8, 223u8, 58u8, 134u8,
+ 81u8, 165u8, 200u8, 142u8, 196u8, 158u8, 26u8, 38u8, 165u8,
+ 19u8, 91u8, 251u8, 119u8, 84u8,
+ ],
+ )
+ }
+ #[doc = " The minimum active bond to become and maintain the role of a validator."]
+ pub fn min_validator_bond(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MinValidatorBond",
+ vec![],
+ [
+ 48u8, 105u8, 85u8, 178u8, 142u8, 208u8, 208u8, 19u8, 236u8,
+ 130u8, 129u8, 169u8, 35u8, 245u8, 66u8, 182u8, 92u8, 20u8,
+ 22u8, 109u8, 155u8, 174u8, 87u8, 118u8, 242u8, 216u8, 193u8,
+ 154u8, 4u8, 5u8, 66u8, 56u8,
+ ],
+ )
+ }
+ #[doc = " The minimum active nominator stake of the last successful election."]
+ pub fn minimum_active_stake(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MinimumActiveStake",
+ vec![],
+ [
+ 172u8, 190u8, 228u8, 47u8, 47u8, 192u8, 182u8, 59u8, 9u8,
+ 18u8, 103u8, 46u8, 175u8, 54u8, 17u8, 79u8, 89u8, 107u8,
+ 255u8, 200u8, 182u8, 107u8, 89u8, 157u8, 55u8, 16u8, 77u8,
+ 46u8, 154u8, 169u8, 103u8, 151u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MinCommission",
+ vec![],
+ [
+ 61u8, 101u8, 69u8, 27u8, 220u8, 179u8, 5u8, 71u8, 66u8,
+ 227u8, 84u8, 98u8, 18u8, 141u8, 183u8, 49u8, 98u8, 46u8,
+ 123u8, 114u8, 198u8, 85u8, 15u8, 175u8, 243u8, 239u8, 133u8,
+ 129u8, 146u8, 174u8, 254u8, 158u8,
+ ],
+ )
+ }
+ #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."]
+ pub fn ledger(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::StakingLedger,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Ledger",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 31u8, 205u8, 3u8, 165u8, 22u8, 22u8, 62u8, 92u8, 33u8, 189u8,
+ 124u8, 120u8, 177u8, 70u8, 27u8, 242u8, 188u8, 184u8, 204u8,
+ 188u8, 242u8, 140u8, 128u8, 230u8, 85u8, 99u8, 181u8, 173u8,
+ 67u8, 252u8, 37u8, 236u8,
+ ],
+ )
+ }
+ #[doc = " Map from all (unlocked) \"controller\" accounts to the info regarding the staking."]
+ pub fn ledger_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::StakingLedger,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Ledger",
+ Vec::new(),
+ [
+ 31u8, 205u8, 3u8, 165u8, 22u8, 22u8, 62u8, 92u8, 33u8, 189u8,
+ 124u8, 120u8, 177u8, 70u8, 27u8, 242u8, 188u8, 184u8, 204u8,
+ 188u8, 242u8, 140u8, 128u8, 230u8, 85u8, 99u8, 181u8, 173u8,
+ 67u8, 252u8, 37u8, 236u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::RewardDestination<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Payee",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 195u8, 125u8, 82u8, 213u8, 216u8, 64u8, 76u8, 63u8, 187u8,
+ 163u8, 20u8, 230u8, 153u8, 13u8, 189u8, 232u8, 119u8, 118u8,
+ 107u8, 17u8, 102u8, 245u8, 36u8, 42u8, 232u8, 137u8, 177u8,
+ 165u8, 169u8, 246u8, 199u8, 57u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::RewardDestination<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Payee",
+ Vec::new(),
+ [
+ 195u8, 125u8, 82u8, 213u8, 216u8, 64u8, 76u8, 63u8, 187u8,
+ 163u8, 20u8, 230u8, 153u8, 13u8, 189u8, 232u8, 119u8, 118u8,
+ 107u8, 17u8, 102u8, 245u8, 36u8, 42u8, 232u8, 137u8, 177u8,
+ 165u8, 169u8, 246u8, 199u8, 57u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::ValidatorPrefs,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Validators",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 80u8, 77u8, 66u8, 18u8, 197u8, 250u8, 41u8, 185u8, 43u8,
+ 24u8, 149u8, 164u8, 208u8, 60u8, 144u8, 29u8, 251u8, 195u8,
+ 236u8, 196u8, 108u8, 58u8, 80u8, 115u8, 246u8, 66u8, 226u8,
+ 241u8, 201u8, 172u8, 229u8, 152u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::ValidatorPrefs,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Validators",
+ Vec::new(),
+ [
+ 80u8, 77u8, 66u8, 18u8, 197u8, 250u8, 41u8, 185u8, 43u8,
+ 24u8, 149u8, 164u8, 208u8, 60u8, 144u8, 29u8, 251u8, 195u8,
+ 236u8, 196u8, 108u8, 58u8, 80u8, 115u8, 246u8, 66u8, 226u8,
+ 241u8, 201u8, 172u8, 229u8, 152u8,
+ ],
+ )
+ }
+ #[doc = "Counter for the related counted storage map"]
+ pub fn counter_for_validators(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "CounterForValidators",
+ vec![],
+ [
+ 139u8, 25u8, 223u8, 6u8, 160u8, 239u8, 212u8, 85u8, 36u8,
+ 185u8, 69u8, 63u8, 21u8, 156u8, 144u8, 241u8, 112u8, 85u8,
+ 49u8, 78u8, 88u8, 11u8, 8u8, 48u8, 118u8, 34u8, 62u8, 159u8,
+ 239u8, 122u8, 90u8, 45u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MaxValidatorsCount",
+ vec![],
+ [
+ 250u8, 62u8, 16u8, 68u8, 192u8, 216u8, 236u8, 211u8, 217u8,
+ 9u8, 213u8, 49u8, 41u8, 37u8, 58u8, 62u8, 131u8, 112u8, 64u8,
+ 26u8, 133u8, 7u8, 130u8, 1u8, 71u8, 158u8, 14u8, 55u8, 169u8,
+ 239u8, 223u8, 245u8,
+ ],
+ )
+ }
+ #[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 = " [`Config::MaxNominations`] configuration is decreased. 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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Nominations,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Nominators",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 1u8, 154u8, 55u8, 170u8, 215u8, 64u8, 56u8, 83u8, 254u8,
+ 19u8, 152u8, 85u8, 164u8, 171u8, 206u8, 129u8, 184u8, 45u8,
+ 221u8, 181u8, 229u8, 133u8, 200u8, 231u8, 16u8, 146u8, 247u8,
+ 21u8, 77u8, 122u8, 165u8, 134u8,
+ ],
+ )
+ }
+ #[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 = " [`Config::MaxNominations`] configuration is decreased. 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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Nominations,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "Nominators",
+ Vec::new(),
+ [
+ 1u8, 154u8, 55u8, 170u8, 215u8, 64u8, 56u8, 83u8, 254u8,
+ 19u8, 152u8, 85u8, 164u8, 171u8, 206u8, 129u8, 184u8, 45u8,
+ 221u8, 181u8, 229u8, 133u8, 200u8, 231u8, 16u8, 146u8, 247u8,
+ 21u8, 77u8, 122u8, 165u8, 134u8,
+ ],
+ )
+ }
+ #[doc = "Counter for the related counted storage map"]
+ pub fn counter_for_nominators(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "CounterForNominators",
+ vec![],
+ [
+ 31u8, 94u8, 130u8, 138u8, 75u8, 8u8, 38u8, 162u8, 181u8, 5u8,
+ 125u8, 116u8, 9u8, 51u8, 22u8, 234u8, 40u8, 117u8, 215u8,
+ 46u8, 82u8, 117u8, 225u8, 1u8, 9u8, 208u8, 83u8, 63u8, 39u8,
+ 187u8, 207u8, 191u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "MaxNominatorsCount",
+ vec![],
+ [
+ 180u8, 190u8, 180u8, 66u8, 235u8, 173u8, 76u8, 160u8, 197u8,
+ 92u8, 96u8, 165u8, 220u8, 188u8, 32u8, 119u8, 3u8, 73u8,
+ 86u8, 49u8, 104u8, 17u8, 186u8, 98u8, 221u8, 175u8, 109u8,
+ 254u8, 207u8, 245u8, 125u8, 179u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "CurrentEra",
+ vec![],
+ [
+ 105u8, 150u8, 49u8, 122u8, 4u8, 78u8, 8u8, 121u8, 34u8,
+ 136u8, 157u8, 227u8, 59u8, 139u8, 7u8, 253u8, 7u8, 10u8,
+ 117u8, 71u8, 240u8, 74u8, 86u8, 36u8, 198u8, 37u8, 153u8,
+ 93u8, 196u8, 22u8, 192u8, 243u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::ActiveEraInfo,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ActiveEra",
+ vec![],
+ [
+ 15u8, 112u8, 251u8, 183u8, 108u8, 61u8, 28u8, 71u8, 44u8,
+ 150u8, 162u8, 4u8, 143u8, 121u8, 11u8, 37u8, 83u8, 29u8,
+ 193u8, 21u8, 210u8, 116u8, 190u8, 236u8, 213u8, 235u8, 49u8,
+ 97u8, 189u8, 142u8, 251u8, 124u8,
+ ],
+ )
+ }
+ #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` 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 ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasStartSessionIndex",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, 230u8,
+ 229u8, 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, 163u8, 91u8,
+ 32u8, 246u8, 122u8, 78u8, 149u8, 214u8, 103u8, 249u8, 119u8,
+ 20u8, 101u8, 116u8, 110u8, 185u8,
+ ],
+ )
+ }
+ #[doc = " The session index at which the era start for the last `HISTORY_DEPTH` 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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasStartSessionIndex",
+ Vec::new(),
+ [
+ 92u8, 157u8, 168u8, 144u8, 132u8, 3u8, 212u8, 80u8, 230u8,
+ 229u8, 251u8, 218u8, 97u8, 55u8, 79u8, 100u8, 163u8, 91u8,
+ 32u8, 246u8, 122u8, 78u8, 149u8, 214u8, 103u8, 249u8, 119u8,
+ 20u8, 101u8, 116u8, 110u8, 185u8,
+ ],
+ )
+ }
+ #[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 `HISTORY_DEPTH` eras."]
+ #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."]
+ pub fn eras_stakers(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasStakers",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 192u8, 50u8, 152u8, 151u8, 92u8, 180u8, 206u8, 15u8, 139u8,
+ 210u8, 128u8, 65u8, 92u8, 253u8, 43u8, 35u8, 139u8, 171u8,
+ 73u8, 185u8, 32u8, 78u8, 20u8, 197u8, 154u8, 90u8, 233u8,
+ 231u8, 23u8, 22u8, 187u8, 156u8,
+ ],
+ )
+ }
+ #[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 `HISTORY_DEPTH` eras."]
+ #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."]
+ pub fn eras_stakers_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasStakers",
+ Vec::new(),
+ [
+ 192u8, 50u8, 152u8, 151u8, 92u8, 180u8, 206u8, 15u8, 139u8,
+ 210u8, 128u8, 65u8, 92u8, 253u8, 43u8, 35u8, 139u8, 171u8,
+ 73u8, 185u8, 32u8, 78u8, 20u8, 197u8, 154u8, 90u8, 233u8,
+ 231u8, 23u8, 22u8, 187u8, 156u8,
+ ],
+ )
+ }
+ #[doc = " Clipped Exposure of validator at era."]
+ #[doc = ""]
+ #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"]
+ #[doc = " `T::MaxNominatorRewardedPerValidator` 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 = " Is it removed after `HISTORY_DEPTH` eras."]
+ #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."]
+ pub fn eras_stakers_clipped(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasStakersClipped",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 43u8, 159u8, 113u8, 223u8, 122u8, 169u8, 98u8, 153u8, 26u8,
+ 55u8, 71u8, 119u8, 174u8, 48u8, 158u8, 45u8, 214u8, 26u8,
+ 136u8, 215u8, 46u8, 161u8, 185u8, 17u8, 174u8, 204u8, 206u8,
+ 246u8, 49u8, 87u8, 134u8, 169u8,
+ ],
+ )
+ }
+ #[doc = " Clipped Exposure of validator at era."]
+ #[doc = ""]
+ #[doc = " This is similar to [`ErasStakers`] but number of nominators exposed is reduced to the"]
+ #[doc = " `T::MaxNominatorRewardedPerValidator` 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 = " Is it removed after `HISTORY_DEPTH` eras."]
+ #[doc = " If stakers hasn't been set or has been removed then empty exposure is returned."]
+ pub fn eras_stakers_clipped_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasStakersClipped",
+ Vec::new(),
+ [
+ 43u8, 159u8, 113u8, 223u8, 122u8, 169u8, 98u8, 153u8, 26u8,
+ 55u8, 71u8, 119u8, 174u8, 48u8, 158u8, 45u8, 214u8, 26u8,
+ 136u8, 215u8, 46u8, 161u8, 185u8, 17u8, 174u8, 204u8, 206u8,
+ 246u8, 49u8, 87u8, 134u8, 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 `HISTORY_DEPTH` eras."]
+ pub fn eras_validator_prefs(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::ValidatorPrefs,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasValidatorPrefs",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 6u8, 196u8, 209u8, 138u8, 252u8, 18u8, 203u8, 86u8, 129u8,
+ 62u8, 4u8, 56u8, 234u8, 114u8, 141u8, 136u8, 127u8, 224u8,
+ 142u8, 89u8, 150u8, 33u8, 31u8, 50u8, 140u8, 108u8, 124u8,
+ 77u8, 188u8, 102u8, 230u8, 174u8,
+ ],
+ )
+ }
+ #[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 `HISTORY_DEPTH` eras."]
+ pub fn eras_validator_prefs_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::ValidatorPrefs,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasValidatorPrefs",
+ Vec::new(),
+ [
+ 6u8, 196u8, 209u8, 138u8, 252u8, 18u8, 203u8, 86u8, 129u8,
+ 62u8, 4u8, 56u8, 234u8, 114u8, 141u8, 136u8, 127u8, 224u8,
+ 142u8, 89u8, 150u8, 33u8, 31u8, 50u8, 140u8, 108u8, 124u8,
+ 77u8, 188u8, 102u8, 230u8, 174u8,
+ ],
+ )
+ }
+ #[doc = " The total validator era payout for the last `HISTORY_DEPTH` 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 ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasValidatorReward",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, 231u8,
+ 84u8, 124u8, 155u8, 227u8, 212u8, 212u8, 179u8, 84u8, 161u8,
+ 223u8, 255u8, 254u8, 107u8, 52u8, 89u8, 98u8, 169u8, 136u8,
+ 241u8, 104u8, 3u8, 244u8, 161u8,
+ ],
+ )
+ }
+ #[doc = " The total validator era payout for the last `HISTORY_DEPTH` eras."]
+ #[doc = ""]
+ #[doc = " Eras that haven't finished yet or has been removed doesn't have reward."]
+ pub fn eras_validator_reward_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasValidatorReward",
+ Vec::new(),
+ [
+ 87u8, 80u8, 156u8, 123u8, 107u8, 77u8, 203u8, 37u8, 231u8,
+ 84u8, 124u8, 155u8, 227u8, 212u8, 212u8, 179u8, 84u8, 161u8,
+ 223u8, 255u8, 254u8, 107u8, 52u8, 89u8, 98u8, 169u8, 136u8,
+ 241u8, 104u8, 3u8, 244u8, 161u8,
+ ],
+ )
+ }
+ #[doc = " Rewards for the last `HISTORY_DEPTH` 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 ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::EraRewardPoints<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasRewardPoints",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 194u8, 29u8, 20u8, 83u8, 200u8, 47u8, 158u8, 102u8, 88u8,
+ 65u8, 24u8, 255u8, 120u8, 178u8, 23u8, 232u8, 15u8, 64u8,
+ 206u8, 0u8, 170u8, 40u8, 18u8, 149u8, 45u8, 90u8, 179u8,
+ 127u8, 52u8, 59u8, 37u8, 192u8,
+ ],
+ )
+ }
+ #[doc = " Rewards for the last `HISTORY_DEPTH` eras."]
+ #[doc = " If reward hasn't been set or has been removed then 0 reward is returned."]
+ pub fn eras_reward_points_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::EraRewardPoints<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasRewardPoints",
+ Vec::new(),
+ [
+ 194u8, 29u8, 20u8, 83u8, 200u8, 47u8, 158u8, 102u8, 88u8,
+ 65u8, 24u8, 255u8, 120u8, 178u8, 23u8, 232u8, 15u8, 64u8,
+ 206u8, 0u8, 170u8, 40u8, 18u8, 149u8, 45u8, 90u8, 179u8,
+ 127u8, 52u8, 59u8, 37u8, 192u8,
+ ],
+ )
+ }
+ #[doc = " The total amount staked for the last `HISTORY_DEPTH` 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 ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasTotalStake",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, 4u8,
+ 46u8, 77u8, 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, 110u8, 53u8,
+ 11u8, 247u8, 235u8, 142u8, 234u8, 22u8, 43u8, 24u8, 36u8,
+ 37u8, 43u8, 170u8, 40u8,
+ ],
+ )
+ }
+ #[doc = " The total amount staked for the last `HISTORY_DEPTH` eras."]
+ #[doc = " If total hasn't been set or has been removed then 0 stake is returned."]
+ pub fn eras_total_stake_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ErasTotalStake",
+ Vec::new(),
+ [
+ 224u8, 240u8, 168u8, 69u8, 148u8, 140u8, 249u8, 240u8, 4u8,
+ 46u8, 77u8, 11u8, 224u8, 65u8, 26u8, 239u8, 1u8, 110u8, 53u8,
+ 11u8, 247u8, 235u8, 142u8, 234u8, 22u8, 43u8, 24u8, 36u8,
+ 37u8, 43u8, 170u8, 40u8,
+ ],
+ )
+ }
+ #[doc = " Mode of era forcing."]
+ pub fn force_era(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::Forcing,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ForceEra",
+ vec![],
+ [
+ 221u8, 41u8, 71u8, 21u8, 28u8, 193u8, 65u8, 97u8, 103u8,
+ 37u8, 145u8, 146u8, 183u8, 194u8, 57u8, 131u8, 214u8, 136u8,
+ 68u8, 156u8, 140u8, 194u8, 69u8, 151u8, 115u8, 177u8, 92u8,
+ 147u8, 29u8, 40u8, 41u8, 31u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "SlashRewardFraction",
+ vec![],
+ [
+ 167u8, 79u8, 143u8, 202u8, 199u8, 100u8, 129u8, 162u8, 23u8,
+ 165u8, 106u8, 170u8, 244u8, 86u8, 144u8, 242u8, 65u8, 207u8,
+ 115u8, 224u8, 231u8, 155u8, 55u8, 139u8, 101u8, 129u8, 242u8,
+ 196u8, 130u8, 50u8, 3u8, 117u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "CanceledSlashPayout",
+ vec![],
+ [
+ 126u8, 218u8, 66u8, 92u8, 82u8, 124u8, 145u8, 161u8, 40u8,
+ 176u8, 14u8, 211u8, 178u8, 216u8, 8u8, 156u8, 83u8, 14u8,
+ 91u8, 15u8, 200u8, 170u8, 3u8, 127u8, 141u8, 139u8, 151u8,
+ 98u8, 74u8, 96u8, 238u8, 29u8,
+ ],
+ )
+ }
+ #[doc = " All unapplied slashes that are queued for later."]
+ pub fn unapplied_slashes(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::pallet_staking::UnappliedSlash<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "UnappliedSlashes",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 130u8, 4u8, 163u8, 163u8, 28u8, 85u8, 34u8, 156u8, 47u8,
+ 125u8, 57u8, 0u8, 133u8, 176u8, 130u8, 2u8, 175u8, 180u8,
+ 167u8, 203u8, 230u8, 82u8, 198u8, 183u8, 55u8, 82u8, 221u8,
+ 248u8, 100u8, 173u8, 206u8, 151u8,
+ ],
+ )
+ }
+ #[doc = " All unapplied slashes that are queued for later."]
+ pub fn unapplied_slashes_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::pallet_staking::UnappliedSlash<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "UnappliedSlashes",
+ Vec::new(),
+ [
+ 130u8, 4u8, 163u8, 163u8, 28u8, 85u8, 34u8, 156u8, 47u8,
+ 125u8, 57u8, 0u8, 133u8, 176u8, 130u8, 2u8, 175u8, 180u8,
+ 167u8, 203u8, 230u8, 82u8, 198u8, 183u8, 55u8, 82u8, 221u8,
+ 248u8, 100u8, 173u8, 206u8, 151u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "BondedEras",
+ vec![],
+ [
+ 243u8, 162u8, 236u8, 198u8, 122u8, 182u8, 37u8, 55u8, 171u8,
+ 156u8, 235u8, 223u8, 226u8, 129u8, 89u8, 206u8, 2u8, 155u8,
+ 222u8, 154u8, 116u8, 124u8, 4u8, 119u8, 155u8, 94u8, 248u8,
+ 30u8, 171u8, 51u8, 78u8, 106u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ ::core::primitive::u128,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ValidatorSlashInEra",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 237u8, 80u8, 3u8, 237u8, 9u8, 40u8, 212u8, 15u8, 251u8,
+ 196u8, 85u8, 29u8, 27u8, 151u8, 98u8, 122u8, 189u8, 147u8,
+ 205u8, 40u8, 202u8, 194u8, 158u8, 96u8, 138u8, 16u8, 116u8,
+ 71u8, 140u8, 163u8, 121u8, 197u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_arithmetic::per_things::Perbill,
+ ::core::primitive::u128,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ValidatorSlashInEra",
+ Vec::new(),
+ [
+ 237u8, 80u8, 3u8, 237u8, 9u8, 40u8, 212u8, 15u8, 251u8,
+ 196u8, 85u8, 29u8, 27u8, 151u8, 98u8, 122u8, 189u8, 147u8,
+ 205u8, 40u8, 202u8, 194u8, 158u8, 96u8, 138u8, 16u8, 116u8,
+ 71u8, 140u8, 163u8, 121u8, 197u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "NominatorSlashInEra",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 249u8, 85u8, 170u8, 41u8, 179u8, 194u8, 180u8, 12u8, 53u8,
+ 101u8, 80u8, 96u8, 166u8, 71u8, 239u8, 23u8, 153u8, 19u8,
+ 152u8, 38u8, 138u8, 136u8, 221u8, 200u8, 18u8, 165u8, 26u8,
+ 228u8, 195u8, 199u8, 62u8, 4u8,
+ ],
+ )
+ }
+ #[doc = " All slashing events on nominators, mapped by era to the highest slash value of the era."]
+ pub fn nominator_slash_in_era_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "NominatorSlashInEra",
+ Vec::new(),
+ [
+ 249u8, 85u8, 170u8, 41u8, 179u8, 194u8, 180u8, 12u8, 53u8,
+ 101u8, 80u8, 96u8, 166u8, 71u8, 239u8, 23u8, 153u8, 19u8,
+ 152u8, 38u8, 138u8, 136u8, 221u8, 200u8, 18u8, 165u8, 26u8,
+ 228u8, 195u8, 199u8, 62u8, 4u8,
+ ],
+ )
+ }
+ #[doc = " Slashing spans for stash accounts."]
+ pub fn slashing_spans(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::slashing::SlashingSpans,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "SlashingSpans",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 106u8, 115u8, 118u8, 52u8, 89u8, 77u8, 246u8, 5u8, 255u8,
+ 204u8, 44u8, 5u8, 66u8, 36u8, 227u8, 252u8, 86u8, 159u8,
+ 186u8, 152u8, 196u8, 21u8, 74u8, 201u8, 133u8, 93u8, 142u8,
+ 191u8, 20u8, 27u8, 218u8, 157u8,
+ ],
+ )
+ }
+ #[doc = " Slashing spans for stash accounts."]
+ pub fn slashing_spans_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::slashing::SlashingSpans,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "SlashingSpans",
+ Vec::new(),
+ [
+ 106u8, 115u8, 118u8, 52u8, 89u8, 77u8, 246u8, 5u8, 255u8,
+ 204u8, 44u8, 5u8, 66u8, 36u8, 227u8, 252u8, 86u8, 159u8,
+ 186u8, 152u8, 196u8, 21u8, 74u8, 201u8, 133u8, 93u8, 142u8,
+ 191u8, 20u8, 27u8, 218u8, 157u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ _1: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::slashing::SpanRecord<
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "SpanSlash",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ &(_0.borrow(), _1.borrow()),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8,
+ 59u8, 184u8, 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8,
+ 225u8, 230u8, 224u8, 163u8, 103u8, 157u8, 100u8, 29u8, 86u8,
+ 167u8, 84u8, 217u8, 109u8, 200u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_staking::slashing::SpanRecord<
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "SpanSlash",
+ Vec::new(),
+ [
+ 160u8, 63u8, 115u8, 190u8, 233u8, 148u8, 75u8, 3u8, 11u8,
+ 59u8, 184u8, 220u8, 205u8, 64u8, 28u8, 190u8, 116u8, 210u8,
+ 225u8, 230u8, 224u8, 163u8, 103u8, 157u8, 100u8, 29u8, 86u8,
+ 167u8, 84u8, 217u8, 109u8, 200u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "CurrentPlannedSession",
+ vec![],
+ [
+ 38u8, 22u8, 56u8, 250u8, 17u8, 154u8, 99u8, 37u8, 155u8,
+ 253u8, 100u8, 117u8, 5u8, 239u8, 31u8, 190u8, 53u8, 241u8,
+ 11u8, 185u8, 163u8, 227u8, 10u8, 77u8, 210u8, 64u8, 156u8,
+ 218u8, 105u8, 16u8, 1u8, 57u8,
+ ],
+ )
+ }
+ #[doc = " Indices of validators that have offended in the active era and whether they are currently"]
+ #[doc = " disabled."]
+ #[doc = ""]
+ #[doc = " This value should be a superset of disabled validators since not all offences lead to the"]
+ #[doc = " validator being disabled (if there was no slash). This is needed to track the percentage of"]
+ #[doc = " validators that have offended in the current era, ensuring a new era is forced if"]
+ #[doc = " `OffendingValidatorsThreshold` is reached. The vec is always kept sorted so that we can find"]
+ #[doc = " whether a given validator has previously offended using binary search. It gets cleared when"]
+ #[doc = " the era ends."]
+ pub fn offending_validators(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(
+ ::core::primitive::u32,
+ ::core::primitive::bool,
+ )>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "OffendingValidators",
+ vec![],
+ [
+ 94u8, 254u8, 0u8, 50u8, 76u8, 232u8, 51u8, 153u8, 118u8,
+ 14u8, 70u8, 101u8, 112u8, 215u8, 173u8, 82u8, 182u8, 104u8,
+ 167u8, 103u8, 187u8, 168u8, 86u8, 16u8, 51u8, 235u8, 51u8,
+ 119u8, 38u8, 154u8, 42u8, 113u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Percent,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Staking",
+ "ChillThreshold",
+ vec![],
+ [
+ 174u8, 165u8, 249u8, 105u8, 24u8, 151u8, 115u8, 166u8, 199u8,
+ 251u8, 28u8, 5u8, 50u8, 95u8, 144u8, 110u8, 220u8, 76u8,
+ 14u8, 23u8, 179u8, 41u8, 11u8, 248u8, 28u8, 154u8, 159u8,
+ 255u8, 156u8, 109u8, 98u8, 92u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " Maximum number of nominations per nominator."]
+ pub fn max_nominations(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Staking",
+ "MaxNominations",
+ [
+ 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 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`,"]
+ #[doc = " `StakingLedger.claimed_rewards`."]
+ #[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.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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 number of nominators rewarded for each validator."]
+ #[doc = ""]
+ #[doc = " For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can"]
+ #[doc = " claim their reward. This used to limit the i/o cost for the nominator payout."]
+ pub fn max_nominator_rewarded_per_validator(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Staking",
+ "MaxNominatorRewardedPerValidator",
+ [
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetKeys {
+ pub keys: runtime_types::kitchensink_runtime::SessionKeys,
+ pub proof: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct PurgeKeys;
+ 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 = "# "]
+ #[doc = "- Complexity: `O(1)`. Actual cost depends on the number of length of"]
+ #[doc = " `T::Keys::key_ids()` which is fixed."]
+ #[doc = "- DbReads: `origin account`, `T::ValidatorIdOf`, `NextKeys`"]
+ #[doc = "- DbWrites: `origin account`, `NextKeys`"]
+ #[doc = "- DbReads per key id: `KeyOwner`"]
+ #[doc = "- DbWrites per key id: `KeyOwner`"]
+ #[doc = "# "]
+ pub fn set_keys(
+ &self,
+ keys: runtime_types::kitchensink_runtime::SessionKeys,
+ proof: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Session",
+ "set_keys",
+ SetKeys { keys, proof },
+ [
+ 19u8, 210u8, 111u8, 216u8, 235u8, 1u8, 119u8, 211u8, 79u8,
+ 9u8, 91u8, 245u8, 109u8, 116u8, 95u8, 223u8, 233u8, 189u8,
+ 185u8, 243u8, 46u8, 178u8, 10u8, 4u8, 231u8, 159u8, 217u8,
+ 59u8, 45u8, 167u8, 207u8, 137u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length"]
+ #[doc = " of `T::Keys::key_ids()` which is fixed."]
+ #[doc = "- DbReads: `T::ValidatorIdOf`, `NextKeys`, `origin account`"]
+ #[doc = "- DbWrites: `NextKeys`, `origin account`"]
+ #[doc = "- DbWrites per key id: `KeyOwner`"]
+ #[doc = "# "]
+ pub fn purge_keys(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Session",
+ "purge_keys",
+ PurgeKeys {},
+ [
+ 200u8, 255u8, 4u8, 213u8, 188u8, 92u8, 99u8, 116u8, 163u8,
+ 152u8, 29u8, 35u8, 133u8, 119u8, 246u8, 44u8, 91u8, 31u8,
+ 145u8, 23u8, 213u8, 64u8, 71u8, 242u8, 207u8, 239u8, 231u8,
+ 37u8, 61u8, 63u8, 190u8, 35u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_session::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for NewSession {
+ const PALLET: &'static str = "Session";
+ const EVENT: &'static str = "NewSession";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The current set of validators."]
+ pub fn validators(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::AccountId32>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "Validators",
+ vec![],
+ [
+ 144u8, 235u8, 200u8, 43u8, 151u8, 57u8, 147u8, 172u8, 201u8,
+ 202u8, 242u8, 96u8, 57u8, 76u8, 124u8, 77u8, 42u8, 113u8,
+ 218u8, 220u8, 230u8, 32u8, 151u8, 152u8, 172u8, 106u8, 60u8,
+ 227u8, 122u8, 118u8, 137u8, 68u8,
+ ],
+ )
+ }
+ #[doc = " Current index of the session."]
+ pub fn current_index(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "CurrentIndex",
+ vec![],
+ [
+ 148u8, 179u8, 159u8, 15u8, 197u8, 95u8, 214u8, 30u8, 209u8,
+ 251u8, 183u8, 231u8, 91u8, 25u8, 181u8, 191u8, 143u8, 252u8,
+ 227u8, 80u8, 159u8, 66u8, 194u8, 67u8, 113u8, 74u8, 111u8,
+ 91u8, 218u8, 187u8, 130u8, 40u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "QueuedChanged",
+ vec![],
+ [
+ 105u8, 140u8, 235u8, 218u8, 96u8, 100u8, 252u8, 10u8, 58u8,
+ 221u8, 244u8, 251u8, 67u8, 91u8, 80u8, 202u8, 152u8, 42u8,
+ 50u8, 113u8, 200u8, 247u8, 59u8, 213u8, 77u8, 195u8, 1u8,
+ 150u8, 220u8, 18u8, 245u8, 46u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ runtime_types::kitchensink_runtime::SessionKeys,
+ )>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "QueuedKeys",
+ vec![],
+ [
+ 57u8, 139u8, 66u8, 116u8, 133u8, 98u8, 66u8, 181u8, 96u8,
+ 190u8, 69u8, 124u8, 158u8, 124u8, 187u8, 164u8, 223u8, 89u8,
+ 209u8, 84u8, 106u8, 127u8, 85u8, 202u8, 130u8, 7u8, 250u8,
+ 163u8, 99u8, 209u8, 225u8, 25u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::core::primitive::u32>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "DisabledValidators",
+ vec![],
+ [
+ 135u8, 22u8, 22u8, 97u8, 82u8, 217u8, 144u8, 141u8, 121u8,
+ 240u8, 189u8, 16u8, 176u8, 88u8, 177u8, 31u8, 20u8, 242u8,
+ 73u8, 104u8, 11u8, 110u8, 214u8, 34u8, 52u8, 217u8, 106u8,
+ 33u8, 174u8, 174u8, 198u8, 84u8,
+ ],
+ )
+ }
+ #[doc = " The next session keys for a validator."]
+ pub fn next_keys(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::kitchensink_runtime::SessionKeys,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "NextKeys",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 246u8, 66u8, 207u8, 19u8, 247u8, 26u8, 110u8, 116u8, 209u8,
+ 77u8, 141u8, 64u8, 128u8, 214u8, 71u8, 104u8, 56u8, 117u8,
+ 10u8, 162u8, 166u8, 137u8, 33u8, 98u8, 110u8, 31u8, 161u8,
+ 116u8, 207u8, 46u8, 82u8, 64u8,
+ ],
+ )
+ }
+ #[doc = " The next session keys for a validator."]
+ pub fn next_keys_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::kitchensink_runtime::SessionKeys,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "NextKeys",
+ Vec::new(),
+ [
+ 246u8, 66u8, 207u8, 19u8, 247u8, 26u8, 110u8, 116u8, 209u8,
+ 77u8, 141u8, 64u8, 128u8, 214u8, 71u8, 104u8, 56u8, 117u8,
+ 10u8, 162u8, 166u8, 137u8, 33u8, 98u8, 110u8, 31u8, 161u8,
+ 116u8, 207u8, 46u8, 82u8, 64u8,
+ ],
+ )
+ }
+ #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."]
+ pub fn key_owner(
+ &self,
+ _0: impl ::std::borrow::Borrow,
+ _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "KeyOwner",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ &(_0.borrow(), _1.borrow()),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8,
+ 58u8, 197u8, 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8,
+ 195u8, 57u8, 53u8, 172u8, 0u8, 148u8, 203u8, 144u8, 149u8,
+ 64u8, 135u8, 254u8, 242u8, 215u8,
+ ],
+ )
+ }
+ #[doc = " The owner of a key. The key is the `KeyTypeId` + the encoded key."]
+ pub fn key_owner_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Session",
+ "KeyOwner",
+ Vec::new(),
+ [
+ 4u8, 91u8, 25u8, 84u8, 250u8, 201u8, 174u8, 129u8, 201u8,
+ 58u8, 197u8, 199u8, 137u8, 240u8, 118u8, 33u8, 99u8, 2u8,
+ 195u8, 57u8, 53u8, 172u8, 0u8, 148u8, 203u8, 144u8, 149u8,
+ 64u8, 135u8, 254u8, 242u8, 215u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod democracy {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Propose {
+ pub proposal: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Second {
+ #[codec(compact)]
+ pub proposal: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vote {
+ #[codec(compact)]
+ pub ref_index: ::core::primitive::u32,
+ pub vote: runtime_types::pallet_democracy::vote::AccountVote<
+ ::core::primitive::u128,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct EmergencyCancel {
+ pub ref_index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ExternalPropose {
+ pub proposal: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ExternalProposeMajority {
+ pub proposal: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ExternalProposeDefault {
+ pub proposal: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct FastTrack {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub voting_period: ::core::primitive::u32,
+ pub delay: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct VetoExternal {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelReferendum {
+ #[codec(compact)]
+ pub ref_index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Delegate {
+ pub to: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub conviction: runtime_types::pallet_democracy::conviction::Conviction,
+ pub balance: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Undelegate;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ClearPublicProposals;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Unlock {
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveVote {
+ pub index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveOtherVote {
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Blacklist {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelProposal {
+ #[codec(compact)]
+ pub prop_index: ::core::primitive::u32,
+ }
+ 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: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "propose",
+ Propose { proposal, value },
+ [
+ 123u8, 3u8, 204u8, 140u8, 194u8, 195u8, 214u8, 39u8, 167u8,
+ 126u8, 45u8, 4u8, 219u8, 17u8, 143u8, 185u8, 29u8, 224u8,
+ 230u8, 68u8, 253u8, 15u8, 170u8, 90u8, 232u8, 123u8, 46u8,
+ 255u8, 168u8, 39u8, 204u8, 63u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "second",
+ Second { proposal },
+ [
+ 59u8, 240u8, 183u8, 218u8, 61u8, 93u8, 184u8, 67u8, 10u8,
+ 4u8, 138u8, 196u8, 168u8, 49u8, 42u8, 69u8, 154u8, 42u8,
+ 90u8, 112u8, 179u8, 69u8, 51u8, 148u8, 159u8, 212u8, 221u8,
+ 226u8, 132u8, 228u8, 51u8, 83u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ vote: runtime_types::pallet_democracy::vote::AccountVote<
+ ::core::primitive::u128,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "vote",
+ Vote { ref_index, vote },
+ [
+ 138u8, 213u8, 229u8, 111u8, 1u8, 191u8, 73u8, 3u8, 145u8,
+ 28u8, 44u8, 88u8, 163u8, 188u8, 129u8, 188u8, 64u8, 15u8,
+ 64u8, 103u8, 250u8, 97u8, 234u8, 188u8, 29u8, 205u8, 51u8,
+ 6u8, 116u8, 58u8, 156u8, 201u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "emergency_cancel",
+ EmergencyCancel { ref_index },
+ [
+ 139u8, 213u8, 133u8, 75u8, 34u8, 206u8, 124u8, 245u8, 35u8,
+ 237u8, 132u8, 92u8, 49u8, 167u8, 117u8, 80u8, 188u8, 93u8,
+ 198u8, 237u8, 132u8, 77u8, 195u8, 65u8, 29u8, 37u8, 86u8,
+ 74u8, 214u8, 119u8, 71u8, 204u8,
+ ],
+ )
+ }
+ #[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: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "external_propose",
+ ExternalPropose { proposal },
+ [
+ 164u8, 193u8, 14u8, 122u8, 105u8, 232u8, 20u8, 194u8, 99u8,
+ 227u8, 36u8, 105u8, 218u8, 146u8, 16u8, 208u8, 56u8, 62u8,
+ 100u8, 65u8, 35u8, 33u8, 51u8, 208u8, 17u8, 43u8, 223u8,
+ 198u8, 202u8, 16u8, 56u8, 75u8,
+ ],
+ )
+ }
+ #[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: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "external_propose_majority",
+ ExternalProposeMajority { proposal },
+ [
+ 129u8, 124u8, 147u8, 253u8, 69u8, 115u8, 230u8, 186u8, 155u8,
+ 4u8, 220u8, 103u8, 28u8, 132u8, 115u8, 153u8, 196u8, 88u8,
+ 9u8, 130u8, 129u8, 234u8, 75u8, 96u8, 202u8, 216u8, 145u8,
+ 189u8, 231u8, 101u8, 127u8, 11u8,
+ ],
+ )
+ }
+ #[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: runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "external_propose_default",
+ ExternalProposeDefault { proposal },
+ [
+ 96u8, 15u8, 108u8, 208u8, 141u8, 247u8, 4u8, 73u8, 2u8, 30u8,
+ 231u8, 40u8, 184u8, 250u8, 42u8, 161u8, 248u8, 45u8, 217u8,
+ 50u8, 53u8, 13u8, 181u8, 214u8, 136u8, 51u8, 93u8, 95u8,
+ 165u8, 3u8, 83u8, 190u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::H256,
+ voting_period: ::core::primitive::u32,
+ delay: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "fast_track",
+ FastTrack {
+ proposal_hash,
+ voting_period,
+ delay,
+ },
+ [
+ 125u8, 209u8, 107u8, 120u8, 93u8, 205u8, 129u8, 147u8, 254u8,
+ 126u8, 45u8, 126u8, 39u8, 0u8, 56u8, 14u8, 233u8, 49u8,
+ 245u8, 220u8, 156u8, 10u8, 252u8, 31u8, 102u8, 90u8, 163u8,
+ 236u8, 178u8, 85u8, 13u8, 24u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "veto_external",
+ VetoExternal { proposal_hash },
+ [
+ 209u8, 18u8, 18u8, 103u8, 186u8, 160u8, 214u8, 124u8, 150u8,
+ 207u8, 112u8, 90u8, 84u8, 197u8, 95u8, 157u8, 165u8, 65u8,
+ 109u8, 101u8, 75u8, 201u8, 41u8, 149u8, 75u8, 154u8, 37u8,
+ 178u8, 239u8, 121u8, 124u8, 23u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "cancel_referendum",
+ CancelReferendum { ref_index },
+ [
+ 51u8, 25u8, 25u8, 251u8, 236u8, 115u8, 130u8, 230u8, 72u8,
+ 186u8, 119u8, 71u8, 165u8, 137u8, 55u8, 167u8, 187u8, 128u8,
+ 55u8, 8u8, 212u8, 139u8, 245u8, 232u8, 103u8, 136u8, 229u8,
+ 113u8, 125u8, 36u8, 1u8, 149u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ conviction: runtime_types::pallet_democracy::conviction::Conviction,
+ balance: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "delegate",
+ Delegate {
+ to,
+ conviction,
+ balance,
+ },
+ [
+ 247u8, 226u8, 242u8, 221u8, 47u8, 161u8, 91u8, 223u8, 6u8,
+ 79u8, 238u8, 205u8, 41u8, 188u8, 140u8, 56u8, 181u8, 248u8,
+ 102u8, 10u8, 127u8, 166u8, 90u8, 187u8, 13u8, 124u8, 209u8,
+ 117u8, 16u8, 209u8, 74u8, 29u8,
+ ],
+ )
+ }
+ #[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::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "undelegate",
+ Undelegate {},
+ [
+ 165u8, 40u8, 183u8, 209u8, 57u8, 153u8, 111u8, 29u8, 114u8,
+ 109u8, 107u8, 235u8, 97u8, 61u8, 53u8, 155u8, 44u8, 245u8,
+ 28u8, 220u8, 56u8, 134u8, 43u8, 122u8, 248u8, 156u8, 191u8,
+ 154u8, 4u8, 121u8, 152u8, 153u8,
+ ],
+ )
+ }
+ #[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::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "clear_public_proposals",
+ ClearPublicProposals {},
+ [
+ 59u8, 126u8, 254u8, 223u8, 252u8, 225u8, 75u8, 185u8, 188u8,
+ 181u8, 42u8, 179u8, 211u8, 73u8, 12u8, 141u8, 243u8, 197u8,
+ 46u8, 130u8, 215u8, 196u8, 225u8, 88u8, 48u8, 199u8, 231u8,
+ 249u8, 195u8, 53u8, 184u8, 204u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "unlock",
+ Unlock { target },
+ [
+ 227u8, 6u8, 154u8, 150u8, 253u8, 167u8, 142u8, 6u8, 147u8,
+ 24u8, 124u8, 51u8, 101u8, 185u8, 184u8, 170u8, 6u8, 223u8,
+ 29u8, 167u8, 73u8, 31u8, 179u8, 60u8, 156u8, 244u8, 192u8,
+ 233u8, 79u8, 99u8, 248u8, 126u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "remove_vote",
+ RemoveVote { index },
+ [
+ 148u8, 120u8, 14u8, 172u8, 81u8, 152u8, 159u8, 178u8, 106u8,
+ 244u8, 36u8, 98u8, 120u8, 189u8, 213u8, 93u8, 119u8, 156u8,
+ 112u8, 34u8, 241u8, 72u8, 206u8, 113u8, 212u8, 161u8, 164u8,
+ 126u8, 122u8, 82u8, 160u8, 74u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "remove_other_vote",
+ RemoveOtherVote { target, index },
+ [
+ 251u8, 245u8, 79u8, 229u8, 3u8, 107u8, 66u8, 202u8, 148u8,
+ 31u8, 6u8, 236u8, 156u8, 202u8, 197u8, 107u8, 100u8, 60u8,
+ 255u8, 213u8, 222u8, 209u8, 249u8, 61u8, 209u8, 215u8, 82u8,
+ 73u8, 25u8, 73u8, 161u8, 24u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::H256,
+ maybe_ref_index: ::core::option::Option<::core::primitive::u32>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "blacklist",
+ Blacklist {
+ proposal_hash,
+ maybe_ref_index,
+ },
+ [
+ 48u8, 144u8, 81u8, 164u8, 54u8, 111u8, 197u8, 134u8, 6u8,
+ 98u8, 121u8, 179u8, 254u8, 191u8, 204u8, 212u8, 84u8, 255u8,
+ 86u8, 110u8, 225u8, 130u8, 26u8, 65u8, 133u8, 56u8, 231u8,
+ 15u8, 245u8, 137u8, 146u8, 242u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Democracy",
+ "cancel_proposal",
+ CancelProposal { prop_index },
+ [
+ 179u8, 3u8, 198u8, 244u8, 241u8, 124u8, 205u8, 58u8, 100u8,
+ 80u8, 177u8, 254u8, 98u8, 220u8, 189u8, 63u8, 229u8, 60u8,
+ 157u8, 83u8, 142u8, 6u8, 236u8, 183u8, 193u8, 235u8, 253u8,
+ 126u8, 153u8, 185u8, 74u8, 117u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_democracy::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion has been proposed by a public account."]
+ pub struct Proposed {
+ pub proposal_index: ::core::primitive::u32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Proposed {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Proposed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A public proposal has been tabled for referendum vote."]
+ pub struct Tabled {
+ pub proposal_index: ::core::primitive::u32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Tabled {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Tabled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An external proposal has been tabled."]
+ pub struct ExternalTabled;
+ impl ::subxt::events::StaticEvent for ExternalTabled {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "ExternalTabled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A referendum has begun."]
+ pub struct Started {
+ pub ref_index: ::core::primitive::u32,
+ pub threshold:
+ runtime_types::pallet_democracy::vote_threshold::VoteThreshold,
+ }
+ impl ::subxt::events::StaticEvent for Started {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Started";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal has been approved by referendum."]
+ pub struct Passed {
+ pub ref_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Passed {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Passed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal has been rejected by referendum."]
+ pub struct NotPassed {
+ pub ref_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for NotPassed {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "NotPassed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A referendum has been cancelled."]
+ pub struct Cancelled {
+ pub ref_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Cancelled {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Cancelled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has delegated their vote to another account."]
+ pub struct Delegated {
+ pub who: ::subxt::utils::AccountId32,
+ pub target: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Delegated {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Delegated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has cancelled a previous delegation operation."]
+ pub struct Undelegated {
+ pub account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Undelegated {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Undelegated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An external proposal has been vetoed."]
+ pub struct Vetoed {
+ pub who: ::subxt::utils::AccountId32,
+ pub proposal_hash: ::subxt::utils::H256,
+ pub until: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Vetoed {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Vetoed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal_hash has been blacklisted permanently."]
+ pub struct Blacklisted {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Blacklisted {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Blacklisted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has voted in a referendum"]
+ pub struct Voted {
+ pub voter: ::subxt::utils::AccountId32,
+ pub ref_index: ::core::primitive::u32,
+ pub vote: runtime_types::pallet_democracy::vote::AccountVote<
+ ::core::primitive::u128,
+ >,
+ }
+ impl ::subxt::events::StaticEvent for Voted {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Voted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An account has secconded a proposal"]
+ pub struct Seconded {
+ pub seconder: ::subxt::utils::AccountId32,
+ pub prop_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Seconded {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "Seconded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal got canceled."]
+ pub struct ProposalCanceled {
+ pub prop_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for ProposalCanceled {
+ const PALLET: &'static str = "Democracy";
+ const EVENT: &'static str = "ProposalCanceled";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The number of (public) proposals that have been made so far."]
+ pub fn public_prop_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "PublicPropCount",
+ vec![],
+ [
+ 91u8, 14u8, 171u8, 94u8, 37u8, 157u8, 46u8, 157u8, 254u8,
+ 13u8, 68u8, 144u8, 23u8, 146u8, 128u8, 159u8, 9u8, 174u8,
+ 74u8, 174u8, 218u8, 197u8, 23u8, 235u8, 152u8, 226u8, 216u8,
+ 4u8, 120u8, 121u8, 27u8, 138u8,
+ ],
+ )
+ }
+ #[doc = " The public proposals. Unsorted. The second item is the proposal."]
+ pub fn public_props(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<(
+ ::core::primitive::u32,
+ runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ::subxt::utils::AccountId32,
+ )>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "PublicProps",
+ vec![],
+ [
+ 63u8, 172u8, 211u8, 85u8, 27u8, 14u8, 86u8, 49u8, 133u8, 5u8,
+ 132u8, 189u8, 138u8, 137u8, 219u8, 37u8, 209u8, 49u8, 172u8,
+ 86u8, 240u8, 235u8, 42u8, 201u8, 203u8, 12u8, 122u8, 225u8,
+ 0u8, 109u8, 205u8, 103u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ ::core::primitive::u128,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "DepositOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8,
+ 119u8, 123u8, 235u8, 252u8, 176u8, 190u8, 162u8, 236u8, 45u8,
+ 237u8, 125u8, 98u8, 176u8, 184u8, 160u8, 8u8, 181u8, 213u8,
+ 65u8, 14u8, 84u8, 200u8, 64u8,
+ ],
+ )
+ }
+ #[doc = " Those who have locked a deposit."]
+ #[doc = ""]
+ #[doc = " TWOX-NOTE: Safe, as increasing integer keys are safe."]
+ pub fn deposit_of_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ ::core::primitive::u128,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "DepositOf",
+ Vec::new(),
+ [
+ 9u8, 219u8, 11u8, 58u8, 17u8, 194u8, 248u8, 154u8, 135u8,
+ 119u8, 123u8, 235u8, 252u8, 176u8, 190u8, 162u8, 236u8, 45u8,
+ 237u8, 125u8, 98u8, 176u8, 184u8, 160u8, 8u8, 181u8, 213u8,
+ 65u8, 14u8, 84u8, 200u8, 64u8,
+ ],
+ )
+ }
+ #[doc = " The next free referendum index, aka the number of referenda started so far."]
+ pub fn referendum_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "ReferendumCount",
+ vec![],
+ [
+ 153u8, 210u8, 106u8, 244u8, 156u8, 70u8, 124u8, 251u8, 123u8,
+ 75u8, 7u8, 189u8, 199u8, 145u8, 95u8, 119u8, 137u8, 11u8,
+ 240u8, 160u8, 151u8, 248u8, 229u8, 231u8, 89u8, 222u8, 18u8,
+ 237u8, 144u8, 78u8, 99u8, 58u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "LowestUnbaked",
+ vec![],
+ [
+ 4u8, 51u8, 108u8, 11u8, 48u8, 165u8, 19u8, 251u8, 182u8,
+ 76u8, 163u8, 73u8, 227u8, 2u8, 212u8, 74u8, 128u8, 27u8,
+ 165u8, 164u8, 111u8, 22u8, 209u8, 190u8, 103u8, 7u8, 116u8,
+ 16u8, 160u8, 144u8, 123u8, 64u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_democracy::types::ReferendumInfo<
+ ::core::primitive::u32,
+ runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "ReferendumInfoOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8,
+ 150u8, 29u8, 138u8, 142u8, 38u8, 255u8, 216u8, 139u8, 93u8,
+ 56u8, 148u8, 196u8, 169u8, 168u8, 144u8, 193u8, 200u8, 187u8,
+ 5u8, 141u8, 201u8, 254u8, 248u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_democracy::types::ReferendumInfo<
+ ::core::primitive::u32,
+ runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "ReferendumInfoOf",
+ Vec::new(),
+ [
+ 167u8, 58u8, 230u8, 197u8, 185u8, 56u8, 181u8, 32u8, 81u8,
+ 150u8, 29u8, 138u8, 142u8, 38u8, 255u8, 216u8, 139u8, 93u8,
+ 56u8, 148u8, 196u8, 169u8, 168u8, 144u8, 193u8, 200u8, 187u8,
+ 5u8, 141u8, 201u8, 254u8, 248u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_democracy::vote::Voting<
+ ::core::primitive::u128,
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "VotingOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8,
+ 48u8, 30u8, 88u8, 233u8, 196u8, 33u8, 119u8, 160u8, 201u8,
+ 29u8, 183u8, 88u8, 67u8, 219u8, 137u8, 6u8, 195u8, 11u8,
+ 63u8, 162u8, 181u8, 82u8, 243u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_democracy::vote::Voting<
+ ::core::primitive::u128,
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "VotingOf",
+ Vec::new(),
+ [
+ 125u8, 121u8, 167u8, 170u8, 18u8, 194u8, 183u8, 38u8, 176u8,
+ 48u8, 30u8, 88u8, 233u8, 196u8, 33u8, 119u8, 160u8, 201u8,
+ 29u8, 183u8, 88u8, 67u8, 219u8, 137u8, 6u8, 195u8, 11u8,
+ 63u8, 162u8, 181u8, 82u8, 243u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "LastTabledWasExternal",
+ vec![],
+ [
+ 3u8, 67u8, 106u8, 1u8, 89u8, 204u8, 4u8, 145u8, 121u8, 44u8,
+ 34u8, 76u8, 18u8, 206u8, 65u8, 214u8, 222u8, 82u8, 31u8,
+ 223u8, 144u8, 169u8, 17u8, 6u8, 138u8, 36u8, 113u8, 155u8,
+ 241u8, 106u8, 189u8, 218u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::frame_support::traits::preimages::Bounded<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ runtime_types::pallet_democracy::vote_threshold::VoteThreshold,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "NextExternal",
+ vec![],
+ [
+ 213u8, 36u8, 235u8, 75u8, 153u8, 33u8, 140u8, 121u8, 191u8,
+ 197u8, 17u8, 57u8, 234u8, 67u8, 81u8, 55u8, 123u8, 179u8,
+ 207u8, 124u8, 238u8, 147u8, 243u8, 126u8, 200u8, 2u8, 16u8,
+ 143u8, 165u8, 143u8, 159u8, 93u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u32,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "Blacklist",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8,
+ 224u8, 109u8, 207u8, 44u8, 181u8, 78u8, 17u8, 254u8, 183u8,
+ 199u8, 241u8, 49u8, 90u8, 101u8, 168u8, 46u8, 89u8, 253u8,
+ 155u8, 38u8, 183u8, 112u8, 35u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u32,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "Blacklist",
+ Vec::new(),
+ [
+ 8u8, 227u8, 185u8, 179u8, 192u8, 92u8, 171u8, 125u8, 237u8,
+ 224u8, 109u8, 207u8, 44u8, 181u8, 78u8, 17u8, 254u8, 183u8,
+ 199u8, 241u8, 49u8, 90u8, 101u8, 168u8, 46u8, 89u8, 253u8,
+ 155u8, 38u8, 183u8, 112u8, 35u8,
+ ],
+ )
+ }
+ #[doc = " Record of all proposals that have been subject to emergency cancellation."]
+ pub fn cancellations(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "Cancellations",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8,
+ 186u8, 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8,
+ 47u8, 7u8, 17u8, 89u8, 169u8, 166u8, 236u8, 101u8, 68u8,
+ 54u8, 114u8, 141u8, 177u8, 135u8,
+ ],
+ )
+ }
+ #[doc = " Record of all proposals that have been subject to emergency cancellation."]
+ pub fn cancellations_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Democracy",
+ "Cancellations",
+ Vec::new(),
+ [
+ 154u8, 36u8, 172u8, 46u8, 65u8, 218u8, 30u8, 151u8, 173u8,
+ 186u8, 166u8, 79u8, 35u8, 226u8, 94u8, 200u8, 67u8, 44u8,
+ 47u8, 7u8, 17u8, 89u8, 169u8, 166u8, 236u8, 101u8, 68u8,
+ 54u8, 114u8, 141u8, 177u8, 135u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Democracy",
+ "EnactmentPeriod",
+ [
+ 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 often (in blocks) new public referenda are launched."]
+ pub fn launch_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Democracy",
+ "LaunchPeriod",
+ [
+ 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 often (in blocks) to check for new votes."]
+ pub fn voting_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Democracy",
+ "VotingPeriod",
+ [
+ 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 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Democracy",
+ "VoteLockingPeriod",
+ [
+ 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 to be used as a deposit for a public referendum proposal."]
+ pub fn minimum_deposit(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Democracy",
+ "FastTrackVotingPeriod",
+ [
+ 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 = " Period in blocks where an external proposal may not be re-submitted after being vetoed."]
+ pub fn cooloff_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Democracy",
+ "CooloffPeriod",
+ [
+ 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 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetMembers {
+ pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub prime: ::core::option::Option<::subxt::utils::AccountId32>,
+ pub old_count: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Execute {
+ pub proposal:
+ ::std::boxed::Box,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Propose {
+ #[codec(compact)]
+ pub threshold: ::core::primitive::u32,
+ pub proposal:
+ ::std::boxed::Box,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vote {
+ pub proposal: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ pub approve: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CloseOldWeight {
+ pub proposal_hash: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ #[codec(compact)]
+ pub proposal_weight_bound: runtime_types::sp_weights::OldWeight,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct DisapproveProposal {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Close {
+ pub proposal_hash: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ 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 = "Requires root origin."]
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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)"]
+ #[doc = "- DB:"]
+ #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"]
+ #[doc = " members"]
+ #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"]
+ #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"]
+ #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"]
+ #[doc = "# "]
+ pub fn set_members(
+ &self,
+ new_members: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ prime: ::core::option::Option<::subxt::utils::AccountId32>,
+ old_count: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "set_members",
+ SetMembers {
+ new_members,
+ prime,
+ old_count,
+ },
+ [
+ 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8,
+ 114u8, 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8,
+ 126u8, 126u8, 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8,
+ 222u8, 90u8, 1u8, 2u8, 234u8,
+ ],
+ )
+ }
+ #[doc = "Dispatch a proposal from a member using the `Member` origin."]
+ #[doc = ""]
+ #[doc = "Origin must be a member of the collective."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "## Weight"]
+ #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"]
+ #[doc = " `proposal`"]
+ #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"]
+ #[doc = "- 1 event"]
+ #[doc = "# "]
+ pub fn execute(
+ &self,
+ proposal: runtime_types::kitchensink_runtime::RuntimeCall,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "execute",
+ Execute {
+ proposal: ::std::boxed::Box::new(proposal),
+ length_bound,
+ },
+ [
+ 11u8, 230u8, 151u8, 156u8, 17u8, 226u8, 224u8, 243u8, 34u8,
+ 47u8, 174u8, 194u8, 108u8, 108u8, 225u8, 234u8, 208u8, 246u8,
+ 234u8, 1u8, 163u8, 25u8, 151u8, 208u8, 10u8, 87u8, 0u8, 47u8,
+ 171u8, 217u8, 193u8, 141u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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`)"]
+ #[doc = "- DB:"]
+ #[doc = " - 1 storage read `is_member` (codec `O(M)`)"]
+ #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"]
+ #[doc = " - DB accesses influenced by `threshold`:"]
+ #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"]
+ #[doc = " - OR proposal insertion (`threshold <= 2`)"]
+ #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"]
+ #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"]
+ #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"]
+ #[doc = " - 1 storage write `Voting` (codec `O(M)`)"]
+ #[doc = " - 1 event"]
+ #[doc = "# "]
+ pub fn propose(
+ &self,
+ threshold: ::core::primitive::u32,
+ proposal: runtime_types::kitchensink_runtime::RuntimeCall,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "propose",
+ Propose {
+ threshold,
+ proposal: ::std::boxed::Box::new(proposal),
+ length_bound,
+ },
+ [
+ 86u8, 118u8, 118u8, 134u8, 244u8, 21u8, 74u8, 68u8, 219u8,
+ 175u8, 153u8, 175u8, 75u8, 118u8, 200u8, 66u8, 152u8, 203u8,
+ 5u8, 224u8, 152u8, 129u8, 167u8, 208u8, 225u8, 247u8, 119u8,
+ 116u8, 33u8, 68u8, 75u8, 245u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"]
+ #[doc = "- DB:"]
+ #[doc = " - 1 storage read `Members` (codec `O(M)`)"]
+ #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"]
+ #[doc = "- 1 event"]
+ #[doc = "# "]
+ pub fn vote(
+ &self,
+ proposal: ::subxt::utils::H256,
+ index: ::core::primitive::u32,
+ approve: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "vote",
+ Vote {
+ proposal,
+ index,
+ approve,
+ },
+ [
+ 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8,
+ 100u8, 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8,
+ 80u8, 134u8, 14u8, 42u8, 248u8, 205u8, 68u8, 92u8, 79u8,
+ 11u8, 113u8, 115u8, 157u8, 100u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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)"]
+ #[doc = "- DB:"]
+ #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"]
+ #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"]
+ #[doc = " `O(P2)`)"]
+ #[doc = " - any mutations done while executing `proposal` (`P1`)"]
+ #[doc = "- up to 3 events"]
+ #[doc = "# "]
+ pub fn close_old_weight(
+ &self,
+ proposal_hash: ::subxt::utils::H256,
+ index: ::core::primitive::u32,
+ proposal_weight_bound: runtime_types::sp_weights::OldWeight,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "close_old_weight",
+ CloseOldWeight {
+ proposal_hash,
+ index,
+ proposal_weight_bound,
+ length_bound,
+ },
+ [
+ 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8,
+ 234u8, 109u8, 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8,
+ 13u8, 123u8, 227u8, 20u8, 186u8, 207u8, 12u8, 47u8, 87u8,
+ 252u8, 244u8, 172u8, 60u8, 206u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "Complexity: O(P) where P is the number of max proposals"]
+ #[doc = "DB Weight:"]
+ #[doc = "* Reads: Proposals"]
+ #[doc = "* Writes: Voting, Proposals, ProposalOf"]
+ #[doc = "# "]
+ pub fn disapprove_proposal(
+ &self,
+ proposal_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "disapprove_proposal",
+ DisapproveProposal { proposal_hash },
+ [
+ 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8,
+ 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8,
+ 125u8, 199u8, 51u8, 17u8, 225u8, 133u8, 38u8, 120u8, 76u8,
+ 164u8, 5u8, 194u8, 201u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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)"]
+ #[doc = "- DB:"]
+ #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"]
+ #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"]
+ #[doc = " `O(P2)`)"]
+ #[doc = " - any mutations done while executing `proposal` (`P1`)"]
+ #[doc = "- up to 3 events"]
+ #[doc = "# "]
+ pub fn close(
+ &self,
+ proposal_hash: ::subxt::utils::H256,
+ index: ::core::primitive::u32,
+ proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Council",
+ "close",
+ Close {
+ proposal_hash,
+ index,
+ proposal_weight_bound,
+ length_bound,
+ },
+ [
+ 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8,
+ 16u8, 80u8, 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8,
+ 86u8, 32u8, 125u8, 16u8, 116u8, 185u8, 45u8, 20u8, 76u8,
+ 148u8, 206u8, 163u8, 154u8, 30u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_collective::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"]
+ #[doc = "`MemberCount`)."]
+ pub struct Proposed {
+ pub account: ::subxt::utils::AccountId32,
+ pub proposal_index: ::core::primitive::u32,
+ pub proposal_hash: ::subxt::utils::H256,
+ pub threshold: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Proposed {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "Proposed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub proposal_hash: ::subxt::utils::H256,
+ pub voted: ::core::primitive::bool,
+ pub yes: ::core::primitive::u32,
+ pub no: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Voted {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "Voted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion was approved by the required threshold."]
+ pub struct Approved {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Approved {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "Approved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion was not approved by the required threshold."]
+ pub struct Disapproved {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Disapproved {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "Disapproved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion was executed; result will be `Ok` if it returned without error."]
+ pub struct Executed {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for Executed {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "Executed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A single member did some action; result will be `Ok` if it returned without error."]
+ pub struct MemberExecuted {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for MemberExecuted {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "MemberExecuted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal was closed because its threshold was reached or after its duration was up."]
+ pub struct Closed {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub yes: ::core::primitive::u32,
+ pub no: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Closed {
+ const PALLET: &'static str = "Council";
+ const EVENT: &'static str = "Closed";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The hashes of the active proposals."]
+ pub fn proposals(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::H256,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "Proposals",
+ vec![],
+ [
+ 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8,
+ 96u8, 249u8, 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8,
+ 237u8, 231u8, 238u8, 60u8, 26u8, 225u8, 19u8, 203u8, 213u8,
+ 220u8, 114u8, 217u8, 100u8, 27u8,
+ ],
+ )
+ }
+ #[doc = " Actual proposal for a given hash, if it's current."]
+ pub fn proposal_of(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "ProposalOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 7u8, 48u8, 66u8, 129u8, 189u8, 239u8, 162u8, 148u8, 206u8,
+ 226u8, 56u8, 83u8, 105u8, 85u8, 12u8, 168u8, 84u8, 118u8,
+ 7u8, 7u8, 100u8, 5u8, 245u8, 209u8, 143u8, 242u8, 48u8, 78u8,
+ 157u8, 98u8, 42u8, 127u8,
+ ],
+ )
+ }
+ #[doc = " Actual proposal for a given hash, if it's current."]
+ pub fn proposal_of_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "ProposalOf",
+ Vec::new(),
+ [
+ 7u8, 48u8, 66u8, 129u8, 189u8, 239u8, 162u8, 148u8, 206u8,
+ 226u8, 56u8, 83u8, 105u8, 85u8, 12u8, 168u8, 84u8, 118u8,
+ 7u8, 7u8, 100u8, 5u8, 245u8, 209u8, 143u8, 242u8, 48u8, 78u8,
+ 157u8, 98u8, 42u8, 127u8,
+ ],
+ )
+ }
+ #[doc = " Votes on a given proposal, if it is ongoing."]
+ pub fn voting(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_collective::Votes<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "Voting",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8,
+ 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8,
+ 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8,
+ 217u8, 240u8, 230u8, 107u8, 221u8,
+ ],
+ )
+ }
+ #[doc = " Votes on a given proposal, if it is ongoing."]
+ pub fn voting_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_collective::Votes<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "Voting",
+ Vec::new(),
+ [
+ 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8,
+ 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8,
+ 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8,
+ 217u8, 240u8, 230u8, 107u8, 221u8,
+ ],
+ )
+ }
+ #[doc = " Proposals so far."]
+ pub fn proposal_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "ProposalCount",
+ vec![],
+ [
+ 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8,
+ 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8,
+ 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8,
+ 177u8, 127u8, 160u8, 34u8, 70u8,
+ ],
+ )
+ }
+ #[doc = " The current members of the collective. This is stored sorted (just by value)."]
+ pub fn members(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::AccountId32>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "Members",
+ vec![],
+ [
+ 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8,
+ 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8,
+ 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8,
+ 71u8, 125u8, 56u8, 129u8, 222u8,
+ ],
+ )
+ }
+ #[doc = " The prime member that helps determine the default vote behavior in case of absentations."]
+ pub fn prime(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Council",
+ "Prime",
+ vec![],
+ [
+ 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8,
+ 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8,
+ 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8,
+ 158u8, 159u8, 217u8, 244u8, 158u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod technical_committee {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetMembers {
+ pub new_members: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub prime: ::core::option::Option<::subxt::utils::AccountId32>,
+ pub old_count: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Execute {
+ pub proposal:
+ ::std::boxed::Box,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Propose {
+ #[codec(compact)]
+ pub threshold: ::core::primitive::u32,
+ pub proposal:
+ ::std::boxed::Box,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vote {
+ pub proposal: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ pub approve: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CloseOldWeight {
+ pub proposal_hash: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ #[codec(compact)]
+ pub proposal_weight_bound: runtime_types::sp_weights::OldWeight,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct DisapproveProposal {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Close {
+ pub proposal_hash: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ pub proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight,
+ #[codec(compact)]
+ pub length_bound: ::core::primitive::u32,
+ }
+ 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 = "Requires root origin."]
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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)"]
+ #[doc = "- DB:"]
+ #[doc = " - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the"]
+ #[doc = " members"]
+ #[doc = " - 1 storage read (codec `O(P)`) for reading the proposals"]
+ #[doc = " - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal"]
+ #[doc = " - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one"]
+ #[doc = "# "]
+ pub fn set_members(
+ &self,
+ new_members: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ prime: ::core::option::Option<::subxt::utils::AccountId32>,
+ old_count: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "set_members",
+ SetMembers {
+ new_members,
+ prime,
+ old_count,
+ },
+ [
+ 196u8, 103u8, 123u8, 125u8, 226u8, 177u8, 126u8, 37u8, 160u8,
+ 114u8, 34u8, 136u8, 219u8, 84u8, 199u8, 94u8, 242u8, 20u8,
+ 126u8, 126u8, 166u8, 190u8, 198u8, 33u8, 162u8, 113u8, 237u8,
+ 222u8, 90u8, 1u8, 2u8, 234u8,
+ ],
+ )
+ }
+ #[doc = "Dispatch a proposal from a member using the `Member` origin."]
+ #[doc = ""]
+ #[doc = "Origin must be a member of the collective."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "## Weight"]
+ #[doc = "- `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching"]
+ #[doc = " `proposal`"]
+ #[doc = "- DB: 1 read (codec `O(M)`) + DB access of `proposal`"]
+ #[doc = "- 1 event"]
+ #[doc = "# "]
+ pub fn execute(
+ &self,
+ proposal: runtime_types::kitchensink_runtime::RuntimeCall,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "execute",
+ Execute {
+ proposal: ::std::boxed::Box::new(proposal),
+ length_bound,
+ },
+ [
+ 11u8, 230u8, 151u8, 156u8, 17u8, 226u8, 224u8, 243u8, 34u8,
+ 47u8, 174u8, 194u8, 108u8, 108u8, 225u8, 234u8, 208u8, 246u8,
+ 234u8, 1u8, 163u8, 25u8, 151u8, 208u8, 10u8, 87u8, 0u8, 47u8,
+ 171u8, 217u8, 193u8, 141u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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`)"]
+ #[doc = "- DB:"]
+ #[doc = " - 1 storage read `is_member` (codec `O(M)`)"]
+ #[doc = " - 1 storage read `ProposalOf::contains_key` (codec `O(1)`)"]
+ #[doc = " - DB accesses influenced by `threshold`:"]
+ #[doc = " - EITHER storage accesses done by `proposal` (`threshold < 2`)"]
+ #[doc = " - OR proposal insertion (`threshold <= 2`)"]
+ #[doc = " - 1 storage mutation `Proposals` (codec `O(P2)`)"]
+ #[doc = " - 1 storage mutation `ProposalCount` (codec `O(1)`)"]
+ #[doc = " - 1 storage write `ProposalOf` (codec `O(B)`)"]
+ #[doc = " - 1 storage write `Voting` (codec `O(M)`)"]
+ #[doc = " - 1 event"]
+ #[doc = "# "]
+ pub fn propose(
+ &self,
+ threshold: ::core::primitive::u32,
+ proposal: runtime_types::kitchensink_runtime::RuntimeCall,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "propose",
+ Propose {
+ threshold,
+ proposal: ::std::boxed::Box::new(proposal),
+ length_bound,
+ },
+ [
+ 86u8, 118u8, 118u8, 134u8, 244u8, 21u8, 74u8, 68u8, 219u8,
+ 175u8, 153u8, 175u8, 75u8, 118u8, 200u8, 66u8, 152u8, 203u8,
+ 5u8, 224u8, 152u8, 129u8, 167u8, 208u8, 225u8, 247u8, 119u8,
+ 116u8, 33u8, 68u8, 75u8, 245u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[doc = "- `O(M)` where `M` is members-count (code- and governance-bounded)"]
+ #[doc = "- DB:"]
+ #[doc = " - 1 storage read `Members` (codec `O(M)`)"]
+ #[doc = " - 1 storage mutation `Voting` (codec `O(M)`)"]
+ #[doc = "- 1 event"]
+ #[doc = "# "]
+ pub fn vote(
+ &self,
+ proposal: ::subxt::utils::H256,
+ index: ::core::primitive::u32,
+ approve: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "vote",
+ Vote {
+ proposal,
+ index,
+ approve,
+ },
+ [
+ 108u8, 46u8, 180u8, 148u8, 145u8, 24u8, 173u8, 56u8, 36u8,
+ 100u8, 216u8, 43u8, 178u8, 202u8, 26u8, 136u8, 93u8, 84u8,
+ 80u8, 134u8, 14u8, 42u8, 248u8, 205u8, 68u8, 92u8, 79u8,
+ 11u8, 113u8, 115u8, 157u8, 100u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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)"]
+ #[doc = "- DB:"]
+ #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"]
+ #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"]
+ #[doc = " `O(P2)`)"]
+ #[doc = " - any mutations done while executing `proposal` (`P1`)"]
+ #[doc = "- up to 3 events"]
+ #[doc = "# "]
+ pub fn close_old_weight(
+ &self,
+ proposal_hash: ::subxt::utils::H256,
+ index: ::core::primitive::u32,
+ proposal_weight_bound: runtime_types::sp_weights::OldWeight,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "close_old_weight",
+ CloseOldWeight {
+ proposal_hash,
+ index,
+ proposal_weight_bound,
+ length_bound,
+ },
+ [
+ 133u8, 219u8, 90u8, 40u8, 102u8, 95u8, 4u8, 199u8, 45u8,
+ 234u8, 109u8, 17u8, 162u8, 63u8, 102u8, 186u8, 95u8, 182u8,
+ 13u8, 123u8, 227u8, 20u8, 186u8, 207u8, 12u8, 47u8, 87u8,
+ 252u8, 244u8, 172u8, 60u8, 206u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "Complexity: O(P) where P is the number of max proposals"]
+ #[doc = "DB Weight:"]
+ #[doc = "* Reads: Proposals"]
+ #[doc = "* Writes: Voting, Proposals, ProposalOf"]
+ #[doc = "# "]
+ pub fn disapprove_proposal(
+ &self,
+ proposal_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "disapprove_proposal",
+ DisapproveProposal { proposal_hash },
+ [
+ 25u8, 123u8, 1u8, 8u8, 74u8, 37u8, 3u8, 40u8, 97u8, 37u8,
+ 175u8, 224u8, 72u8, 155u8, 123u8, 109u8, 104u8, 43u8, 91u8,
+ 125u8, 199u8, 51u8, 17u8, 225u8, 133u8, 38u8, 120u8, 76u8,
+ 164u8, 5u8, 194u8, 201u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "## Weight"]
+ #[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)"]
+ #[doc = "- DB:"]
+ #[doc = " - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)"]
+ #[doc = " - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec"]
+ #[doc = " `O(P2)`)"]
+ #[doc = " - any mutations done while executing `proposal` (`P1`)"]
+ #[doc = "- up to 3 events"]
+ #[doc = "# "]
+ pub fn close(
+ &self,
+ proposal_hash: ::subxt::utils::H256,
+ index: ::core::primitive::u32,
+ proposal_weight_bound: runtime_types::sp_weights::weight_v2::Weight,
+ length_bound: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalCommittee",
+ "close",
+ Close {
+ proposal_hash,
+ index,
+ proposal_weight_bound,
+ length_bound,
+ },
+ [
+ 191u8, 138u8, 89u8, 247u8, 97u8, 51u8, 45u8, 193u8, 76u8,
+ 16u8, 80u8, 225u8, 197u8, 83u8, 204u8, 133u8, 169u8, 16u8,
+ 86u8, 32u8, 125u8, 16u8, 116u8, 185u8, 45u8, 20u8, 76u8,
+ 148u8, 206u8, 163u8, 154u8, 30u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_collective::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion (given hash) has been proposed (by given account) with a threshold (given"]
+ #[doc = "`MemberCount`)."]
+ pub struct Proposed {
+ pub account: ::subxt::utils::AccountId32,
+ pub proposal_index: ::core::primitive::u32,
+ pub proposal_hash: ::subxt::utils::H256,
+ pub threshold: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Proposed {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "Proposed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub proposal_hash: ::subxt::utils::H256,
+ pub voted: ::core::primitive::bool,
+ pub yes: ::core::primitive::u32,
+ pub no: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Voted {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "Voted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion was approved by the required threshold."]
+ pub struct Approved {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Approved {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "Approved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion was not approved by the required threshold."]
+ pub struct Disapproved {
+ pub proposal_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Disapproved {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "Disapproved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A motion was executed; result will be `Ok` if it returned without error."]
+ pub struct Executed {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for Executed {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "Executed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A single member did some action; result will be `Ok` if it returned without error."]
+ pub struct MemberExecuted {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for MemberExecuted {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "MemberExecuted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal was closed because its threshold was reached or after its duration was up."]
+ pub struct Closed {
+ pub proposal_hash: ::subxt::utils::H256,
+ pub yes: ::core::primitive::u32,
+ pub no: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Closed {
+ const PALLET: &'static str = "TechnicalCommittee";
+ const EVENT: &'static str = "Closed";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The hashes of the active proposals."]
+ pub fn proposals(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::H256,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "Proposals",
+ vec![],
+ [
+ 10u8, 133u8, 82u8, 54u8, 193u8, 41u8, 253u8, 159u8, 56u8,
+ 96u8, 249u8, 148u8, 43u8, 57u8, 116u8, 43u8, 222u8, 243u8,
+ 237u8, 231u8, 238u8, 60u8, 26u8, 225u8, 19u8, 203u8, 213u8,
+ 220u8, 114u8, 217u8, 100u8, 27u8,
+ ],
+ )
+ }
+ #[doc = " Actual proposal for a given hash, if it's current."]
+ pub fn proposal_of(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "ProposalOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 7u8, 48u8, 66u8, 129u8, 189u8, 239u8, 162u8, 148u8, 206u8,
+ 226u8, 56u8, 83u8, 105u8, 85u8, 12u8, 168u8, 84u8, 118u8,
+ 7u8, 7u8, 100u8, 5u8, 245u8, 209u8, 143u8, 242u8, 48u8, 78u8,
+ 157u8, 98u8, 42u8, 127u8,
+ ],
+ )
+ }
+ #[doc = " Actual proposal for a given hash, if it's current."]
+ pub fn proposal_of_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::kitchensink_runtime::RuntimeCall,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "ProposalOf",
+ Vec::new(),
+ [
+ 7u8, 48u8, 66u8, 129u8, 189u8, 239u8, 162u8, 148u8, 206u8,
+ 226u8, 56u8, 83u8, 105u8, 85u8, 12u8, 168u8, 84u8, 118u8,
+ 7u8, 7u8, 100u8, 5u8, 245u8, 209u8, 143u8, 242u8, 48u8, 78u8,
+ 157u8, 98u8, 42u8, 127u8,
+ ],
+ )
+ }
+ #[doc = " Votes on a given proposal, if it is ongoing."]
+ pub fn voting(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_collective::Votes<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "Voting",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8,
+ 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8,
+ 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8,
+ 217u8, 240u8, 230u8, 107u8, 221u8,
+ ],
+ )
+ }
+ #[doc = " Votes on a given proposal, if it is ongoing."]
+ pub fn voting_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_collective::Votes<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "Voting",
+ Vec::new(),
+ [
+ 89u8, 108u8, 65u8, 58u8, 60u8, 116u8, 54u8, 68u8, 179u8,
+ 73u8, 161u8, 168u8, 78u8, 213u8, 208u8, 54u8, 244u8, 58u8,
+ 70u8, 209u8, 170u8, 136u8, 215u8, 3u8, 2u8, 105u8, 229u8,
+ 217u8, 240u8, 230u8, 107u8, 221u8,
+ ],
+ )
+ }
+ #[doc = " Proposals so far."]
+ pub fn proposal_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "ProposalCount",
+ vec![],
+ [
+ 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8,
+ 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8,
+ 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8,
+ 177u8, 127u8, 160u8, 34u8, 70u8,
+ ],
+ )
+ }
+ #[doc = " The current members of the collective. This is stored sorted (just by value)."]
+ pub fn members(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::AccountId32>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "Members",
+ vec![],
+ [
+ 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8,
+ 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8,
+ 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8,
+ 71u8, 125u8, 56u8, 129u8, 222u8,
+ ],
+ )
+ }
+ #[doc = " The prime member that helps determine the default vote behavior in case of absentations."]
+ pub fn prime(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalCommittee",
+ "Prime",
+ vec![],
+ [
+ 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8,
+ 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8,
+ 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8,
+ 158u8, 159u8, 217u8, 244u8, 158u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod elections {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vote {
+ pub votes: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveVoter;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SubmitCandidacy {
+ #[codec(compact)]
+ pub candidate_count: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RenounceCandidacy {
+ pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveMember {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub slash_bond: ::core::primitive::bool,
+ pub rerun_election: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CleanDefunctVoters {
+ pub num_voters: ::core::primitive::u32,
+ pub num_defunct: ::core::primitive::u32,
+ }
+ 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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "We assume the maximum weight among all 3 cases: vote_equal, vote_more and vote_less."]
+ #[doc = "# "]
+ pub fn vote(
+ &self,
+ votes: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Elections",
+ "vote",
+ Vote { votes, value },
+ [
+ 71u8, 90u8, 175u8, 225u8, 51u8, 202u8, 197u8, 252u8, 183u8,
+ 92u8, 239u8, 83u8, 112u8, 144u8, 128u8, 211u8, 109u8, 33u8,
+ 252u8, 6u8, 156u8, 15u8, 91u8, 88u8, 70u8, 19u8, 32u8, 29u8,
+ 224u8, 255u8, 26u8, 145u8,
+ ],
+ )
+ }
+ #[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::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Elections",
+ "remove_voter",
+ RemoveVoter {},
+ [
+ 254u8, 46u8, 140u8, 4u8, 218u8, 45u8, 150u8, 72u8, 67u8,
+ 131u8, 108u8, 201u8, 46u8, 157u8, 104u8, 161u8, 53u8, 155u8,
+ 130u8, 50u8, 88u8, 149u8, 255u8, 12u8, 17u8, 85u8, 95u8,
+ 69u8, 153u8, 130u8, 221u8, 1u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "The number of current candidates must be provided as witness data."]
+ #[doc = "# "]
+ pub fn submit_candidacy(
+ &self,
+ candidate_count: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Elections",
+ "submit_candidacy",
+ SubmitCandidacy { candidate_count },
+ [
+ 228u8, 63u8, 217u8, 99u8, 128u8, 104u8, 175u8, 10u8, 30u8,
+ 35u8, 47u8, 14u8, 254u8, 122u8, 146u8, 239u8, 61u8, 145u8,
+ 82u8, 7u8, 181u8, 98u8, 238u8, 208u8, 23u8, 84u8, 48u8,
+ 255u8, 177u8, 255u8, 84u8, 83u8,
+ ],
+ )
+ }
+ #[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 = ""]
+ #[doc = "# "]
+ #[doc = "The type of renouncing must be provided as witness data."]
+ #[doc = "# "]
+ pub fn renounce_candidacy(
+ &self,
+ renouncing: runtime_types::pallet_elections_phragmen::Renouncing,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Elections",
+ "renounce_candidacy",
+ RenounceCandidacy { renouncing },
+ [
+ 70u8, 72u8, 208u8, 36u8, 80u8, 245u8, 224u8, 75u8, 60u8,
+ 142u8, 19u8, 49u8, 142u8, 90u8, 14u8, 69u8, 15u8, 61u8,
+ 170u8, 235u8, 16u8, 252u8, 86u8, 200u8, 120u8, 127u8, 36u8,
+ 42u8, 143u8, 130u8, 217u8, 128u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "If we have a replacement, we use a small weight. Else, since this is a root call and"]
+ #[doc = "will go into phragmen, we assume full block for now."]
+ #[doc = "# "]
+ pub fn remove_member(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ slash_bond: ::core::primitive::bool,
+ rerun_election: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Elections",
+ "remove_member",
+ RemoveMember {
+ who,
+ slash_bond,
+ rerun_election,
+ },
+ [
+ 178u8, 90u8, 236u8, 184u8, 2u8, 67u8, 51u8, 162u8, 83u8,
+ 131u8, 242u8, 137u8, 17u8, 243u8, 209u8, 110u8, 26u8, 238u8,
+ 178u8, 136u8, 84u8, 74u8, 216u8, 173u8, 221u8, 82u8, 179u8,
+ 218u8, 162u8, 159u8, 185u8, 59u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "The total number of voters and those that are defunct must be provided as witness data."]
+ #[doc = "# "]
+ pub fn clean_defunct_voters(
+ &self,
+ num_voters: ::core::primitive::u32,
+ num_defunct: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Elections",
+ "clean_defunct_voters",
+ CleanDefunctVoters {
+ num_voters,
+ num_defunct,
+ },
+ [
+ 198u8, 162u8, 30u8, 249u8, 191u8, 38u8, 141u8, 123u8, 230u8,
+ 90u8, 213u8, 103u8, 168u8, 28u8, 5u8, 215u8, 213u8, 152u8,
+ 46u8, 189u8, 238u8, 209u8, 209u8, 142u8, 159u8, 222u8, 161u8,
+ 26u8, 161u8, 250u8, 9u8, 100u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ )>,
+ }
+ impl ::subxt::events::StaticEvent for NewTerm {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "NewTerm";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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::events::StaticEvent for EmptyTerm {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "EmptyTerm";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Internal error happened while trying to perform election."]
+ pub struct ElectionError;
+ impl ::subxt::events::StaticEvent for ElectionError {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "ElectionError";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A member has been removed. This should always be followed by either `NewTerm` or"]
+ #[doc = "`EmptyTerm`."]
+ pub struct MemberKicked {
+ pub member: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for MemberKicked {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "MemberKicked";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Someone has renounced their candidacy."]
+ pub struct Renounced {
+ pub candidate: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Renounced {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "Renounced";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for CandidateSlashed {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "CandidateSlashed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A seat holder was slashed by amount by being forcefully removed from the set."]
+ pub struct SeatHolderSlashed {
+ pub seat_holder: ::subxt::utils::AccountId32,
+ pub amount: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for SeatHolderSlashed {
+ const PALLET: &'static str = "Elections";
+ const EVENT: &'static str = "SeatHolderSlashed";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The current elected members."]
+ #[doc = ""]
+ #[doc = " Invariant: Always sorted based on account id."]
+ pub fn members(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::pallet_elections_phragmen::SeatHolder<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Elections",
+ "Members",
+ vec![],
+ [
+ 2u8, 182u8, 43u8, 180u8, 87u8, 185u8, 26u8, 79u8, 196u8,
+ 55u8, 28u8, 26u8, 174u8, 133u8, 158u8, 221u8, 101u8, 161u8,
+ 83u8, 9u8, 221u8, 175u8, 221u8, 220u8, 81u8, 80u8, 1u8,
+ 236u8, 74u8, 121u8, 10u8, 82u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::pallet_elections_phragmen::SeatHolder<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Elections",
+ "RunnersUp",
+ vec![],
+ [
+ 248u8, 81u8, 190u8, 53u8, 121u8, 49u8, 55u8, 69u8, 116u8,
+ 177u8, 46u8, 30u8, 131u8, 14u8, 32u8, 198u8, 10u8, 132u8,
+ 73u8, 117u8, 2u8, 146u8, 188u8, 146u8, 214u8, 227u8, 97u8,
+ 77u8, 7u8, 131u8, 208u8, 209u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ )>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Elections",
+ "Candidates",
+ vec![],
+ [
+ 224u8, 107u8, 141u8, 11u8, 54u8, 86u8, 117u8, 45u8, 195u8,
+ 252u8, 152u8, 21u8, 165u8, 23u8, 198u8, 117u8, 5u8, 216u8,
+ 183u8, 163u8, 243u8, 56u8, 11u8, 102u8, 85u8, 107u8, 219u8,
+ 250u8, 45u8, 80u8, 108u8, 127u8,
+ ],
+ )
+ }
+ #[doc = " The total number of vote rounds that have happened, excluding the upcoming one."]
+ pub fn election_rounds(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Elections",
+ "ElectionRounds",
+ vec![],
+ [
+ 144u8, 146u8, 10u8, 32u8, 149u8, 147u8, 59u8, 205u8, 61u8,
+ 246u8, 28u8, 169u8, 130u8, 136u8, 143u8, 104u8, 253u8, 86u8,
+ 228u8, 68u8, 19u8, 184u8, 166u8, 214u8, 58u8, 103u8, 176u8,
+ 160u8, 240u8, 249u8, 117u8, 115u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_elections_phragmen::Voter<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Elections",
+ "Voting",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8,
+ 37u8, 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8,
+ 14u8, 189u8, 83u8, 185u8, 136u8, 39u8, 171u8, 221u8, 147u8,
+ 20u8, 168u8, 126u8, 111u8, 137u8,
+ ],
+ )
+ }
+ #[doc = " Votes and locked stake of a particular voter."]
+ #[doc = ""]
+ #[doc = " TWOX-NOTE: SAFE as `AccountId` is a crypto hash."]
+ pub fn voting_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_elections_phragmen::Voter<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Elections",
+ "Voting",
+ Vec::new(),
+ [
+ 9u8, 135u8, 76u8, 194u8, 240u8, 182u8, 111u8, 207u8, 102u8,
+ 37u8, 126u8, 36u8, 84u8, 112u8, 26u8, 216u8, 175u8, 5u8,
+ 14u8, 189u8, 83u8, 185u8, 136u8, 39u8, 171u8, 221u8, 147u8,
+ 20u8, 168u8, 126u8, 111u8, 137u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<[::core::primitive::u8; 8usize]>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Elections",
+ "PalletId",
+ [
+ 224u8, 197u8, 247u8, 125u8, 62u8, 180u8, 69u8, 91u8, 226u8,
+ 36u8, 82u8, 148u8, 70u8, 147u8, 209u8, 40u8, 210u8, 229u8,
+ 181u8, 191u8, 170u8, 205u8, 138u8, 97u8, 127u8, 59u8, 124u8,
+ 244u8, 252u8, 30u8, 213u8, 179u8,
+ ],
+ )
+ }
+ #[doc = " How much should be locked up in order to submit one's candidacy."]
+ pub fn candidacy_bond(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Elections",
+ "TermDuration",
+ [
+ 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 candidates in a phragmen election."]
+ #[doc = ""]
+ #[doc = " Warning: The election happens onchain, and this value will determine"]
+ #[doc = " the size of the election. When this limit is reached no more"]
+ #[doc = " candidates are accepted in the election."]
+ pub fn max_candidates(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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."]
+ #[doc = " When the limit is reached the new voters are ignored."]
+ pub fn max_voters(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod technical_membership {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AddMember {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveMember {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SwapMember {
+ pub remove: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub add: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ResetMembers {
+ pub members: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ChangeKey {
+ pub new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetPrime {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ClearPrime;
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Add a member `who` to the set."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::AddOrigin`."]
+ pub fn add_member(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "add_member",
+ AddMember { who },
+ [
+ 168u8, 166u8, 6u8, 167u8, 12u8, 109u8, 99u8, 96u8, 240u8,
+ 57u8, 60u8, 174u8, 57u8, 52u8, 131u8, 16u8, 230u8, 172u8,
+ 23u8, 140u8, 48u8, 131u8, 73u8, 131u8, 133u8, 217u8, 137u8,
+ 50u8, 165u8, 149u8, 174u8, 188u8,
+ ],
+ )
+ }
+ #[doc = "Remove a member `who` from the set."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::RemoveOrigin`."]
+ pub fn remove_member(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "remove_member",
+ RemoveMember { who },
+ [
+ 33u8, 178u8, 96u8, 158u8, 126u8, 172u8, 0u8, 207u8, 143u8,
+ 144u8, 219u8, 28u8, 205u8, 197u8, 192u8, 195u8, 141u8, 26u8,
+ 39u8, 101u8, 140u8, 88u8, 212u8, 26u8, 221u8, 29u8, 187u8,
+ 160u8, 119u8, 101u8, 45u8, 162u8,
+ ],
+ )
+ }
+ #[doc = "Swap out one member `remove` for another `add`."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::SwapOrigin`."]
+ #[doc = ""]
+ #[doc = "Prime membership is *not* passed from `remove` to `add`, if extant."]
+ pub fn swap_member(
+ &self,
+ remove: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ add: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "swap_member",
+ SwapMember { remove, add },
+ [
+ 52u8, 10u8, 13u8, 175u8, 35u8, 141u8, 159u8, 135u8, 34u8,
+ 235u8, 117u8, 146u8, 134u8, 49u8, 76u8, 116u8, 93u8, 209u8,
+ 24u8, 242u8, 123u8, 82u8, 34u8, 192u8, 147u8, 237u8, 163u8,
+ 167u8, 18u8, 64u8, 196u8, 132u8,
+ ],
+ )
+ }
+ #[doc = "Change the membership to a new set, disregarding the existing membership. Be nice and"]
+ #[doc = "pass `members` pre-sorted."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::ResetOrigin`."]
+ pub fn reset_members(
+ &self,
+ members: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "reset_members",
+ ResetMembers { members },
+ [
+ 9u8, 35u8, 28u8, 59u8, 158u8, 232u8, 89u8, 78u8, 101u8, 53u8,
+ 240u8, 98u8, 13u8, 104u8, 235u8, 161u8, 201u8, 150u8, 117u8,
+ 32u8, 75u8, 209u8, 166u8, 252u8, 57u8, 131u8, 96u8, 215u8,
+ 51u8, 81u8, 42u8, 123u8,
+ ],
+ )
+ }
+ #[doc = "Swap out the sending member for some other key `new`."]
+ #[doc = ""]
+ #[doc = "May only be called from `Signed` origin of a current member."]
+ #[doc = ""]
+ #[doc = "Prime membership is passed from the origin account to `new`, if extant."]
+ pub fn change_key(
+ &self,
+ new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "change_key",
+ ChangeKey { new },
+ [
+ 202u8, 114u8, 208u8, 33u8, 254u8, 51u8, 31u8, 220u8, 229u8,
+ 251u8, 167u8, 149u8, 139u8, 131u8, 252u8, 100u8, 32u8, 20u8,
+ 72u8, 97u8, 5u8, 8u8, 25u8, 198u8, 95u8, 154u8, 73u8, 220u8,
+ 46u8, 85u8, 162u8, 40u8,
+ ],
+ )
+ }
+ #[doc = "Set the prime member. Must be a current member."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::PrimeOrigin`."]
+ pub fn set_prime(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "set_prime",
+ SetPrime { who },
+ [
+ 109u8, 16u8, 35u8, 72u8, 169u8, 141u8, 101u8, 209u8, 241u8,
+ 218u8, 170u8, 180u8, 37u8, 223u8, 249u8, 37u8, 168u8, 20u8,
+ 130u8, 30u8, 191u8, 157u8, 230u8, 156u8, 135u8, 73u8, 96u8,
+ 98u8, 193u8, 44u8, 38u8, 247u8,
+ ],
+ )
+ }
+ #[doc = "Remove the prime member if it exists."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::PrimeOrigin`."]
+ pub fn clear_prime(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "TechnicalMembership",
+ "clear_prime",
+ ClearPrime {},
+ [
+ 186u8, 182u8, 225u8, 90u8, 71u8, 124u8, 69u8, 100u8, 234u8,
+ 25u8, 53u8, 23u8, 182u8, 32u8, 176u8, 81u8, 54u8, 140u8,
+ 235u8, 126u8, 247u8, 7u8, 155u8, 62u8, 35u8, 135u8, 48u8,
+ 61u8, 88u8, 160u8, 183u8, 72u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_membership::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The given member was added; see the transaction for who."]
+ pub struct MemberAdded;
+ impl ::subxt::events::StaticEvent for MemberAdded {
+ const PALLET: &'static str = "TechnicalMembership";
+ const EVENT: &'static str = "MemberAdded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The given member was removed; see the transaction for who."]
+ pub struct MemberRemoved;
+ impl ::subxt::events::StaticEvent for MemberRemoved {
+ const PALLET: &'static str = "TechnicalMembership";
+ const EVENT: &'static str = "MemberRemoved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Two members were swapped; see the transaction for who."]
+ pub struct MembersSwapped;
+ impl ::subxt::events::StaticEvent for MembersSwapped {
+ const PALLET: &'static str = "TechnicalMembership";
+ const EVENT: &'static str = "MembersSwapped";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The membership was reset; see the transaction for who the new set is."]
+ pub struct MembersReset;
+ impl ::subxt::events::StaticEvent for MembersReset {
+ const PALLET: &'static str = "TechnicalMembership";
+ const EVENT: &'static str = "MembersReset";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "One of the members' keys changed."]
+ pub struct KeyChanged;
+ impl ::subxt::events::StaticEvent for KeyChanged {
+ const PALLET: &'static str = "TechnicalMembership";
+ const EVENT: &'static str = "KeyChanged";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Phantom member, never used."]
+ pub struct Dummy;
+ impl ::subxt::events::StaticEvent for Dummy {
+ const PALLET: &'static str = "TechnicalMembership";
+ const EVENT: &'static str = "Dummy";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The current membership, stored as an ordered Vec."]
+ pub fn members(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalMembership",
+ "Members",
+ vec![],
+ [
+ 56u8, 56u8, 29u8, 90u8, 26u8, 115u8, 252u8, 185u8, 37u8,
+ 108u8, 16u8, 46u8, 136u8, 139u8, 30u8, 19u8, 235u8, 78u8,
+ 176u8, 129u8, 180u8, 57u8, 178u8, 239u8, 211u8, 6u8, 64u8,
+ 129u8, 195u8, 46u8, 178u8, 157u8,
+ ],
+ )
+ }
+ #[doc = " The current prime member, if one exists."]
+ pub fn prime(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "TechnicalMembership",
+ "Prime",
+ vec![],
+ [
+ 108u8, 118u8, 54u8, 193u8, 207u8, 227u8, 119u8, 97u8, 23u8,
+ 239u8, 157u8, 69u8, 56u8, 142u8, 106u8, 17u8, 215u8, 159u8,
+ 48u8, 42u8, 185u8, 209u8, 49u8, 159u8, 32u8, 168u8, 111u8,
+ 158u8, 159u8, 217u8, 244u8, 158u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod grandpa {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ReportEquivocation {
+ pub equivocation_proof: ::std::boxed::Box<
+ runtime_types::sp_finality_grandpa::EquivocationProof<
+ ::subxt::utils::H256,
+ ::core::primitive::u32,
+ >,
+ >,
+ pub key_owner_proof: runtime_types::sp_session::MembershipProof,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ReportEquivocationUnsigned {
+ pub equivocation_proof: ::std::boxed::Box<
+ runtime_types::sp_finality_grandpa::EquivocationProof<
+ ::subxt::utils::H256,
+ ::core::primitive::u32,
+ >,
+ >,
+ pub key_owner_proof: runtime_types::sp_session::MembershipProof,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct NoteStalled {
+ pub delay: ::core::primitive::u32,
+ pub best_finalized_block_number: ::core::primitive::u32,
+ }
+ 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 : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: utils :: H256 , :: core :: primitive :: u32 >,
+ key_owner_proof: runtime_types::sp_session::MembershipProof,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Grandpa",
+ "report_equivocation",
+ ReportEquivocation {
+ equivocation_proof: ::std::boxed::Box::new(
+ equivocation_proof,
+ ),
+ key_owner_proof,
+ },
+ [
+ 156u8, 162u8, 189u8, 89u8, 60u8, 156u8, 129u8, 176u8, 62u8,
+ 35u8, 214u8, 7u8, 68u8, 245u8, 130u8, 117u8, 30u8, 3u8, 73u8,
+ 218u8, 142u8, 82u8, 13u8, 141u8, 124u8, 19u8, 53u8, 138u8,
+ 70u8, 4u8, 40u8, 32u8,
+ ],
+ )
+ }
+ #[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 : runtime_types :: sp_finality_grandpa :: EquivocationProof < :: subxt :: utils :: H256 , :: core :: primitive :: u32 >,
+ key_owner_proof: runtime_types::sp_session::MembershipProof,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Grandpa",
+ "report_equivocation_unsigned",
+ ReportEquivocationUnsigned {
+ equivocation_proof: ::std::boxed::Box::new(
+ equivocation_proof,
+ ),
+ key_owner_proof,
+ },
+ [
+ 166u8, 26u8, 217u8, 185u8, 215u8, 37u8, 174u8, 170u8, 137u8,
+ 160u8, 151u8, 43u8, 246u8, 86u8, 58u8, 18u8, 248u8, 73u8,
+ 99u8, 161u8, 158u8, 93u8, 212u8, 186u8, 224u8, 253u8, 234u8,
+ 18u8, 151u8, 111u8, 227u8, 249u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ best_finalized_block_number: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Grandpa",
+ "note_stalled",
+ NoteStalled {
+ delay,
+ best_finalized_block_number,
+ },
+ [
+ 197u8, 236u8, 137u8, 32u8, 46u8, 200u8, 144u8, 13u8, 89u8,
+ 181u8, 235u8, 73u8, 167u8, 131u8, 174u8, 93u8, 42u8, 136u8,
+ 238u8, 59u8, 129u8, 60u8, 83u8, 100u8, 5u8, 182u8, 99u8,
+ 250u8, 145u8, 180u8, 1u8, 199u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_grandpa::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "New authority set has been applied."]
+ pub struct NewAuthorities {
+ pub authority_set: ::std::vec::Vec<(
+ runtime_types::sp_finality_grandpa::app::Public,
+ ::core::primitive::u64,
+ )>,
+ }
+ impl ::subxt::events::StaticEvent for NewAuthorities {
+ const PALLET: &'static str = "Grandpa";
+ const EVENT: &'static str = "NewAuthorities";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Current authority set has been paused."]
+ pub struct Paused;
+ impl ::subxt::events::StaticEvent for Paused {
+ const PALLET: &'static str = "Grandpa";
+ const EVENT: &'static str = "Paused";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Current authority set has been resumed."]
+ pub struct Resumed;
+ impl ::subxt::events::StaticEvent for Resumed {
+ const PALLET: &'static str = "Grandpa";
+ const EVENT: &'static str = "Resumed";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " State of the current authority set."]
+ pub fn state(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_grandpa::StoredState<
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "State",
+ vec![],
+ [
+ 211u8, 149u8, 114u8, 217u8, 206u8, 194u8, 115u8, 67u8, 12u8,
+ 218u8, 246u8, 213u8, 208u8, 29u8, 216u8, 104u8, 2u8, 39u8,
+ 123u8, 172u8, 252u8, 210u8, 52u8, 129u8, 147u8, 237u8, 244u8,
+ 68u8, 252u8, 169u8, 97u8, 148u8,
+ ],
+ )
+ }
+ #[doc = " Pending change: (signaled at, scheduled change)."]
+ pub fn pending_change(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_grandpa::StoredPendingChange<
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "PendingChange",
+ vec![],
+ [
+ 178u8, 24u8, 140u8, 7u8, 8u8, 196u8, 18u8, 58u8, 3u8, 226u8,
+ 181u8, 47u8, 155u8, 160u8, 70u8, 12u8, 75u8, 189u8, 38u8,
+ 255u8, 104u8, 141u8, 64u8, 34u8, 134u8, 201u8, 102u8, 21u8,
+ 75u8, 81u8, 218u8, 60u8,
+ ],
+ )
+ }
+ #[doc = " next block number where we can force a change."]
+ pub fn next_forced(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "NextForced",
+ vec![],
+ [
+ 99u8, 43u8, 245u8, 201u8, 60u8, 9u8, 122u8, 99u8, 188u8,
+ 29u8, 67u8, 6u8, 193u8, 133u8, 179u8, 67u8, 202u8, 208u8,
+ 62u8, 179u8, 19u8, 169u8, 196u8, 119u8, 107u8, 75u8, 100u8,
+ 3u8, 121u8, 18u8, 80u8, 156u8,
+ ],
+ )
+ }
+ #[doc = " `true` if we are currently stalled."]
+ pub fn stalled(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "Stalled",
+ vec![],
+ [
+ 219u8, 8u8, 37u8, 78u8, 150u8, 55u8, 0u8, 57u8, 201u8, 170u8,
+ 186u8, 189u8, 56u8, 161u8, 44u8, 15u8, 53u8, 178u8, 224u8,
+ 208u8, 231u8, 109u8, 14u8, 209u8, 57u8, 205u8, 237u8, 153u8,
+ 231u8, 156u8, 24u8, 185u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "CurrentSetId",
+ vec![],
+ [
+ 129u8, 7u8, 62u8, 101u8, 199u8, 60u8, 56u8, 33u8, 54u8,
+ 158u8, 20u8, 178u8, 244u8, 145u8, 189u8, 197u8, 157u8, 163u8,
+ 116u8, 36u8, 105u8, 52u8, 149u8, 244u8, 108u8, 94u8, 109u8,
+ 111u8, 244u8, 137u8, 7u8, 108u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::core::primitive::u64>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "SetIdSession",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, 110u8,
+ 11u8, 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, 157u8, 15u8,
+ 33u8, 234u8, 108u8, 13u8, 88u8, 115u8, 254u8, 9u8, 145u8,
+ 199u8, 102u8, 47u8, 53u8, 134u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Grandpa",
+ "SetIdSession",
+ Vec::new(),
+ [
+ 91u8, 175u8, 145u8, 127u8, 242u8, 81u8, 13u8, 231u8, 110u8,
+ 11u8, 166u8, 169u8, 103u8, 146u8, 123u8, 133u8, 157u8, 15u8,
+ 33u8, 234u8, 108u8, 13u8, 88u8, 115u8, 254u8, 9u8, 145u8,
+ 199u8, 102u8, 47u8, 53u8, 134u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " Max Authorities in use"]
+ pub fn max_authorities(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 treasury {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ProposeSpend {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ pub beneficiary: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RejectProposal {
+ #[codec(compact)]
+ pub proposal_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ApproveProposal {
+ #[codec(compact)]
+ pub proposal_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Spend {
+ #[codec(compact)]
+ pub amount: ::core::primitive::u128,
+ pub beneficiary: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveApproval {
+ #[codec(compact)]
+ pub proposal_id: ::core::primitive::u32,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Put forward a suggestion for spending. A deposit proportional to the value"]
+ #[doc = "is reserved and slashed if the proposal is rejected. It is returned once the"]
+ #[doc = "proposal is awarded."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: O(1)"]
+ #[doc = "- DbReads: `ProposalCount`, `origin account`"]
+ #[doc = "- DbWrites: `ProposalCount`, `Proposals`, `origin account`"]
+ #[doc = "# "]
+ pub fn propose_spend(
+ &self,
+ value: ::core::primitive::u128,
+ beneficiary: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Treasury",
+ "propose_spend",
+ ProposeSpend { value, beneficiary },
+ [
+ 124u8, 32u8, 83u8, 127u8, 240u8, 169u8, 3u8, 190u8, 235u8,
+ 163u8, 23u8, 29u8, 88u8, 242u8, 238u8, 187u8, 136u8, 75u8,
+ 193u8, 192u8, 239u8, 2u8, 54u8, 238u8, 147u8, 42u8, 91u8,
+ 14u8, 244u8, 175u8, 41u8, 14u8,
+ ],
+ )
+ }
+ #[doc = "Reject a proposed spend. The original deposit will be slashed."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::RejectOrigin`."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: O(1)"]
+ #[doc = "- DbReads: `Proposals`, `rejected proposer account`"]
+ #[doc = "- DbWrites: `Proposals`, `rejected proposer account`"]
+ #[doc = "# "]
+ pub fn reject_proposal(
+ &self,
+ proposal_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Treasury",
+ "reject_proposal",
+ RejectProposal { proposal_id },
+ [
+ 106u8, 223u8, 97u8, 22u8, 111u8, 208u8, 128u8, 26u8, 198u8,
+ 140u8, 118u8, 126u8, 187u8, 51u8, 193u8, 50u8, 193u8, 68u8,
+ 143u8, 144u8, 34u8, 132u8, 44u8, 244u8, 105u8, 186u8, 223u8,
+ 234u8, 17u8, 145u8, 209u8, 145u8,
+ ],
+ )
+ }
+ #[doc = "Approve a proposal. At a later time, the proposal will be allocated to the beneficiary"]
+ #[doc = "and the original deposit will be returned."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::ApproveOrigin`."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: O(1)."]
+ #[doc = "- DbReads: `Proposals`, `Approvals`"]
+ #[doc = "- DbWrite: `Approvals`"]
+ #[doc = "# "]
+ pub fn approve_proposal(
+ &self,
+ proposal_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Treasury",
+ "approve_proposal",
+ ApproveProposal { proposal_id },
+ [
+ 164u8, 229u8, 172u8, 98u8, 129u8, 62u8, 84u8, 128u8, 47u8,
+ 108u8, 33u8, 120u8, 89u8, 79u8, 57u8, 121u8, 4u8, 197u8,
+ 170u8, 153u8, 156u8, 17u8, 59u8, 164u8, 123u8, 227u8, 175u8,
+ 195u8, 220u8, 160u8, 60u8, 186u8,
+ ],
+ )
+ }
+ #[doc = "Propose and approve a spend of treasury funds."]
+ #[doc = ""]
+ #[doc = "- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`."]
+ #[doc = "- `amount`: The amount to be transferred from the treasury to the `beneficiary`."]
+ #[doc = "- `beneficiary`: The destination account for the transfer."]
+ #[doc = ""]
+ #[doc = "NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the"]
+ #[doc = "beneficiary."]
+ pub fn spend(
+ &self,
+ amount: ::core::primitive::u128,
+ beneficiary: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Treasury",
+ "spend",
+ Spend {
+ amount,
+ beneficiary,
+ },
+ [
+ 208u8, 79u8, 96u8, 218u8, 205u8, 209u8, 165u8, 119u8, 92u8,
+ 208u8, 54u8, 168u8, 83u8, 190u8, 98u8, 97u8, 6u8, 2u8, 35u8,
+ 249u8, 18u8, 88u8, 193u8, 51u8, 130u8, 33u8, 28u8, 99u8,
+ 49u8, 194u8, 34u8, 77u8,
+ ],
+ )
+ }
+ #[doc = "Force a previously approved proposal to be removed from the approval queue."]
+ #[doc = "The original deposit will no longer be returned."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::RejectOrigin`."]
+ #[doc = "- `proposal_id`: The index of a proposal"]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: O(A) where `A` is the number of approvals"]
+ #[doc = "- Db reads and writes: `Approvals`"]
+ #[doc = "# "]
+ #[doc = ""]
+ #[doc = "Errors:"]
+ #[doc = "- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue,"]
+ #[doc = "i.e., the proposal has not been approved. This could also mean the proposal does not"]
+ #[doc = "exist altogether, thus there is no way it would have been approved in the first place."]
+ pub fn remove_approval(
+ &self,
+ proposal_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Treasury",
+ "remove_approval",
+ RemoveApproval { proposal_id },
+ [
+ 133u8, 126u8, 181u8, 47u8, 196u8, 243u8, 7u8, 46u8, 25u8,
+ 251u8, 154u8, 125u8, 217u8, 77u8, 54u8, 245u8, 240u8, 180u8,
+ 97u8, 34u8, 186u8, 53u8, 225u8, 144u8, 155u8, 107u8, 172u8,
+ 54u8, 250u8, 184u8, 178u8, 86u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_treasury::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "New proposal."]
+ pub struct Proposed {
+ pub proposal_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Proposed {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Proposed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "We have ended a spend period and will now allocate funds."]
+ pub struct Spending {
+ pub budget_remaining: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Spending {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Spending";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some funds have been allocated."]
+ pub struct Awarded {
+ pub proposal_index: ::core::primitive::u32,
+ pub award: ::core::primitive::u128,
+ pub account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Awarded {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Awarded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proposal was rejected; funds were slashed."]
+ pub struct Rejected {
+ pub proposal_index: ::core::primitive::u32,
+ pub slashed: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Rejected {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Rejected";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some of our funds have been burnt."]
+ pub struct Burnt {
+ pub burnt_funds: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Burnt {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Burnt";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Spending has finished; this is the amount that rolls over until next spend."]
+ pub struct Rollover {
+ pub rollover_balance: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Rollover {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Rollover";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some funds have been deposited."]
+ pub struct Deposit {
+ pub value: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Deposit {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "Deposit";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new spend proposal has been approved."]
+ pub struct SpendApproved {
+ pub proposal_index: ::core::primitive::u32,
+ pub amount: ::core::primitive::u128,
+ pub beneficiary: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for SpendApproved {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "SpendApproved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The inactive funds of the pallet have been updated."]
+ pub struct UpdatedInactive {
+ pub reactivated: ::core::primitive::u128,
+ pub deactivated: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for UpdatedInactive {
+ const PALLET: &'static str = "Treasury";
+ const EVENT: &'static str = "UpdatedInactive";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Number of proposals that have been made."]
+ pub fn proposal_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Treasury",
+ "ProposalCount",
+ vec![],
+ [
+ 132u8, 145u8, 78u8, 218u8, 51u8, 189u8, 55u8, 172u8, 143u8,
+ 33u8, 140u8, 99u8, 124u8, 208u8, 57u8, 232u8, 154u8, 110u8,
+ 32u8, 142u8, 24u8, 149u8, 109u8, 105u8, 30u8, 83u8, 39u8,
+ 177u8, 127u8, 160u8, 34u8, 70u8,
+ ],
+ )
+ }
+ #[doc = " Proposals that have been made."]
+ pub fn proposals(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_treasury::Proposal<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Treasury",
+ "Proposals",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8,
+ 38u8, 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8,
+ 108u8, 91u8, 37u8, 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8,
+ 198u8, 224u8, 246u8, 160u8,
+ ],
+ )
+ }
+ #[doc = " Proposals that have been made."]
+ pub fn proposals_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_treasury::Proposal<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Treasury",
+ "Proposals",
+ Vec::new(),
+ [
+ 62u8, 223u8, 55u8, 209u8, 151u8, 134u8, 122u8, 65u8, 207u8,
+ 38u8, 113u8, 213u8, 237u8, 48u8, 129u8, 32u8, 91u8, 228u8,
+ 108u8, 91u8, 37u8, 49u8, 94u8, 4u8, 75u8, 122u8, 25u8, 34u8,
+ 198u8, 224u8, 246u8, 160u8,
+ ],
+ )
+ }
+ #[doc = " The amount which has been reported as inactive to Currency."]
+ pub fn deactivated(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Treasury",
+ "Deactivated",
+ vec![],
+ [
+ 159u8, 57u8, 5u8, 85u8, 136u8, 128u8, 70u8, 43u8, 67u8, 76u8,
+ 123u8, 206u8, 48u8, 253u8, 51u8, 40u8, 14u8, 35u8, 162u8,
+ 173u8, 127u8, 79u8, 38u8, 235u8, 9u8, 141u8, 201u8, 37u8,
+ 211u8, 176u8, 119u8, 106u8,
+ ],
+ )
+ }
+ #[doc = " Proposal indices that have been approved but not yet awarded."]
+ pub fn approvals(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Treasury",
+ "Approvals",
+ vec![],
+ [
+ 202u8, 106u8, 189u8, 40u8, 127u8, 172u8, 108u8, 50u8, 193u8,
+ 4u8, 248u8, 226u8, 176u8, 101u8, 212u8, 222u8, 64u8, 206u8,
+ 244u8, 175u8, 111u8, 106u8, 86u8, 96u8, 19u8, 109u8, 218u8,
+ 152u8, 30u8, 59u8, 96u8, 1u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " Fraction of a proposal's value that should be bonded in order to place the proposal."]
+ #[doc = " An accepted proposal gets these back. A rejected proposal does not."]
+ pub fn proposal_bond(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Permill,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Treasury",
+ "ProposalBond",
+ [
+ 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8,
+ 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8,
+ 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8,
+ 104u8, 222u8, 75u8, 86u8, 227u8,
+ ],
+ )
+ }
+ #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."]
+ pub fn proposal_bond_minimum(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Treasury",
+ "ProposalBondMinimum",
+ [
+ 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 amount of funds that should be placed in a deposit for making a proposal."]
+ pub fn proposal_bond_maximum(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::core::option::Option<::core::primitive::u128>,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Treasury",
+ "ProposalBondMaximum",
+ [
+ 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8,
+ 194u8, 88u8, 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8,
+ 154u8, 237u8, 134u8, 204u8, 102u8, 247u8, 52u8, 103u8, 231u8,
+ 43u8, 243u8, 122u8, 60u8, 216u8,
+ ],
+ )
+ }
+ #[doc = " Period between successive spends."]
+ pub fn spend_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Treasury",
+ "SpendPeriod",
+ [
+ 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 = " Percentage of spare funds (if any) that are burnt per spend period."]
+ pub fn burn(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Permill,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Treasury",
+ "Burn",
+ [
+ 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8,
+ 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8,
+ 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8,
+ 104u8, 222u8, 75u8, 86u8, 227u8,
+ ],
+ )
+ }
+ #[doc = " The treasury's pallet id, used for deriving its sovereign account ID."]
+ pub fn pallet_id(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_support::PalletId,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Treasury",
+ "PalletId",
+ [
+ 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8,
+ 154u8, 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8,
+ 186u8, 24u8, 243u8, 9u8, 12u8, 214u8, 80u8, 74u8, 69u8,
+ 189u8, 30u8, 94u8, 22u8, 39u8,
+ ],
+ )
+ }
+ #[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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod contracts {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CallOldWeight {
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ #[codec(compact)]
+ pub gas_limit: runtime_types::sp_weights::OldWeight,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct InstantiateWithCodeOldWeight {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ #[codec(compact)]
+ pub gas_limit: runtime_types::sp_weights::OldWeight,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub code: ::std::vec::Vec<::core::primitive::u8>,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ pub salt: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct InstantiateOldWeight {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ #[codec(compact)]
+ pub gas_limit: runtime_types::sp_weights::OldWeight,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub code_hash: ::subxt::utils::H256,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ pub salt: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct UploadCode {
+ pub code: ::std::vec::Vec<::core::primitive::u8>,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub determinism: runtime_types::pallet_contracts::wasm::Determinism,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveCode {
+ pub code_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetCode {
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub code_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Call {
+ pub dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ pub gas_limit: runtime_types::sp_weights::weight_v2::Weight,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct InstantiateWithCode {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ pub gas_limit: runtime_types::sp_weights::weight_v2::Weight,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub code: ::std::vec::Vec<::core::primitive::u8>,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ pub salt: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Instantiate {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ pub gas_limit: runtime_types::sp_weights::weight_v2::Weight,
+ pub storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ pub code_hash: ::subxt::utils::H256,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ pub salt: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Deprecated version if [`Self::call`] for use in an in-storage `Call`."]
+ pub fn call_old_weight(
+ &self,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ gas_limit: runtime_types::sp_weights::OldWeight,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ data: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "call_old_weight",
+ CallOldWeight {
+ dest,
+ value,
+ gas_limit,
+ storage_deposit_limit,
+ data,
+ },
+ [
+ 110u8, 227u8, 98u8, 194u8, 241u8, 14u8, 112u8, 34u8, 18u8,
+ 0u8, 102u8, 76u8, 145u8, 224u8, 186u8, 143u8, 89u8, 61u8,
+ 182u8, 157u8, 35u8, 128u8, 148u8, 255u8, 192u8, 223u8, 12u8,
+ 178u8, 69u8, 1u8, 168u8, 149u8,
+ ],
+ )
+ }
+ #[doc = "Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`."]
+ pub fn instantiate_with_code_old_weight(
+ &self,
+ value: ::core::primitive::u128,
+ gas_limit: runtime_types::sp_weights::OldWeight,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ code: ::std::vec::Vec<::core::primitive::u8>,
+ data: ::std::vec::Vec<::core::primitive::u8>,
+ salt: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "instantiate_with_code_old_weight",
+ InstantiateWithCodeOldWeight {
+ value,
+ gas_limit,
+ storage_deposit_limit,
+ code,
+ data,
+ salt,
+ },
+ [
+ 93u8, 124u8, 100u8, 101u8, 7u8, 110u8, 92u8, 199u8, 162u8,
+ 126u8, 35u8, 47u8, 190u8, 42u8, 237u8, 152u8, 169u8, 130u8,
+ 21u8, 33u8, 136u8, 220u8, 110u8, 106u8, 57u8, 211u8, 158u8,
+ 130u8, 112u8, 37u8, 41u8, 39u8,
+ ],
+ )
+ }
+ #[doc = "Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`."]
+ pub fn instantiate_old_weight(
+ &self,
+ value: ::core::primitive::u128,
+ gas_limit: runtime_types::sp_weights::OldWeight,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ code_hash: ::subxt::utils::H256,
+ data: ::std::vec::Vec<::core::primitive::u8>,
+ salt: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "instantiate_old_weight",
+ InstantiateOldWeight {
+ value,
+ gas_limit,
+ storage_deposit_limit,
+ code_hash,
+ data,
+ salt,
+ },
+ [
+ 243u8, 56u8, 93u8, 198u8, 169u8, 134u8, 6u8, 135u8, 19u8,
+ 1u8, 20u8, 138u8, 202u8, 59u8, 59u8, 99u8, 58u8, 22u8, 33u8,
+ 94u8, 253u8, 215u8, 203u8, 159u8, 58u8, 21u8, 24u8, 235u8,
+ 30u8, 215u8, 173u8, 23u8,
+ ],
+ )
+ }
+ #[doc = "Upload new `code` without instantiating a contract from it."]
+ #[doc = ""]
+ #[doc = "If the code does not already exist a deposit is reserved from the caller"]
+ #[doc = "and unreserved only when [`Self::remove_code`] is called. The size of the reserve"]
+ #[doc = "depends on the instrumented size of the the supplied `code`."]
+ #[doc = ""]
+ #[doc = "If the code already exists in storage it will still return `Ok` and upgrades"]
+ #[doc = "the in storage version to the current"]
+ #[doc = "[`InstructionWeights::version`](InstructionWeights)."]
+ #[doc = ""]
+ #[doc = "- `determinism`: If this is set to any other value but [`Determinism::Deterministic`]"]
+ #[doc = " then the only way to use this code is to delegate call into it from an offchain"]
+ #[doc = " execution. Set to [`Determinism::Deterministic`] if in doubt."]
+ #[doc = ""]
+ #[doc = "# Note"]
+ #[doc = ""]
+ #[doc = "Anyone can instantiate a contract from any uploaded code and thus prevent its removal."]
+ #[doc = "To avoid this situation a constructor could employ access control so that it can"]
+ #[doc = "only be instantiated by permissioned entities. The same is true when uploading"]
+ #[doc = "through [`Self::instantiate_with_code`]."]
+ pub fn upload_code(
+ &self,
+ code: ::std::vec::Vec<::core::primitive::u8>,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ determinism: runtime_types::pallet_contracts::wasm::Determinism,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "upload_code",
+ UploadCode {
+ code,
+ storage_deposit_limit,
+ determinism,
+ },
+ [
+ 233u8, 137u8, 54u8, 111u8, 132u8, 124u8, 80u8, 213u8, 182u8,
+ 224u8, 144u8, 240u8, 6u8, 235u8, 148u8, 26u8, 65u8, 39u8,
+ 91u8, 151u8, 131u8, 10u8, 216u8, 101u8, 89u8, 115u8, 160u8,
+ 154u8, 44u8, 239u8, 142u8, 116u8,
+ ],
+ )
+ }
+ #[doc = "Remove the code stored under `code_hash` and refund the deposit to its owner."]
+ #[doc = ""]
+ #[doc = "A code can only be removed by its original uploader (its owner) and only if it is"]
+ #[doc = "not used by any contract."]
+ pub fn remove_code(
+ &self,
+ code_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "remove_code",
+ RemoveCode { code_hash },
+ [
+ 43u8, 192u8, 198u8, 182u8, 108u8, 76u8, 21u8, 42u8, 169u8,
+ 41u8, 195u8, 73u8, 31u8, 179u8, 162u8, 56u8, 91u8, 5u8, 64u8,
+ 7u8, 252u8, 194u8, 255u8, 170u8, 67u8, 137u8, 143u8, 192u8,
+ 2u8, 149u8, 38u8, 180u8,
+ ],
+ )
+ }
+ #[doc = "Privileged function that changes the code of an existing contract."]
+ #[doc = ""]
+ #[doc = "This takes care of updating refcounts and all other necessary operations. Returns"]
+ #[doc = "an error if either the `code_hash` or `dest` do not exist."]
+ #[doc = ""]
+ #[doc = "# Note"]
+ #[doc = ""]
+ #[doc = "This does **not** change the address of the contract in question. This means"]
+ #[doc = "that the contract address is no longer derived from its code hash after calling"]
+ #[doc = "this dispatchable."]
+ pub fn set_code(
+ &self,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ code_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "set_code",
+ SetCode { dest, code_hash },
+ [
+ 87u8, 240u8, 9u8, 107u8, 114u8, 69u8, 236u8, 184u8, 154u8,
+ 179u8, 251u8, 25u8, 177u8, 13u8, 199u8, 181u8, 166u8, 219u8,
+ 217u8, 11u8, 98u8, 167u8, 45u8, 214u8, 212u8, 208u8, 110u8,
+ 91u8, 8u8, 65u8, 232u8, 11u8,
+ ],
+ )
+ }
+ #[doc = "Makes a call to an account, optionally transferring some balance."]
+ #[doc = ""]
+ #[doc = "# Parameters"]
+ #[doc = ""]
+ #[doc = "* `dest`: Address of the contract to call."]
+ #[doc = "* `value`: The balance to transfer from the `origin` to `dest`."]
+ #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."]
+ #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged from the"]
+ #[doc = " caller to pay for the storage consumed."]
+ #[doc = "* `data`: The input data to pass to the contract."]
+ #[doc = ""]
+ #[doc = "* If the account is a smart-contract account, the associated code will be"]
+ #[doc = "executed and any value will be transferred."]
+ #[doc = "* If the account is a regular account, any value will be transferred."]
+ #[doc = "* If no account exists and the call value is not less than `existential_deposit`,"]
+ #[doc = "a regular account will be created and any value will be transferred."]
+ pub fn call(
+ &self,
+ dest: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ gas_limit: runtime_types::sp_weights::weight_v2::Weight,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ data: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "call",
+ Call {
+ dest,
+ value,
+ gas_limit,
+ storage_deposit_limit,
+ data,
+ },
+ [
+ 196u8, 11u8, 91u8, 234u8, 7u8, 74u8, 48u8, 20u8, 202u8, 48u8,
+ 234u8, 203u8, 148u8, 60u8, 217u8, 84u8, 219u8, 41u8, 230u8,
+ 150u8, 158u8, 153u8, 160u8, 81u8, 59u8, 2u8, 170u8, 20u8,
+ 252u8, 97u8, 6u8, 173u8,
+ ],
+ )
+ }
+ #[doc = "Instantiates a new contract from the supplied `code` optionally transferring"]
+ #[doc = "some balance."]
+ #[doc = ""]
+ #[doc = "This dispatchable has the same effect as calling [`Self::upload_code`] +"]
+ #[doc = "[`Self::instantiate`]. Bundling them together provides efficiency gains. Please"]
+ #[doc = "also check the documentation of [`Self::upload_code`]."]
+ #[doc = ""]
+ #[doc = "# Parameters"]
+ #[doc = ""]
+ #[doc = "* `value`: The balance to transfer from the `origin` to the newly created contract."]
+ #[doc = "* `gas_limit`: The gas limit enforced when executing the constructor."]
+ #[doc = "* `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved"]
+ #[doc = " from the caller to pay for the storage consumed."]
+ #[doc = "* `code`: The contract code to deploy in raw bytes."]
+ #[doc = "* `data`: The input data to pass to the contract constructor."]
+ #[doc = "* `salt`: Used for the address derivation. See [`Pallet::contract_address`]."]
+ #[doc = ""]
+ #[doc = "Instantiation is executed as follows:"]
+ #[doc = ""]
+ #[doc = "- The supplied `code` is instrumented, deployed, and a `code_hash` is created for that"]
+ #[doc = " code."]
+ #[doc = "- If the `code_hash` already exists on the chain the underlying `code` will be shared."]
+ #[doc = "- The destination address is computed based on the sender, code_hash and the salt."]
+ #[doc = "- The smart-contract account is created at the computed address."]
+ #[doc = "- The `value` is transferred to the new account."]
+ #[doc = "- The `deploy` function is executed in the context of the newly-created account."]
+ pub fn instantiate_with_code(
+ &self,
+ value: ::core::primitive::u128,
+ gas_limit: runtime_types::sp_weights::weight_v2::Weight,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ code: ::std::vec::Vec<::core::primitive::u8>,
+ data: ::std::vec::Vec<::core::primitive::u8>,
+ salt: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "instantiate_with_code",
+ InstantiateWithCode {
+ value,
+ gas_limit,
+ storage_deposit_limit,
+ code,
+ data,
+ salt,
+ },
+ [
+ 94u8, 238u8, 175u8, 86u8, 230u8, 186u8, 94u8, 60u8, 201u8,
+ 35u8, 117u8, 236u8, 221u8, 10u8, 180u8, 191u8, 140u8, 79u8,
+ 203u8, 134u8, 240u8, 21u8, 31u8, 63u8, 9u8, 17u8, 134u8,
+ 30u8, 244u8, 95u8, 171u8, 164u8,
+ ],
+ )
+ }
+ #[doc = "Instantiates a contract from a previously deployed wasm binary."]
+ #[doc = ""]
+ #[doc = "This function is identical to [`Self::instantiate_with_code`] but without the"]
+ #[doc = "code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary"]
+ #[doc = "must be supplied."]
+ pub fn instantiate(
+ &self,
+ value: ::core::primitive::u128,
+ gas_limit: runtime_types::sp_weights::weight_v2::Weight,
+ storage_deposit_limit: ::core::option::Option<
+ ::subxt::ext::codec::Compact<::core::primitive::u128>,
+ >,
+ code_hash: ::subxt::utils::H256,
+ data: ::std::vec::Vec<::core::primitive::u8>,
+ salt: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Contracts",
+ "instantiate",
+ Instantiate {
+ value,
+ gas_limit,
+ storage_deposit_limit,
+ code_hash,
+ data,
+ salt,
+ },
+ [
+ 251u8, 49u8, 158u8, 1u8, 138u8, 29u8, 106u8, 187u8, 68u8,
+ 135u8, 44u8, 196u8, 230u8, 237u8, 88u8, 244u8, 170u8, 168u8,
+ 11u8, 91u8, 185u8, 11u8, 45u8, 86u8, 113u8, 79u8, 92u8,
+ 248u8, 113u8, 47u8, 141u8, 10u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_contracts::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Contract deployed by address at the specified address."]
+ pub struct Instantiated {
+ pub deployer: ::subxt::utils::AccountId32,
+ pub contract: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Instantiated {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "Instantiated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Contract has been removed."]
+ #[doc = ""]
+ #[doc = "# Note"]
+ #[doc = ""]
+ #[doc = "The only way for a contract to be removed and emitting this event is by calling"]
+ #[doc = "`seal_terminate`."]
+ pub struct Terminated {
+ pub contract: ::subxt::utils::AccountId32,
+ pub beneficiary: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Terminated {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "Terminated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Code with the specified hash has been stored."]
+ pub struct CodeStored {
+ pub code_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for CodeStored {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "CodeStored";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A custom event emitted by the contract."]
+ pub struct ContractEmitted {
+ pub contract: ::subxt::utils::AccountId32,
+ pub data: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ impl ::subxt::events::StaticEvent for ContractEmitted {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "ContractEmitted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A code with the specified hash was removed."]
+ pub struct CodeRemoved {
+ pub code_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for CodeRemoved {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "CodeRemoved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A contract's code was updated."]
+ pub struct ContractCodeUpdated {
+ pub contract: ::subxt::utils::AccountId32,
+ pub new_code_hash: ::subxt::utils::H256,
+ pub old_code_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for ContractCodeUpdated {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "ContractCodeUpdated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A contract was called either by a plain account or another contract."]
+ #[doc = ""]
+ #[doc = "# Note"]
+ #[doc = ""]
+ #[doc = "Please keep in mind that like all events this is only emitted for successful"]
+ #[doc = "calls. This is because on failure all storage changes including events are"]
+ #[doc = "rolled back."]
+ pub struct Called {
+ pub caller: ::subxt::utils::AccountId32,
+ pub contract: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Called {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "Called";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A contract delegate called a code hash."]
+ #[doc = ""]
+ #[doc = "# Note"]
+ #[doc = ""]
+ #[doc = "Please keep in mind that like all events this is only emitted for successful"]
+ #[doc = "calls. This is because on failure all storage changes including events are"]
+ #[doc = "rolled back."]
+ pub struct DelegateCalled {
+ pub contract: ::subxt::utils::AccountId32,
+ pub code_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for DelegateCalled {
+ const PALLET: &'static str = "Contracts";
+ const EVENT: &'static str = "DelegateCalled";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " A mapping from an original code hash to the original code, untouched by instrumentation."]
+ pub fn pristine_code(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u8,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "PristineCode",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 244u8, 169u8, 220u8, 235u8, 62u8, 153u8, 226u8, 187u8, 220u8,
+ 141u8, 149u8, 75u8, 224u8, 117u8, 181u8, 147u8, 140u8, 84u8,
+ 9u8, 109u8, 230u8, 25u8, 186u8, 26u8, 171u8, 147u8, 19u8,
+ 78u8, 62u8, 170u8, 27u8, 105u8,
+ ],
+ )
+ }
+ #[doc = " A mapping from an original code hash to the original code, untouched by instrumentation."]
+ pub fn pristine_code_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u8,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "PristineCode",
+ Vec::new(),
+ [
+ 244u8, 169u8, 220u8, 235u8, 62u8, 153u8, 226u8, 187u8, 220u8,
+ 141u8, 149u8, 75u8, 224u8, 117u8, 181u8, 147u8, 140u8, 84u8,
+ 9u8, 109u8, 230u8, 25u8, 186u8, 26u8, 171u8, 147u8, 19u8,
+ 78u8, 62u8, 170u8, 27u8, 105u8,
+ ],
+ )
+ }
+ #[doc = " A mapping between an original code hash and instrumented wasm code, ready for execution."]
+ pub fn code_storage(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::wasm::PrefabWasmModule,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "CodeStorage",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 57u8, 55u8, 36u8, 82u8, 39u8, 194u8, 172u8, 147u8, 144u8,
+ 63u8, 101u8, 240u8, 179u8, 25u8, 177u8, 68u8, 253u8, 230u8,
+ 156u8, 228u8, 181u8, 194u8, 48u8, 99u8, 188u8, 117u8, 44u8,
+ 80u8, 121u8, 46u8, 149u8, 48u8,
+ ],
+ )
+ }
+ #[doc = " A mapping between an original code hash and instrumented wasm code, ready for execution."]
+ pub fn code_storage_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::wasm::PrefabWasmModule,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "CodeStorage",
+ Vec::new(),
+ [
+ 57u8, 55u8, 36u8, 82u8, 39u8, 194u8, 172u8, 147u8, 144u8,
+ 63u8, 101u8, 240u8, 179u8, 25u8, 177u8, 68u8, 253u8, 230u8,
+ 156u8, 228u8, 181u8, 194u8, 48u8, 99u8, 188u8, 117u8, 44u8,
+ 80u8, 121u8, 46u8, 149u8, 48u8,
+ ],
+ )
+ }
+ #[doc = " A mapping between an original code hash and its owner information."]
+ pub fn owner_info_of(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::wasm::OwnerInfo,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "OwnerInfoOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 147u8, 6u8, 225u8, 62u8, 211u8, 236u8, 61u8, 116u8, 152u8,
+ 219u8, 220u8, 17u8, 82u8, 221u8, 156u8, 88u8, 63u8, 204u8,
+ 16u8, 11u8, 184u8, 236u8, 181u8, 189u8, 170u8, 160u8, 60u8,
+ 64u8, 71u8, 250u8, 202u8, 186u8,
+ ],
+ )
+ }
+ #[doc = " A mapping between an original code hash and its owner information."]
+ pub fn owner_info_of_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::wasm::OwnerInfo,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "OwnerInfoOf",
+ Vec::new(),
+ [
+ 147u8, 6u8, 225u8, 62u8, 211u8, 236u8, 61u8, 116u8, 152u8,
+ 219u8, 220u8, 17u8, 82u8, 221u8, 156u8, 88u8, 63u8, 204u8,
+ 16u8, 11u8, 184u8, 236u8, 181u8, 189u8, 170u8, 160u8, 60u8,
+ 64u8, 71u8, 250u8, 202u8, 186u8,
+ ],
+ )
+ }
+ #[doc = " This is a **monotonic** counter incremented on contract instantiation."]
+ #[doc = ""]
+ #[doc = " This is used in order to generate unique trie ids for contracts."]
+ #[doc = " The trie id of a new contract is calculated from hash(account_id, nonce)."]
+ #[doc = " The nonce is required because otherwise the following sequence would lead to"]
+ #[doc = " a possible collision of storage:"]
+ #[doc = ""]
+ #[doc = " 1. Create a new contract."]
+ #[doc = " 2. Terminate the contract."]
+ #[doc = " 3. Immediately recreate the contract with the same account_id."]
+ #[doc = ""]
+ #[doc = " This is bad because the contents of a trie are deleted lazily and there might be"]
+ #[doc = " storage of the old instantiation still in it when the new contract is created. Please"]
+ #[doc = " note that we can't replace the counter by the block number because the sequence above"]
+ #[doc = " can happen in the same block. We also can't keep the account counter in memory only"]
+ #[doc = " because storage is the only way to communicate across different extrinsics in the"]
+ #[doc = " same block."]
+ #[doc = ""]
+ #[doc = " # Note"]
+ #[doc = ""]
+ #[doc = " Do not use it to determine the number of contracts. It won't be decremented if"]
+ #[doc = " a contract is destroyed."]
+ pub fn nonce(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "Nonce",
+ vec![],
+ [
+ 122u8, 169u8, 95u8, 131u8, 85u8, 32u8, 154u8, 114u8, 143u8,
+ 56u8, 12u8, 182u8, 64u8, 150u8, 241u8, 249u8, 254u8, 251u8,
+ 160u8, 235u8, 192u8, 41u8, 101u8, 232u8, 186u8, 108u8, 187u8,
+ 149u8, 210u8, 91u8, 179u8, 98u8,
+ ],
+ )
+ }
+ #[doc = " The code associated with a given account."]
+ #[doc = ""]
+ #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."]
+ pub fn contract_info_of(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::storage::ContractInfo,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "ContractInfoOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 176u8, 73u8, 209u8, 119u8, 242u8, 147u8, 64u8, 203u8, 253u8,
+ 178u8, 8u8, 239u8, 64u8, 68u8, 106u8, 153u8, 28u8, 124u8,
+ 52u8, 226u8, 67u8, 54u8, 177u8, 206u8, 238u8, 179u8, 222u8,
+ 225u8, 242u8, 0u8, 171u8, 184u8,
+ ],
+ )
+ }
+ #[doc = " The code associated with a given account."]
+ #[doc = ""]
+ #[doc = " TWOX-NOTE: SAFE since `AccountId` is a secure hash."]
+ pub fn contract_info_of_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::storage::ContractInfo,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "ContractInfoOf",
+ Vec::new(),
+ [
+ 176u8, 73u8, 209u8, 119u8, 242u8, 147u8, 64u8, 203u8, 253u8,
+ 178u8, 8u8, 239u8, 64u8, 68u8, 106u8, 153u8, 28u8, 124u8,
+ 52u8, 226u8, 67u8, 54u8, 177u8, 206u8, 238u8, 179u8, 222u8,
+ 225u8, 242u8, 0u8, 171u8, 184u8,
+ ],
+ )
+ }
+ #[doc = " Evicted contracts that await child trie deletion."]
+ #[doc = ""]
+ #[doc = " Child trie deletion is a heavy operation depending on the amount of storage items"]
+ #[doc = " stored in said trie. Therefore this operation is performed lazily in `on_initialize`."]
+ pub fn deletion_queue(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_contracts::storage::DeletedContract,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Contracts",
+ "DeletionQueue",
+ vec![],
+ [
+ 119u8, 169u8, 146u8, 210u8, 21u8, 216u8, 51u8, 225u8, 107u8,
+ 61u8, 42u8, 155u8, 169u8, 127u8, 140u8, 106u8, 255u8, 137u8,
+ 163u8, 199u8, 91u8, 137u8, 73u8, 61u8, 9u8, 167u8, 16u8,
+ 157u8, 183u8, 212u8, 35u8, 88u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " Cost schedule and limits."]
+ pub fn schedule(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_contracts::schedule::Schedule,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "Schedule",
+ [
+ 102u8, 52u8, 108u8, 178u8, 197u8, 144u8, 39u8, 115u8, 254u8,
+ 23u8, 38u8, 120u8, 11u8, 166u8, 178u8, 210u8, 91u8, 139u8,
+ 214u8, 231u8, 110u8, 188u8, 37u8, 149u8, 195u8, 73u8, 166u8,
+ 90u8, 55u8, 73u8, 88u8, 111u8,
+ ],
+ )
+ }
+ #[doc = " The maximum number of contracts that can be pending for deletion."]
+ #[doc = ""]
+ #[doc = " When a contract is deleted by calling `seal_terminate` it becomes inaccessible"]
+ #[doc = " immediately, but the deletion of the storage items it has accumulated is performed"]
+ #[doc = " later. The contract is put into the deletion queue. This defines how many"]
+ #[doc = " contracts can be queued up at the same time. If that limit is reached `seal_terminate`"]
+ #[doc = " will fail. The action must be retried in a later block in that case."]
+ #[doc = ""]
+ #[doc = " The reasons for limiting the queue depth are:"]
+ #[doc = ""]
+ #[doc = " 1. The queue is in storage in order to be persistent between blocks. We want to limit"]
+ #[doc = " \tthe amount of storage that can be consumed."]
+ #[doc = " 2. The queue is stored in a vector and needs to be decoded as a whole when reading"]
+ #[doc = "\t\tit at the end of each block. Longer queues take more weight to decode and hence"]
+ #[doc = "\t\tlimit the amount of items that can be deleted per block."]
+ pub fn deletion_queue_depth(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "DeletionQueueDepth",
+ [
+ 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 weight that can be consumed per block for lazy trie removal."]
+ #[doc = ""]
+ #[doc = " The amount of weight that is dedicated per block to work on the deletion queue. Larger"]
+ #[doc = " values allow more trie keys to be deleted in each block but reduce the amount of"]
+ #[doc = " weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more"]
+ #[doc = " information about the deletion queue."]
+ pub fn deletion_weight_limit(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_weights::weight_v2::Weight,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "DeletionWeightLimit",
+ [
+ 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8,
+ 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8,
+ 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8,
+ 165u8, 147u8, 134u8, 106u8, 76u8,
+ ],
+ )
+ }
+ #[doc = " The amount of balance a caller has to pay for each byte of storage."]
+ #[doc = ""]
+ #[doc = " # Note"]
+ #[doc = ""]
+ #[doc = " Changing this value for an existing chain might need a storage migration."]
+ pub fn deposit_per_byte(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "DepositPerByte",
+ [
+ 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 balance a caller has to pay for each storage item."]
+ #[doc = ""]
+ #[doc = " # Note"]
+ #[doc = ""]
+ #[doc = " Changing this value for an existing chain might need a storage migration."]
+ pub fn deposit_per_item(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "DepositPerItem",
+ [
+ 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 contract code in bytes. This limit applies to the instrumented"]
+ #[doc = " version of the code. Therefore `instantiate_with_code` can fail even when supplying"]
+ #[doc = " a wasm binary below this maximum size."]
+ #[doc = ""]
+ #[doc = " The value should be chosen carefully taking into the account the overall memory limit"]
+ #[doc = " your runtime has, as well as the [maximum allowed callstack"]
+ #[doc = " depth](#associatedtype.CallStack). Look into the `integrity_test()` for some insights."]
+ pub fn max_code_len(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "MaxCodeLen",
+ [
+ 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 allowable length in bytes for storage keys."]
+ pub fn max_storage_key_len(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "MaxStorageKeyLen",
+ [
+ 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 = " Make contract callable functions marked as `#[unstable]` available."]
+ #[doc = ""]
+ #[doc = " Contracts that use `#[unstable]` functions won't be able to be uploaded unless"]
+ #[doc = " this is set to `true`. This is only meant for testnets and dev nodes in order to"]
+ #[doc = " experiment with new features."]
+ #[doc = ""]
+ #[doc = " # Warning"]
+ #[doc = ""]
+ #[doc = " Do **not** set to `true` on productions chains."]
+ pub fn unsafe_unstable_interface(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "UnsafeUnstableInterface",
+ [
+ 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 = " The maximum length of the debug buffer in bytes."]
+ pub fn max_debug_buffer_len(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Contracts",
+ "MaxDebugBufferLen",
+ [
+ 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 sudo {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Sudo {
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SudoUncheckedWeight {
+ pub call:
+ ::std::boxed::Box,
+ pub weight: runtime_types::sp_weights::weight_v2::Weight,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetKey {
+ pub new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SudoAs {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub call:
+ ::std::boxed::Box,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Authenticates the sudo key and dispatches a function call with `Root` origin."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "- Limited storage reads."]
+ #[doc = "- One DB write (event)."]
+ #[doc = "- Weight of derivative `call` execution + 10,000."]
+ #[doc = "# "]
+ pub fn sudo(
+ &self,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Sudo",
+ "sudo",
+ Sudo {
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 158u8, 33u8, 202u8, 54u8, 152u8, 39u8, 55u8, 155u8, 113u8,
+ 166u8, 63u8, 36u8, 39u8, 17u8, 27u8, 16u8, 95u8, 200u8,
+ 112u8, 208u8, 219u8, 190u8, 214u8, 2u8, 240u8, 32u8, 12u8,
+ 21u8, 108u8, 18u8, 106u8, 177u8,
+ ],
+ )
+ }
+ #[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_."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "- The weight of this call is defined by the caller."]
+ #[doc = "# "]
+ pub fn sudo_unchecked_weight(
+ &self,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ weight: runtime_types::sp_weights::weight_v2::Weight,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Sudo",
+ "sudo_unchecked_weight",
+ SudoUncheckedWeight {
+ call: ::std::boxed::Box::new(call),
+ weight,
+ },
+ [
+ 60u8, 193u8, 102u8, 0u8, 100u8, 23u8, 221u8, 19u8, 124u8,
+ 101u8, 186u8, 135u8, 63u8, 42u8, 138u8, 30u8, 211u8, 117u8,
+ 21u8, 154u8, 0u8, 184u8, 108u8, 208u8, 50u8, 171u8, 77u8,
+ 40u8, 112u8, 27u8, 154u8, 221u8,
+ ],
+ )
+ }
+ #[doc = "Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo"]
+ #[doc = "key."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "- Limited storage reads."]
+ #[doc = "- One DB change."]
+ #[doc = "# "]
+ pub fn set_key(
+ &self,
+ new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Sudo",
+ "set_key",
+ SetKey { new },
+ [
+ 34u8, 116u8, 170u8, 18u8, 106u8, 17u8, 231u8, 159u8, 110u8,
+ 246u8, 2u8, 27u8, 161u8, 155u8, 163u8, 41u8, 138u8, 7u8,
+ 81u8, 98u8, 230u8, 182u8, 23u8, 222u8, 240u8, 117u8, 173u8,
+ 232u8, 192u8, 55u8, 92u8, 208u8,
+ ],
+ )
+ }
+ #[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_."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "- Limited storage reads."]
+ #[doc = "- One DB write (event)."]
+ #[doc = "- Weight of derivative `call` execution + 10,000."]
+ #[doc = "# "]
+ pub fn sudo_as(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Sudo",
+ "sudo_as",
+ SudoAs {
+ who,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 97u8, 147u8, 103u8, 98u8, 213u8, 44u8, 115u8, 53u8, 152u8,
+ 235u8, 250u8, 10u8, 86u8, 123u8, 0u8, 178u8, 24u8, 11u8,
+ 240u8, 251u8, 99u8, 72u8, 98u8, 90u8, 99u8, 46u8, 51u8,
+ 152u8, 0u8, 1u8, 220u8, 127u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_sudo::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A sudo just took place. \\[result\\]"]
+ pub struct Sudid {
+ pub sudo_result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for Sudid {
+ const PALLET: &'static str = "Sudo";
+ const EVENT: &'static str = "Sudid";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The \\[sudoer\\] just switched identity; the old key is supplied if one existed."]
+ pub struct KeyChanged {
+ pub old_sudoer: ::core::option::Option<::subxt::utils::AccountId32>,
+ }
+ impl ::subxt::events::StaticEvent for KeyChanged {
+ const PALLET: &'static str = "Sudo";
+ const EVENT: &'static str = "KeyChanged";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A sudo just took place. \\[result\\]"]
+ pub struct SudoAsDone {
+ pub sudo_result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for SudoAsDone {
+ const PALLET: &'static str = "Sudo";
+ const EVENT: &'static str = "SudoAsDone";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The `AccountId` of the sudo key."]
+ pub fn key(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Sudo",
+ "Key",
+ vec![],
+ [
+ 244u8, 73u8, 188u8, 136u8, 218u8, 163u8, 68u8, 179u8, 122u8,
+ 173u8, 34u8, 108u8, 137u8, 28u8, 182u8, 16u8, 196u8, 92u8,
+ 138u8, 34u8, 102u8, 80u8, 199u8, 88u8, 107u8, 207u8, 36u8,
+ 22u8, 168u8, 167u8, 20u8, 142u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod im_online {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Heartbeat {
+ pub heartbeat:
+ runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>,
+ pub signature:
+ runtime_types::pallet_im_online::sr25519::app_sr25519::Signature,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "# "]
+ #[doc = "- Complexity: `O(K + E)` where K is length of `Keys` (heartbeat.validators_len) and E is"]
+ #[doc = " length of `heartbeat.network_state.external_address`"]
+ #[doc = " - `O(K)`: decoding of length `K`"]
+ #[doc = " - `O(E)`: decoding/encoding of length `E`"]
+ #[doc = "- DbReads: pallet_session `Validators`, pallet_session `CurrentIndex`, `Keys`,"]
+ #[doc = " `ReceivedHeartbeats`"]
+ #[doc = "- DbWrites: `ReceivedHeartbeats`"]
+ #[doc = "# "]
+ pub fn heartbeat(
+ &self,
+ heartbeat: runtime_types::pallet_im_online::Heartbeat<
+ ::core::primitive::u32,
+ >,
+ signature : runtime_types :: pallet_im_online :: sr25519 :: app_sr25519 :: Signature,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "ImOnline",
+ "heartbeat",
+ Heartbeat {
+ heartbeat,
+ signature,
+ },
+ [
+ 212u8, 23u8, 174u8, 246u8, 60u8, 220u8, 178u8, 137u8, 53u8,
+ 146u8, 165u8, 225u8, 179u8, 209u8, 233u8, 152u8, 129u8,
+ 210u8, 126u8, 32u8, 216u8, 22u8, 76u8, 196u8, 255u8, 128u8,
+ 246u8, 161u8, 30u8, 186u8, 249u8, 34u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_im_online::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new heartbeat was received from `AuthorityId`."]
+ pub struct HeartbeatReceived {
+ pub authority_id:
+ runtime_types::pallet_im_online::sr25519::app_sr25519::Public,
+ }
+ impl ::subxt::events::StaticEvent for HeartbeatReceived {
+ const PALLET: &'static str = "ImOnline";
+ const EVENT: &'static str = "HeartbeatReceived";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "At the end of the session, no offence was committed."]
+ pub struct AllGood;
+ impl ::subxt::events::StaticEvent for AllGood {
+ const PALLET: &'static str = "ImOnline";
+ const EVENT: &'static str = "AllGood";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "At the end of the session, at least one validator was found to be offline."]
+ pub struct SomeOffline {
+ pub offline: ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ )>,
+ }
+ impl ::subxt::events::StaticEvent for SomeOffline {
+ const PALLET: &'static str = "ImOnline";
+ const EVENT: &'static str = "SomeOffline";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ 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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ImOnline",
+ "HeartbeatAfter",
+ vec![],
+ [
+ 108u8, 100u8, 85u8, 198u8, 226u8, 122u8, 94u8, 225u8, 97u8,
+ 154u8, 135u8, 95u8, 106u8, 28u8, 185u8, 78u8, 192u8, 196u8,
+ 35u8, 191u8, 12u8, 19u8, 163u8, 46u8, 232u8, 235u8, 193u8,
+ 81u8, 126u8, 204u8, 25u8, 228u8,
+ ],
+ )
+ }
+ #[doc = " The current set of keys that may issue a heartbeat."]
+ pub fn keys(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ runtime_types::pallet_im_online::sr25519::app_sr25519::Public,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ImOnline",
+ "Keys",
+ vec![],
+ [
+ 6u8, 198u8, 221u8, 58u8, 14u8, 166u8, 245u8, 103u8, 191u8,
+ 20u8, 69u8, 233u8, 147u8, 245u8, 24u8, 64u8, 207u8, 180u8,
+ 39u8, 208u8, 252u8, 236u8, 247u8, 112u8, 187u8, 97u8, 70u8,
+ 11u8, 248u8, 148u8, 208u8, 106u8,
+ ],
+ )
+ }
+ #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"]
+ #[doc = " `WrapperOpaque`."]
+ pub fn received_heartbeats(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_support::traits::misc::WrapperOpaque<
+ runtime_types::pallet_im_online::BoundedOpaqueNetworkState,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ImOnline",
+ "ReceivedHeartbeats",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 233u8, 128u8, 140u8, 233u8, 55u8, 146u8, 172u8, 54u8, 54u8,
+ 57u8, 141u8, 106u8, 168u8, 59u8, 147u8, 253u8, 119u8, 48u8,
+ 50u8, 251u8, 242u8, 109u8, 251u8, 2u8, 136u8, 80u8, 146u8,
+ 121u8, 180u8, 219u8, 245u8, 37u8,
+ ],
+ )
+ }
+ #[doc = " For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to"]
+ #[doc = " `WrapperOpaque`."]
+ pub fn received_heartbeats_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_support::traits::misc::WrapperOpaque<
+ runtime_types::pallet_im_online::BoundedOpaqueNetworkState,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ImOnline",
+ "ReceivedHeartbeats",
+ Vec::new(),
+ [
+ 233u8, 128u8, 140u8, 233u8, 55u8, 146u8, 172u8, 54u8, 54u8,
+ 57u8, 141u8, 106u8, 168u8, 59u8, 147u8, 253u8, 119u8, 48u8,
+ 50u8, 251u8, 242u8, 109u8, 251u8, 2u8, 136u8, 80u8, 146u8,
+ 121u8, 180u8, 219u8, 245u8, 37u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::core::primitive::u32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ImOnline",
+ "AuthoredBlocks",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8,
+ 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8,
+ 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8,
+ 227u8, 228u8, 223u8, 103u8, 151u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "ImOnline",
+ "AuthoredBlocks",
+ Vec::new(),
+ [
+ 50u8, 4u8, 242u8, 240u8, 247u8, 184u8, 114u8, 245u8, 233u8,
+ 170u8, 24u8, 197u8, 18u8, 245u8, 8u8, 28u8, 33u8, 115u8,
+ 166u8, 245u8, 221u8, 223u8, 56u8, 144u8, 33u8, 139u8, 10u8,
+ 227u8, 228u8, 223u8, 103u8, 151u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u64>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 authority_discovery {
+ use super::root_mod;
+ use super::runtime_types;
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Keys of the current authority set."]
+ pub fn keys(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ runtime_types::sp_authority_discovery::app::Public,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "AuthorityDiscovery",
+ "Keys",
+ vec![],
+ [
+ 6u8, 198u8, 221u8, 58u8, 14u8, 166u8, 245u8, 103u8, 191u8,
+ 20u8, 69u8, 233u8, 147u8, 245u8, 24u8, 64u8, 207u8, 180u8,
+ 39u8, 208u8, 252u8, 236u8, 247u8, 112u8, 187u8, 97u8, 70u8,
+ 11u8, 248u8, 148u8, 208u8, 106u8,
+ ],
+ )
+ }
+ #[doc = " Keys of the next authority set."]
+ pub fn next_keys(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::weak_bounded_vec::WeakBoundedVec<
+ runtime_types::sp_authority_discovery::app::Public,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "AuthorityDiscovery",
+ "NextKeys",
+ vec![],
+ [
+ 213u8, 94u8, 49u8, 159u8, 135u8, 1u8, 13u8, 150u8, 28u8,
+ 15u8, 105u8, 130u8, 90u8, 15u8, 130u8, 138u8, 186u8, 118u8,
+ 10u8, 238u8, 173u8, 229u8, 8u8, 144u8, 206u8, 121u8, 90u8,
+ 203u8, 125u8, 106u8, 145u8, 144u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ 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 :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: [::core::primitive::u8; 16usize],
+ pub timeslot: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ impl ::subxt::events::StaticEvent for Offence {
+ const PALLET: &'static str = "Offences";
+ const EVENT: &'static str = "Offence";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The primary structure that holds all offence records keyed by report identifiers."]
+ pub fn reports(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_staking::offence::OffenceDetails<
+ ::subxt::utils::AccountId32,
+ (
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ ),
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Offences",
+ "Reports",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 144u8, 30u8, 66u8, 199u8, 102u8, 236u8, 175u8, 201u8, 206u8,
+ 170u8, 55u8, 162u8, 137u8, 120u8, 220u8, 213u8, 57u8, 252u8,
+ 0u8, 88u8, 210u8, 68u8, 5u8, 25u8, 77u8, 114u8, 204u8, 23u8,
+ 190u8, 32u8, 211u8, 30u8,
+ ],
+ )
+ }
+ #[doc = " The primary structure that holds all offence records keyed by report identifiers."]
+ pub fn reports_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_staking::offence::OffenceDetails<
+ ::subxt::utils::AccountId32,
+ (
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_staking::Exposure<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ ),
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Offences",
+ "Reports",
+ Vec::new(),
+ [
+ 144u8, 30u8, 66u8, 199u8, 102u8, 236u8, 175u8, 201u8, 206u8,
+ 170u8, 55u8, 162u8, 137u8, 120u8, 220u8, 213u8, 57u8, 252u8,
+ 0u8, 88u8, 210u8, 68u8, 5u8, 25u8, 77u8, 114u8, 204u8, 23u8,
+ 190u8, 32u8, 211u8, 30u8,
+ ],
+ )
+ }
+ #[doc = " A vector of reports of the same kind that happened at the same time slot."]
+ pub fn concurrent_reports_index(
+ &self,
+ _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>,
+ _1: impl ::std::borrow::Borrow<[::core::primitive::u8]>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::H256>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Offences",
+ "ConcurrentReportsIndex",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 106u8, 21u8, 104u8, 5u8, 4u8, 66u8, 28u8, 70u8, 161u8, 195u8,
+ 238u8, 28u8, 69u8, 241u8, 221u8, 113u8, 140u8, 103u8, 181u8,
+ 143u8, 60u8, 177u8, 13u8, 129u8, 224u8, 149u8, 77u8, 32u8,
+ 75u8, 74u8, 101u8, 65u8,
+ ],
+ )
+ }
+ #[doc = " A vector of reports of the same kind that happened at the same time slot."]
+ pub fn concurrent_reports_index_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::H256>,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Offences",
+ "ConcurrentReportsIndex",
+ Vec::new(),
+ [
+ 106u8, 21u8, 104u8, 5u8, 4u8, 66u8, 28u8, 70u8, 161u8, 195u8,
+ 238u8, 28u8, 69u8, 241u8, 221u8, 113u8, 140u8, 103u8, 181u8,
+ 143u8, 60u8, 177u8, 13u8, 129u8, 224u8, 149u8, 77u8, 32u8,
+ 75u8, 74u8, 101u8, 65u8,
+ ],
+ )
+ }
+ #[doc = " Enumerates all reports of a kind along with the time they happened."]
+ #[doc = ""]
+ #[doc = " All reports are sorted by the time of offence."]
+ #[doc = ""]
+ #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"]
+ #[doc = " different types are not supported at the moment so we are doing the manual serialization."]
+ pub fn reports_by_kind_index(
+ &self,
+ _0: impl ::std::borrow::Borrow<[::core::primitive::u8; 16usize]>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::core::primitive::u8>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Offences",
+ "ReportsByKindIndex",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8,
+ 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8,
+ 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, 242u8, 106u8, 21u8,
+ 136u8, 98u8, 215u8, 180u8, 145u8,
+ ],
+ )
+ }
+ #[doc = " Enumerates all reports of a kind along with the time they happened."]
+ #[doc = ""]
+ #[doc = " All reports are sorted by the time of offence."]
+ #[doc = ""]
+ #[doc = " Note that the actual type of this mapping is `Vec`, this is because values of"]
+ #[doc = " different types are not supported at the moment so we are doing the manual serialization."]
+ pub fn reports_by_kind_index_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::core::primitive::u8>,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Offences",
+ "ReportsByKindIndex",
+ Vec::new(),
+ [
+ 162u8, 66u8, 131u8, 48u8, 250u8, 237u8, 179u8, 214u8, 36u8,
+ 137u8, 226u8, 136u8, 120u8, 61u8, 215u8, 43u8, 164u8, 50u8,
+ 91u8, 164u8, 20u8, 96u8, 189u8, 100u8, 242u8, 106u8, 21u8,
+ 136u8, 98u8, 215u8, 180u8, 145u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod historical {
+ use super::root_mod;
+ use super::runtime_types;
+ }
+ pub mod randomness_collective_flip {
+ use super::root_mod;
+ use super::runtime_types;
+ pub mod storage {
+ use super::runtime_types;
+ 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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::H256,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "RandomnessCollectiveFlip",
+ "RandomMaterial",
+ vec![],
+ [
+ 152u8, 126u8, 73u8, 88u8, 54u8, 147u8, 6u8, 19u8, 214u8,
+ 40u8, 159u8, 30u8, 236u8, 61u8, 240u8, 65u8, 178u8, 94u8,
+ 146u8, 152u8, 135u8, 252u8, 160u8, 86u8, 123u8, 114u8, 251u8,
+ 140u8, 98u8, 143u8, 217u8, 242u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod identity {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Identity pallet declaration."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AddRegistrar {
+ pub account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetIdentity {
+ pub info: ::std::boxed::Box<
+ runtime_types::pallet_identity::types::IdentityInfo,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetSubs {
+ pub subs: ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_identity::types::Data,
+ )>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ClearIdentity;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RequestJudgement {
+ #[codec(compact)]
+ pub reg_index: ::core::primitive::u32,
+ #[codec(compact)]
+ pub max_fee: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelRequest {
+ pub reg_index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetFee {
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ #[codec(compact)]
+ pub fee: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetAccountId {
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ pub new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetFields {
+ #[codec(compact)]
+ pub index: ::core::primitive::u32,
+ pub fields: runtime_types::pallet_identity::types::BitFlags<
+ runtime_types::pallet_identity::types::IdentityField,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ProvideJudgement {
+ #[codec(compact)]
+ pub reg_index: ::core::primitive::u32,
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub judgement: runtime_types::pallet_identity::types::Judgement<
+ ::core::primitive::u128,
+ >,
+ pub identity: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct KillIdentity {
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AddSub {
+ pub sub: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub data: runtime_types::pallet_identity::types::Data,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RenameSub {
+ pub sub: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub data: runtime_types::pallet_identity::types::Data,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveSub {
+ pub sub: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct QuitSub;
+ 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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R)` where `R` registrar-count (governance-bounded and code-bounded)."]
+ #[doc = "- One storage mutation (codec `O(R)`)."]
+ #[doc = "- One event."]
+ #[doc = "# "]
+ pub fn add_registrar(
+ &self,
+ account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "add_registrar",
+ AddRegistrar { account },
+ [
+ 96u8, 200u8, 92u8, 23u8, 3u8, 144u8, 56u8, 53u8, 245u8,
+ 210u8, 33u8, 36u8, 183u8, 233u8, 41u8, 1u8, 127u8, 2u8, 25u8,
+ 5u8, 15u8, 133u8, 4u8, 107u8, 206u8, 155u8, 114u8, 39u8,
+ 14u8, 235u8, 115u8, 172u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(X + X' + R)`"]
+ #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)"]
+ #[doc = " - where `R` judgements-count (registrar-count-bounded)"]
+ #[doc = "- One balance reserve operation."]
+ #[doc = "- One storage mutation (codec-read `O(X' + R)`, codec-write `O(X + R)`)."]
+ #[doc = "- One event."]
+ #[doc = "# "]
+ pub fn set_identity(
+ &self,
+ info: runtime_types::pallet_identity::types::IdentityInfo,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "set_identity",
+ SetIdentity {
+ info: ::std::boxed::Box::new(info),
+ },
+ [
+ 130u8, 89u8, 118u8, 6u8, 134u8, 166u8, 35u8, 192u8, 73u8,
+ 6u8, 171u8, 20u8, 225u8, 255u8, 152u8, 142u8, 111u8, 8u8,
+ 206u8, 200u8, 64u8, 52u8, 110u8, 123u8, 42u8, 101u8, 191u8,
+ 242u8, 133u8, 139u8, 154u8, 205u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(P + S)`"]
+ #[doc = " - where `P` old-subs-count (hard- and deposit-bounded)."]
+ #[doc = " - where `S` subs-count (hard- and deposit-bounded)."]
+ #[doc = "- At most one balance operations."]
+ #[doc = "- DB:"]
+ #[doc = " - `P + S` storage mutations (codec complexity `O(1)`)"]
+ #[doc = " - One storage read (codec complexity `O(P)`)."]
+ #[doc = " - One storage write (codec complexity `O(S)`)."]
+ #[doc = " - One storage-exists (`IdentityOf::contains_key`)."]
+ #[doc = "# "]
+ pub fn set_subs(
+ &self,
+ subs: ::std::vec::Vec<(
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_identity::types::Data,
+ )>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "set_subs",
+ SetSubs { subs },
+ [
+ 177u8, 219u8, 84u8, 183u8, 5u8, 32u8, 192u8, 82u8, 174u8,
+ 68u8, 198u8, 224u8, 56u8, 85u8, 134u8, 171u8, 30u8, 132u8,
+ 140u8, 236u8, 117u8, 24u8, 150u8, 218u8, 146u8, 194u8, 144u8,
+ 92u8, 103u8, 206u8, 46u8, 90u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R + S + X)`"]
+ #[doc = " - where `R` registrar-count (governance-bounded)."]
+ #[doc = " - where `S` subs-count (hard- and deposit-bounded)."]
+ #[doc = " - where `X` additional-field-count (deposit-bounded and code-bounded)."]
+ #[doc = "- One balance-unreserve operation."]
+ #[doc = "- `2` storage reads and `S + 2` storage deletions."]
+ #[doc = "- One event."]
+ #[doc = "# "]
+ pub fn clear_identity(
+ &self,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "clear_identity",
+ ClearIdentity {},
+ [
+ 75u8, 44u8, 74u8, 122u8, 149u8, 202u8, 114u8, 230u8, 0u8,
+ 255u8, 140u8, 122u8, 14u8, 196u8, 205u8, 249u8, 220u8, 94u8,
+ 216u8, 34u8, 63u8, 14u8, 8u8, 205u8, 74u8, 23u8, 181u8,
+ 129u8, 252u8, 110u8, 231u8, 114u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R + X)`."]
+ #[doc = "- One balance-reserve operation."]
+ #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(X + R)`."]
+ #[doc = "- One event."]
+ #[doc = "# "]
+ pub fn request_judgement(
+ &self,
+ reg_index: ::core::primitive::u32,
+ max_fee: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "request_judgement",
+ RequestJudgement { reg_index, max_fee },
+ [
+ 186u8, 149u8, 61u8, 54u8, 159u8, 194u8, 77u8, 161u8, 220u8,
+ 157u8, 3u8, 216u8, 23u8, 105u8, 119u8, 76u8, 144u8, 198u8,
+ 157u8, 45u8, 235u8, 139u8, 87u8, 82u8, 81u8, 12u8, 25u8,
+ 134u8, 225u8, 92u8, 182u8, 101u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R + X)`."]
+ #[doc = "- One balance-reserve operation."]
+ #[doc = "- One storage mutation `O(R + X)`."]
+ #[doc = "- One event"]
+ #[doc = "# "]
+ pub fn cancel_request(
+ &self,
+ reg_index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "cancel_request",
+ CancelRequest { reg_index },
+ [
+ 83u8, 180u8, 239u8, 126u8, 32u8, 51u8, 17u8, 20u8, 180u8,
+ 3u8, 59u8, 96u8, 24u8, 32u8, 136u8, 92u8, 58u8, 254u8, 68u8,
+ 70u8, 50u8, 11u8, 51u8, 91u8, 180u8, 79u8, 81u8, 84u8, 216u8,
+ 138u8, 6u8, 215u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R)`."]
+ #[doc = "- One storage mutation `O(R)`."]
+ #[doc = "- Benchmark: 7.315 + R * 0.329 µs (min squares analysis)"]
+ #[doc = "# "]
+ pub fn set_fee(
+ &self,
+ index: ::core::primitive::u32,
+ fee: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "set_fee",
+ SetFee { index, fee },
+ [
+ 21u8, 157u8, 123u8, 182u8, 160u8, 190u8, 117u8, 37u8, 136u8,
+ 133u8, 104u8, 234u8, 31u8, 145u8, 115u8, 154u8, 125u8, 40u8,
+ 2u8, 87u8, 118u8, 56u8, 247u8, 73u8, 89u8, 0u8, 251u8, 3u8,
+ 58u8, 105u8, 239u8, 211u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R)`."]
+ #[doc = "- One storage mutation `O(R)`."]
+ #[doc = "- Benchmark: 8.823 + R * 0.32 µs (min squares analysis)"]
+ #[doc = "# "]
+ pub fn set_account_id(
+ &self,
+ index: ::core::primitive::u32,
+ new: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "set_account_id",
+ SetAccountId { index, new },
+ [
+ 14u8, 154u8, 84u8, 48u8, 59u8, 133u8, 45u8, 204u8, 255u8,
+ 85u8, 157u8, 88u8, 56u8, 207u8, 113u8, 184u8, 233u8, 139u8,
+ 129u8, 118u8, 59u8, 9u8, 211u8, 184u8, 32u8, 141u8, 126u8,
+ 208u8, 179u8, 4u8, 2u8, 95u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R)`."]
+ #[doc = "- One storage mutation `O(R)`."]
+ #[doc = "- Benchmark: 7.464 + R * 0.325 µs (min squares analysis)"]
+ #[doc = "# "]
+ pub fn set_fields(
+ &self,
+ index: ::core::primitive::u32,
+ fields: runtime_types::pallet_identity::types::BitFlags<
+ runtime_types::pallet_identity::types::IdentityField,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "set_fields",
+ SetFields { index, fields },
+ [
+ 50u8, 196u8, 179u8, 71u8, 66u8, 65u8, 235u8, 7u8, 51u8, 14u8,
+ 81u8, 173u8, 201u8, 58u8, 6u8, 151u8, 174u8, 245u8, 102u8,
+ 184u8, 28u8, 84u8, 125u8, 93u8, 126u8, 134u8, 92u8, 203u8,
+ 200u8, 129u8, 240u8, 252u8,
+ ],
+ )
+ }
+ #[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 [`IdentityInfo`] for that the judgement is provided."]
+ #[doc = ""]
+ #[doc = "Emits `JudgementGiven` if successful."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R + X)`."]
+ #[doc = "- One balance-transfer operation."]
+ #[doc = "- Up to one account-lookup operation."]
+ #[doc = "- Storage: 1 read `O(R)`, 1 mutate `O(R + X)`."]
+ #[doc = "- One event."]
+ #[doc = "# "]
+ pub fn provide_judgement(
+ &self,
+ reg_index: ::core::primitive::u32,
+ target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ judgement: runtime_types::pallet_identity::types::Judgement<
+ ::core::primitive::u128,
+ >,
+ identity: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "provide_judgement",
+ ProvideJudgement {
+ reg_index,
+ target,
+ judgement,
+ identity,
+ },
+ [
+ 83u8, 253u8, 77u8, 208u8, 198u8, 25u8, 202u8, 213u8, 223u8,
+ 184u8, 231u8, 185u8, 186u8, 216u8, 54u8, 62u8, 3u8, 7u8,
+ 107u8, 152u8, 126u8, 195u8, 175u8, 221u8, 134u8, 169u8,
+ 199u8, 124u8, 232u8, 157u8, 67u8, 75u8,
+ ],
+ )
+ }
+ #[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."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- `O(R + S + X)`."]
+ #[doc = "- One balance-reserve operation."]
+ #[doc = "- `S + 2` storage mutations."]
+ #[doc = "- One event."]
+ #[doc = "# "]
+ pub fn kill_identity(
+ &self,
+ target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "kill_identity",
+ KillIdentity { target },
+ [
+ 65u8, 106u8, 116u8, 209u8, 219u8, 181u8, 185u8, 75u8, 146u8,
+ 194u8, 187u8, 170u8, 7u8, 34u8, 140u8, 87u8, 107u8, 112u8,
+ 229u8, 34u8, 65u8, 71u8, 58u8, 152u8, 74u8, 253u8, 137u8,
+ 69u8, 149u8, 214u8, 158u8, 19u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ data: runtime_types::pallet_identity::types::Data,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "add_sub",
+ AddSub { sub, data },
+ [
+ 206u8, 112u8, 143u8, 96u8, 152u8, 12u8, 174u8, 226u8, 23u8,
+ 27u8, 154u8, 188u8, 195u8, 233u8, 185u8, 180u8, 246u8, 218u8,
+ 154u8, 129u8, 138u8, 52u8, 212u8, 109u8, 54u8, 211u8, 219u8,
+ 255u8, 39u8, 79u8, 154u8, 123u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ data: runtime_types::pallet_identity::types::Data,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "rename_sub",
+ RenameSub { sub, data },
+ [
+ 110u8, 28u8, 134u8, 225u8, 44u8, 242u8, 20u8, 22u8, 197u8,
+ 49u8, 173u8, 178u8, 106u8, 181u8, 103u8, 90u8, 27u8, 73u8,
+ 102u8, 130u8, 2u8, 216u8, 172u8, 186u8, 124u8, 244u8, 128u8,
+ 6u8, 112u8, 128u8, 25u8, 245u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "remove_sub",
+ RemoveSub { sub },
+ [
+ 92u8, 201u8, 70u8, 170u8, 248u8, 110u8, 179u8, 186u8, 213u8,
+ 197u8, 150u8, 156u8, 156u8, 50u8, 19u8, 158u8, 186u8, 61u8,
+ 106u8, 64u8, 84u8, 38u8, 73u8, 134u8, 132u8, 233u8, 50u8,
+ 152u8, 40u8, 18u8, 212u8, 121u8,
+ ],
+ )
+ }
+ #[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::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Identity",
+ "quit_sub",
+ QuitSub {},
+ [
+ 62u8, 57u8, 73u8, 72u8, 119u8, 216u8, 250u8, 155u8, 57u8,
+ 169u8, 157u8, 44u8, 87u8, 51u8, 63u8, 231u8, 77u8, 7u8, 0u8,
+ 119u8, 244u8, 42u8, 179u8, 51u8, 254u8, 240u8, 55u8, 25u8,
+ 142u8, 38u8, 87u8, 44u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_identity::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A name was set or reset (which will remove all judgements)."]
+ pub struct IdentitySet {
+ pub who: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for IdentitySet {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "IdentitySet";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A name was cleared, and the given balance returned."]
+ pub struct IdentityCleared {
+ pub who: ::subxt::utils::AccountId32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for IdentityCleared {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "IdentityCleared";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A name was removed and the given balance slashed."]
+ pub struct IdentityKilled {
+ pub who: ::subxt::utils::AccountId32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for IdentityKilled {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "IdentityKilled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A judgement was asked from a registrar."]
+ pub struct JudgementRequested {
+ pub who: ::subxt::utils::AccountId32,
+ pub registrar_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for JudgementRequested {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "JudgementRequested";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A judgement request was retracted."]
+ pub struct JudgementUnrequested {
+ pub who: ::subxt::utils::AccountId32,
+ pub registrar_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for JudgementUnrequested {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "JudgementUnrequested";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A judgement was given by a registrar."]
+ pub struct JudgementGiven {
+ pub target: ::subxt::utils::AccountId32,
+ pub registrar_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for JudgementGiven {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "JudgementGiven";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A registrar was added."]
+ pub struct RegistrarAdded {
+ pub registrar_index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for RegistrarAdded {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "RegistrarAdded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A sub-identity was added to an identity and the deposit paid."]
+ pub struct SubIdentityAdded {
+ pub sub: ::subxt::utils::AccountId32,
+ pub main: ::subxt::utils::AccountId32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for SubIdentityAdded {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "SubIdentityAdded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A sub-identity was removed from an identity and the deposit freed."]
+ pub struct SubIdentityRemoved {
+ pub sub: ::subxt::utils::AccountId32,
+ pub main: ::subxt::utils::AccountId32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for SubIdentityRemoved {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "SubIdentityRemoved";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub main: ::subxt::utils::AccountId32,
+ pub deposit: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for SubIdentityRevoked {
+ const PALLET: &'static str = "Identity";
+ const EVENT: &'static str = "SubIdentityRevoked";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Information that is pertinent to identify the entity behind an account."]
+ #[doc = ""]
+ #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."]
+ pub fn identity_of(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_identity::types::Registration<
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "IdentityOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8,
+ 95u8, 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8,
+ 245u8, 39u8, 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8,
+ 247u8, 104u8, 208u8, 171u8, 82u8,
+ ],
+ )
+ }
+ #[doc = " Information that is pertinent to identify the entity behind an account."]
+ #[doc = ""]
+ #[doc = " TWOX-NOTE: OK ― `AccountId` is a secure hash."]
+ pub fn identity_of_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_identity::types::Registration<
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "IdentityOf",
+ Vec::new(),
+ [
+ 193u8, 195u8, 180u8, 188u8, 129u8, 250u8, 180u8, 219u8, 22u8,
+ 95u8, 175u8, 170u8, 143u8, 188u8, 80u8, 124u8, 234u8, 228u8,
+ 245u8, 39u8, 72u8, 153u8, 107u8, 199u8, 23u8, 75u8, 47u8,
+ 247u8, 104u8, 208u8, 171u8, 82u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_identity::types::Data,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "SuperOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8,
+ 149u8, 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8,
+ 18u8, 204u8, 166u8, 193u8, 133u8, 167u8, 248u8, 117u8, 80u8,
+ 137u8, 158u8, 111u8, 100u8, 137u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::subxt::utils::AccountId32,
+ runtime_types::pallet_identity::types::Data,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "SuperOf",
+ Vec::new(),
+ [
+ 170u8, 249u8, 112u8, 249u8, 75u8, 176u8, 21u8, 29u8, 152u8,
+ 149u8, 69u8, 113u8, 20u8, 92u8, 113u8, 130u8, 135u8, 62u8,
+ 18u8, 204u8, 166u8, 193u8, 133u8, 167u8, 248u8, 117u8, 80u8,
+ 137u8, 158u8, 111u8, 100u8, 137u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u128,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ )>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "SubsOf",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8,
+ 206u8, 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8,
+ 53u8, 7u8, 44u8, 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8,
+ 175u8, 84u8, 6u8, 4u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u128,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ )>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "SubsOf",
+ Vec::new(),
+ [
+ 128u8, 15u8, 175u8, 155u8, 216u8, 225u8, 200u8, 169u8, 215u8,
+ 206u8, 110u8, 22u8, 204u8, 89u8, 212u8, 210u8, 159u8, 169u8,
+ 53u8, 7u8, 44u8, 164u8, 91u8, 151u8, 7u8, 227u8, 38u8, 230u8,
+ 175u8, 84u8, 6u8, 4u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::option::Option<
+ runtime_types::pallet_identity::types::RegistrarInfo<
+ ::core::primitive::u128,
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Identity",
+ "Registrars",
+ vec![],
+ [
+ 157u8, 87u8, 39u8, 240u8, 154u8, 54u8, 241u8, 229u8, 76u8,
+ 9u8, 62u8, 252u8, 40u8, 143u8, 186u8, 182u8, 233u8, 187u8,
+ 251u8, 61u8, 236u8, 229u8, 19u8, 55u8, 42u8, 36u8, 82u8,
+ 173u8, 215u8, 155u8, 229u8, 111u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 additional field for a registered identity."]
+ pub fn field_deposit(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Identity",
+ "FieldDeposit",
+ [
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 additional fields that may be stored in an ID. Needed to bound the I/O"]
+ #[doc = " required to access an identity, but can be pretty high."]
+ pub fn max_additional_fields(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Identity",
+ "MaxAdditionalFields",
+ [
+ 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 = " Maxmimum number of registrars allowed in the system. Needed to bound the complexity"]
+ #[doc = " of, e.g., updating judgements."]
+ pub fn max_registrars(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod society {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Bid {
+ pub value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Unbid {
+ pub pos: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vouch {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub value: ::core::primitive::u128,
+ pub tip: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Unvouch {
+ pub pos: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vote {
+ pub candidate: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub approve: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct DefenderVote {
+ pub approve: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Payout;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Found {
+ pub founder: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub max_members: ::core::primitive::u32,
+ pub rules: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Unfound;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct JudgeSuspendedMember {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub forgive: ::core::primitive::bool,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct JudgeSuspendedCandidate {
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub judgement: runtime_types::pallet_society::Judgement,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetMaxMembers {
+ pub max: ::core::primitive::u32,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "A user outside of the society can make a bid for entry."]
+ #[doc = ""]
+ #[doc = "Payment: `CandidateDeposit` will be reserved for making a bid. It is returned"]
+ #[doc = "when the bid becomes a member, or if the bid calls `unbid`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `value`: A one time payment the bid would like to receive when joining the society."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: B (len of bids), C (len of candidates), M (len of members), X (balance reserve)"]
+ #[doc = "- Storage Reads:"]
+ #[doc = "\t- One storage read to check for suspended candidate. O(1)"]
+ #[doc = "\t- One storage read to check for suspended member. O(1)"]
+ #[doc = "\t- One storage read to retrieve all current bids. O(B)"]
+ #[doc = "\t- One storage read to retrieve all current candidates. O(C)"]
+ #[doc = "\t- One storage read to retrieve all members. O(M)"]
+ #[doc = "- Storage Writes:"]
+ #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"]
+ #[doc = " w/ read)"]
+ #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"]
+ #[doc = "- Notable Computation:"]
+ #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."]
+ #[doc = "\t- O(log B) search to insert the new bid sorted."]
+ #[doc = "- External Pallet Operations:"]
+ #[doc = "\t- One balance reserve operation. O(X)"]
+ #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."]
+ #[doc = "- Events:"]
+ #[doc = "\t- One event for new bid."]
+ #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"]
+ #[doc = "# "]
+ pub fn bid(
+ &self,
+ value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "bid",
+ Bid { value },
+ [
+ 101u8, 242u8, 48u8, 240u8, 74u8, 51u8, 49u8, 61u8, 6u8, 7u8,
+ 47u8, 200u8, 185u8, 217u8, 176u8, 139u8, 44u8, 167u8, 131u8,
+ 23u8, 219u8, 69u8, 216u8, 213u8, 177u8, 50u8, 8u8, 213u8,
+ 130u8, 90u8, 81u8, 4u8,
+ ],
+ )
+ }
+ #[doc = "A bidder can remove their bid for entry into society."]
+ #[doc = "By doing so, they will have their candidate deposit returned or"]
+ #[doc = "they will unvouch their voucher."]
+ #[doc = ""]
+ #[doc = "Payment: The bid deposit is unreserved if the user made a bid."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and a bidder."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `pos`: Position in the `Bids` vector of the bid who wants to unbid."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: B (len of bids), X (balance unreserve)"]
+ #[doc = "- One storage read and write to retrieve and update the bids. O(B)"]
+ #[doc = "- Either one unreserve balance action O(X) or one vouching storage removal. O(1)"]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(B + X)"]
+ #[doc = "# "]
+ pub fn unbid(
+ &self,
+ pos: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "unbid",
+ Unbid { pos },
+ [
+ 255u8, 165u8, 200u8, 241u8, 93u8, 213u8, 155u8, 12u8, 178u8,
+ 108u8, 222u8, 14u8, 26u8, 226u8, 107u8, 129u8, 162u8, 151u8,
+ 81u8, 83u8, 39u8, 106u8, 151u8, 149u8, 19u8, 85u8, 28u8,
+ 222u8, 227u8, 9u8, 189u8, 39u8,
+ ],
+ )
+ }
+ #[doc = "As a member, vouch for someone to join society by placing a bid on their behalf."]
+ #[doc = ""]
+ #[doc = "There is no deposit required to vouch for a new bid, but a member can only vouch for"]
+ #[doc = "one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by"]
+ #[doc = "the suspension judgement origin, the member will be banned from vouching again."]
+ #[doc = ""]
+ #[doc = "As a vouching member, you can claim a tip if the candidate is accepted. This tip will"]
+ #[doc = "be paid as a portion of the reward the member will receive for joining the society."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and a member."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `who`: The user who you would like to vouch for."]
+ #[doc = "- `value`: The total reward to be paid between you and the candidate if they become"]
+ #[doc = "a member in the society."]
+ #[doc = "- `tip`: Your cut of the total `value` payout when the candidate is inducted into"]
+ #[doc = "the society. Tips larger than `value` will be saturated upon payout."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: B (len of bids), C (len of candidates), M (len of members)"]
+ #[doc = "- Storage Reads:"]
+ #[doc = "\t- One storage read to retrieve all members. O(M)"]
+ #[doc = "\t- One storage read to check member is not already vouching. O(1)"]
+ #[doc = "\t- One storage read to check for suspended candidate. O(1)"]
+ #[doc = "\t- One storage read to check for suspended member. O(1)"]
+ #[doc = "\t- One storage read to retrieve all current bids. O(B)"]
+ #[doc = "\t- One storage read to retrieve all current candidates. O(C)"]
+ #[doc = "- Storage Writes:"]
+ #[doc = "\t- One storage write to insert vouching status to the member. O(1)"]
+ #[doc = "\t- One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization"]
+ #[doc = " w/ read)"]
+ #[doc = "\t- Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)"]
+ #[doc = "- Notable Computation:"]
+ #[doc = "\t- O(log M) search to check sender is a member."]
+ #[doc = "\t- O(B + C + log M) search to check user is not already a part of society."]
+ #[doc = "\t- O(log B) search to insert the new bid sorted."]
+ #[doc = "- External Pallet Operations:"]
+ #[doc = "\t- One balance reserve operation. O(X)"]
+ #[doc = "\t- Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT."]
+ #[doc = "- Events:"]
+ #[doc = "\t- One event for vouch."]
+ #[doc = "\t- Up to one event for AutoUnbid if bid.len() > MAX_BID_COUNT."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + B + C + logM + logB + X)"]
+ #[doc = "# "]
+ pub fn vouch(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ value: ::core::primitive::u128,
+ tip: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "vouch",
+ Vouch { who, value, tip },
+ [
+ 237u8, 190u8, 123u8, 221u8, 175u8, 83u8, 96u8, 83u8, 152u8,
+ 207u8, 134u8, 176u8, 124u8, 32u8, 23u8, 249u8, 153u8, 220u8,
+ 79u8, 164u8, 214u8, 231u8, 82u8, 204u8, 185u8, 245u8, 164u8,
+ 163u8, 59u8, 254u8, 184u8, 105u8,
+ ],
+ )
+ }
+ #[doc = "As a vouching member, unvouch a bid. This only works while vouched user is"]
+ #[doc = "only a bidder (and not a candidate)."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and a vouching member."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `pos`: Position in the `Bids` vector of the bid who should be unvouched."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: B (len of bids)"]
+ #[doc = "- One storage read O(1) to check the signer is a vouching member."]
+ #[doc = "- One storage mutate to retrieve and update the bids. O(B)"]
+ #[doc = "- One vouching storage removal. O(1)"]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(B)"]
+ #[doc = "# "]
+ pub fn unvouch(
+ &self,
+ pos: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "unvouch",
+ Unvouch { pos },
+ [
+ 242u8, 181u8, 109u8, 170u8, 197u8, 53u8, 8u8, 241u8, 47u8,
+ 28u8, 1u8, 209u8, 142u8, 106u8, 136u8, 163u8, 42u8, 169u8,
+ 7u8, 1u8, 202u8, 38u8, 199u8, 232u8, 13u8, 111u8, 92u8, 69u8,
+ 237u8, 90u8, 134u8, 84u8,
+ ],
+ )
+ }
+ #[doc = "As a member, vote on a candidate."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and a member."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `candidate`: The candidate that the member would like to bid on."]
+ #[doc = "- `approve`: A boolean which says if the candidate should be approved (`true`) or"]
+ #[doc = " rejected (`false`)."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: C (len of candidates), M (len of members)"]
+ #[doc = "- One storage read O(M) and O(log M) search to check user is a member."]
+ #[doc = "- One account lookup."]
+ #[doc = "- One storage read O(C) and O(C) search to check that user is a candidate."]
+ #[doc = "- One storage write to add vote to votes. O(1)"]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + logM + C)"]
+ #[doc = "# "]
+ pub fn vote(
+ &self,
+ candidate: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ approve: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "vote",
+ Vote { candidate, approve },
+ [
+ 92u8, 101u8, 248u8, 64u8, 78u8, 158u8, 63u8, 91u8, 0u8, 8u8,
+ 182u8, 117u8, 209u8, 190u8, 92u8, 35u8, 131u8, 121u8, 123u8,
+ 129u8, 36u8, 188u8, 65u8, 104u8, 229u8, 77u8, 159u8, 24u8,
+ 216u8, 77u8, 117u8, 29u8,
+ ],
+ )
+ }
+ #[doc = "As a member, vote on the defender."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and a member."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `approve`: A boolean which says if the candidate should be"]
+ #[doc = "approved (`true`) or rejected (`false`)."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Key: M (len of members)"]
+ #[doc = "- One storage read O(M) and O(log M) search to check user is a member."]
+ #[doc = "- One storage write to add vote to votes. O(1)"]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + logM)"]
+ #[doc = "# "]
+ pub fn defender_vote(
+ &self,
+ approve: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "defender_vote",
+ DefenderVote { approve },
+ [
+ 248u8, 232u8, 243u8, 44u8, 252u8, 68u8, 118u8, 143u8, 57u8,
+ 34u8, 196u8, 4u8, 71u8, 14u8, 28u8, 164u8, 139u8, 184u8,
+ 20u8, 71u8, 86u8, 227u8, 172u8, 84u8, 213u8, 221u8, 155u8,
+ 198u8, 56u8, 93u8, 209u8, 211u8,
+ ],
+ )
+ }
+ #[doc = "Transfer the first matured payout for the sender and remove it from the records."]
+ #[doc = ""]
+ #[doc = "NOTE: This extrinsic needs to be called multiple times to claim multiple matured"]
+ #[doc = "payouts."]
+ #[doc = ""]
+ #[doc = "Payment: The member will receive a payment equal to their first matured"]
+ #[doc = "payout to their free balance."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and a member with"]
+ #[doc = "payouts remaining."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: M (len of members), P (number of payouts for a particular member)"]
+ #[doc = "- One storage read O(M) and O(log M) search to check signer is a member."]
+ #[doc = "- One storage read O(P) to get all payouts for a member."]
+ #[doc = "- One storage read O(1) to get the current block number."]
+ #[doc = "- One currency transfer call. O(X)"]
+ #[doc = "- One storage write or removal to update the member's payouts. O(P)"]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + logM + P + X)"]
+ #[doc = "# "]
+ pub fn payout(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "payout",
+ Payout {},
+ [
+ 255u8, 171u8, 227u8, 58u8, 244u8, 95u8, 239u8, 127u8, 129u8,
+ 211u8, 131u8, 191u8, 154u8, 234u8, 85u8, 69u8, 173u8, 135u8,
+ 179u8, 83u8, 17u8, 41u8, 34u8, 137u8, 174u8, 251u8, 127u8,
+ 62u8, 74u8, 255u8, 19u8, 234u8,
+ ],
+ )
+ }
+ #[doc = "Found the society."]
+ #[doc = ""]
+ #[doc = "This is done as a discrete action in order to allow for the"]
+ #[doc = "pallet to be included into a running chain and can only be done once."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be from the _FounderSetOrigin_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `founder` - The first member and head of the newly founded society."]
+ #[doc = "- `max_members` - The initial max number of members for the society."]
+ #[doc = "- `rules` - The rules of this society concerning membership."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Two storage mutates to set `Head` and `Founder`. O(1)"]
+ #[doc = "- One storage write to add the first member to society. O(1)"]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(1)"]
+ #[doc = "# "]
+ pub fn found(
+ &self,
+ founder: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ max_members: ::core::primitive::u32,
+ rules: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "found",
+ Found {
+ founder,
+ max_members,
+ rules,
+ },
+ [
+ 68u8, 18u8, 181u8, 102u8, 113u8, 16u8, 129u8, 67u8, 101u8,
+ 164u8, 35u8, 3u8, 182u8, 214u8, 181u8, 73u8, 42u8, 163u8,
+ 224u8, 110u8, 132u8, 185u8, 233u8, 239u8, 247u8, 143u8, 67u8,
+ 112u8, 116u8, 201u8, 236u8, 6u8,
+ ],
+ )
+ }
+ #[doc = "Annul the founding of the society."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be Signed, and the signing account must be both"]
+ #[doc = "the `Founder` and the `Head`. This implies that it may only be done when there is one"]
+ #[doc = "member."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Two storage reads O(1)."]
+ #[doc = "- Four storage removals O(1)."]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(1)"]
+ #[doc = "# "]
+ pub fn unfound(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "unfound",
+ Unfound {},
+ [
+ 30u8, 120u8, 137u8, 175u8, 237u8, 121u8, 90u8, 9u8, 111u8,
+ 75u8, 51u8, 85u8, 86u8, 182u8, 6u8, 249u8, 62u8, 246u8, 21u8,
+ 150u8, 70u8, 148u8, 39u8, 14u8, 168u8, 250u8, 164u8, 235u8,
+ 23u8, 18u8, 164u8, 97u8,
+ ],
+ )
+ }
+ #[doc = "Allow suspension judgement origin to make judgement on a suspended member."]
+ #[doc = ""]
+ #[doc = "If a suspended member is forgiven, we simply add them back as a member, not affecting"]
+ #[doc = "any of the existing storage items for that member."]
+ #[doc = ""]
+ #[doc = "If a suspended member is rejected, remove all associated storage items, including"]
+ #[doc = "their payouts, and remove any vouched bids they currently have."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `who` - The suspended member to be judged."]
+ #[doc = "- `forgive` - A boolean representing whether the suspension judgement origin forgives"]
+ #[doc = " (`true`) or rejects (`false`) a suspended member."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: B (len of bids), M (len of members)"]
+ #[doc = "- One storage read to check `who` is a suspended member. O(1)"]
+ #[doc = "- Up to one storage write O(M) with O(log M) binary search to add a member back to"]
+ #[doc = " society."]
+ #[doc = "- Up to 3 storage removals O(1) to clean up a removed member."]
+ #[doc = "- Up to one storage write O(B) with O(B) search to remove vouched bid from bids."]
+ #[doc = "- Up to one additional event if unvouch takes place."]
+ #[doc = "- One storage removal. O(1)"]
+ #[doc = "- One event for the judgement."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + logM + B)"]
+ #[doc = "# "]
+ pub fn judge_suspended_member(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ forgive: ::core::primitive::bool,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "judge_suspended_member",
+ JudgeSuspendedMember { who, forgive },
+ [
+ 230u8, 85u8, 37u8, 61u8, 138u8, 230u8, 105u8, 230u8, 248u8,
+ 209u8, 167u8, 1u8, 176u8, 226u8, 83u8, 166u8, 141u8, 232u8,
+ 186u8, 86u8, 222u8, 227u8, 229u8, 84u8, 113u8, 58u8, 13u8,
+ 45u8, 246u8, 132u8, 60u8, 82u8,
+ ],
+ )
+ }
+ #[doc = "Allow suspended judgement origin to make judgement on a suspended candidate."]
+ #[doc = ""]
+ #[doc = "If the judgement is `Approve`, we add them to society as a member with the appropriate"]
+ #[doc = "payment for joining society."]
+ #[doc = ""]
+ #[doc = "If the judgement is `Reject`, we either slash the deposit of the bid, giving it back"]
+ #[doc = "to the society treasury, or we ban the voucher from vouching again."]
+ #[doc = ""]
+ #[doc = "If the judgement is `Rebid`, we put the candidate back in the bid pool and let them go"]
+ #[doc = "through the induction process again."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be from the _SuspensionJudgementOrigin_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `who` - The suspended candidate to be judged."]
+ #[doc = "- `judgement` - `Approve`, `Reject`, or `Rebid`."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Key: B (len of bids), M (len of members), X (balance action)"]
+ #[doc = "- One storage read to check `who` is a suspended candidate."]
+ #[doc = "- One storage removal of the suspended candidate."]
+ #[doc = "- Approve Logic"]
+ #[doc = "\t- One storage read to get the available pot to pay users with. O(1)"]
+ #[doc = "\t- One storage write to update the available pot. O(1)"]
+ #[doc = "\t- One storage read to get the current block number. O(1)"]
+ #[doc = "\t- One storage read to get all members. O(M)"]
+ #[doc = "\t- Up to one unreserve currency action."]
+ #[doc = "\t- Up to two new storage writes to payouts."]
+ #[doc = "\t- Up to one storage write with O(log M) binary search to add a member to society."]
+ #[doc = "- Reject Logic"]
+ #[doc = "\t- Up to one repatriate reserved currency action. O(X)"]
+ #[doc = "\t- Up to one storage write to ban the vouching member from vouching again."]
+ #[doc = "- Rebid Logic"]
+ #[doc = "\t- Storage mutate with O(log B) binary search to place the user back into bids."]
+ #[doc = "- Up to one additional event if unvouch takes place."]
+ #[doc = "- One storage removal."]
+ #[doc = "- One event for the judgement."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(M + logM + B + X)"]
+ #[doc = "# "]
+ pub fn judge_suspended_candidate(
+ &self,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ judgement: runtime_types::pallet_society::Judgement,
+ ) -> ::subxt::tx::StaticTxPayload
+ {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "judge_suspended_candidate",
+ JudgeSuspendedCandidate { who, judgement },
+ [
+ 233u8, 241u8, 151u8, 219u8, 217u8, 131u8, 112u8, 172u8,
+ 227u8, 93u8, 244u8, 214u8, 14u8, 183u8, 133u8, 74u8, 174u8,
+ 141u8, 235u8, 189u8, 52u8, 146u8, 62u8, 254u8, 248u8, 60u8,
+ 129u8, 109u8, 164u8, 54u8, 37u8, 237u8,
+ ],
+ )
+ }
+ #[doc = "Allows root origin to change the maximum number of members in society."]
+ #[doc = "Max membership count must be greater than 1."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be from _ROOT_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `max` - The maximum number of members for the society."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- One storage write to update the max. O(1)"]
+ #[doc = "- One event."]
+ #[doc = ""]
+ #[doc = "Total Complexity: O(1)"]
+ #[doc = "# "]
+ pub fn set_max_members(
+ &self,
+ max: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Society",
+ "set_max_members",
+ SetMaxMembers { max },
+ [
+ 4u8, 120u8, 194u8, 207u8, 5u8, 93u8, 40u8, 12u8, 1u8, 151u8,
+ 127u8, 162u8, 218u8, 228u8, 1u8, 249u8, 148u8, 139u8, 124u8,
+ 171u8, 94u8, 151u8, 40u8, 164u8, 171u8, 122u8, 65u8, 233u8,
+ 27u8, 82u8, 74u8, 67u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_society::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The society is founded by the given identity."]
+ pub struct Founded {
+ pub founder: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Founded {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Founded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A membership bid just happened. The given account is the candidate's ID and their offer"]
+ #[doc = "is the second."]
+ pub struct Bid {
+ pub candidate_id: ::subxt::utils::AccountId32,
+ pub offer: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Bid {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Bid";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A membership bid just happened by vouching. The given account is the candidate's ID and"]
+ #[doc = "their offer is the second. The vouching party is the third."]
+ pub struct Vouch {
+ pub candidate_id: ::subxt::utils::AccountId32,
+ pub offer: ::core::primitive::u128,
+ pub vouching: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Vouch {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Vouch";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A candidate was dropped (due to an excess of bids in the system)."]
+ pub struct AutoUnbid {
+ pub candidate: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for AutoUnbid {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "AutoUnbid";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A candidate was dropped (by their request)."]
+ pub struct Unbid {
+ pub candidate: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Unbid {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Unbid";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A candidate was dropped (by request of who vouched for them)."]
+ pub struct Unvouch {
+ pub candidate: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Unvouch {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Unvouch";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A group of candidates have been inducted. The batch's primary is the first value, the"]
+ #[doc = "batch in full is the second."]
+ pub struct Inducted {
+ pub primary: ::subxt::utils::AccountId32,
+ pub candidates: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ }
+ impl ::subxt::events::StaticEvent for Inducted {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Inducted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A suspended member has been judged."]
+ pub struct SuspendedMemberJudgement {
+ pub who: ::subxt::utils::AccountId32,
+ pub judged: ::core::primitive::bool,
+ }
+ impl ::subxt::events::StaticEvent for SuspendedMemberJudgement {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "SuspendedMemberJudgement";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A candidate has been suspended"]
+ pub struct CandidateSuspended {
+ pub candidate: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for CandidateSuspended {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "CandidateSuspended";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A member has been suspended"]
+ pub struct MemberSuspended {
+ pub member: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for MemberSuspended {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "MemberSuspended";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A member has been challenged"]
+ pub struct Challenged {
+ pub member: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Challenged {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Challenged";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A vote has been placed"]
+ pub struct Vote {
+ pub candidate: ::subxt::utils::AccountId32,
+ pub voter: ::subxt::utils::AccountId32,
+ pub vote: ::core::primitive::bool,
+ }
+ impl ::subxt::events::StaticEvent for Vote {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Vote";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A vote has been placed for a defending member"]
+ pub struct DefenderVote {
+ pub voter: ::subxt::utils::AccountId32,
+ pub vote: ::core::primitive::bool,
+ }
+ impl ::subxt::events::StaticEvent for DefenderVote {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "DefenderVote";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new \\[max\\] member count has been set"]
+ pub struct NewMaxMembers {
+ pub max: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for NewMaxMembers {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "NewMaxMembers";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Society is unfounded."]
+ pub struct Unfounded {
+ pub founder: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for Unfounded {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Unfounded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Some funds were deposited into the society account."]
+ pub struct Deposit {
+ pub value: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for Deposit {
+ const PALLET: &'static str = "Society";
+ const EVENT: &'static str = "Deposit";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The first member."]
+ pub fn founder(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Founder",
+ vec![],
+ [
+ 50u8, 222u8, 149u8, 14u8, 31u8, 163u8, 129u8, 123u8, 150u8,
+ 220u8, 16u8, 136u8, 150u8, 245u8, 171u8, 231u8, 75u8, 203u8,
+ 249u8, 123u8, 86u8, 43u8, 208u8, 65u8, 41u8, 111u8, 114u8,
+ 254u8, 131u8, 13u8, 26u8, 43u8,
+ ],
+ )
+ }
+ #[doc = " A hash of the rules of this society concerning membership. Can only be set once and"]
+ #[doc = " only by the founder."]
+ pub fn rules(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::H256>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Rules",
+ vec![],
+ [
+ 10u8, 206u8, 100u8, 24u8, 227u8, 138u8, 82u8, 125u8, 247u8,
+ 160u8, 124u8, 121u8, 148u8, 98u8, 252u8, 214u8, 215u8, 232u8,
+ 160u8, 204u8, 23u8, 95u8, 240u8, 16u8, 201u8, 245u8, 13u8,
+ 178u8, 99u8, 61u8, 247u8, 137u8,
+ ],
+ )
+ }
+ #[doc = " The current set of candidates; bidders that are attempting to become members."]
+ pub fn candidates(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::pallet_society::Bid<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Candidates",
+ vec![],
+ [
+ 88u8, 231u8, 247u8, 115u8, 122u8, 18u8, 106u8, 195u8, 238u8,
+ 219u8, 174u8, 23u8, 179u8, 228u8, 82u8, 26u8, 141u8, 190u8,
+ 206u8, 46u8, 177u8, 218u8, 123u8, 152u8, 208u8, 79u8, 57u8,
+ 68u8, 3u8, 208u8, 174u8, 193u8,
+ ],
+ )
+ }
+ #[doc = " The set of suspended candidates."]
+ pub fn suspended_candidates(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u128,
+ runtime_types::pallet_society::BidKind<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "SuspendedCandidates",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 35u8, 46u8, 78u8, 1u8, 132u8, 103u8, 152u8, 33u8, 86u8,
+ 137u8, 125u8, 122u8, 63u8, 175u8, 197u8, 39u8, 255u8, 0u8,
+ 49u8, 53u8, 154u8, 40u8, 196u8, 158u8, 133u8, 113u8, 159u8,
+ 168u8, 148u8, 154u8, 57u8, 70u8,
+ ],
+ )
+ }
+ #[doc = " The set of suspended candidates."]
+ pub fn suspended_candidates_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u128,
+ runtime_types::pallet_society::BidKind<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "SuspendedCandidates",
+ Vec::new(),
+ [
+ 35u8, 46u8, 78u8, 1u8, 132u8, 103u8, 152u8, 33u8, 86u8,
+ 137u8, 125u8, 122u8, 63u8, 175u8, 197u8, 39u8, 255u8, 0u8,
+ 49u8, 53u8, 154u8, 40u8, 196u8, 158u8, 133u8, 113u8, 159u8,
+ 168u8, 148u8, 154u8, 57u8, 70u8,
+ ],
+ )
+ }
+ #[doc = " Amount of our account balance that is specifically for the next round's bid(s)."]
+ pub fn pot(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Pot",
+ vec![],
+ [
+ 242u8, 124u8, 22u8, 252u8, 4u8, 178u8, 161u8, 120u8, 8u8,
+ 185u8, 182u8, 177u8, 205u8, 205u8, 192u8, 248u8, 42u8, 8u8,
+ 216u8, 92u8, 194u8, 219u8, 74u8, 248u8, 135u8, 105u8, 210u8,
+ 207u8, 159u8, 24u8, 149u8, 190u8,
+ ],
+ )
+ }
+ #[doc = " The most primary from the most recently approved members."]
+ pub fn head(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Head",
+ vec![],
+ [
+ 162u8, 185u8, 82u8, 237u8, 221u8, 60u8, 77u8, 96u8, 89u8,
+ 41u8, 162u8, 7u8, 174u8, 251u8, 121u8, 247u8, 196u8, 118u8,
+ 57u8, 24u8, 142u8, 129u8, 142u8, 106u8, 166u8, 7u8, 86u8,
+ 54u8, 108u8, 110u8, 118u8, 75u8,
+ ],
+ )
+ }
+ #[doc = " The current set of members, ordered."]
+ pub fn members(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<::subxt::utils::AccountId32>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Members",
+ vec![],
+ [
+ 162u8, 72u8, 174u8, 204u8, 140u8, 105u8, 205u8, 176u8, 197u8,
+ 117u8, 206u8, 134u8, 157u8, 110u8, 139u8, 54u8, 43u8, 233u8,
+ 25u8, 51u8, 36u8, 238u8, 94u8, 124u8, 221u8, 52u8, 237u8,
+ 71u8, 125u8, 56u8, 129u8, 222u8,
+ ],
+ )
+ }
+ #[doc = " The set of suspended members."]
+ pub fn suspended_members(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "SuspendedMembers",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 158u8, 26u8, 34u8, 152u8, 137u8, 151u8, 205u8, 19u8, 12u8,
+ 138u8, 107u8, 21u8, 14u8, 162u8, 103u8, 25u8, 181u8, 13u8,
+ 59u8, 3u8, 225u8, 23u8, 242u8, 184u8, 225u8, 122u8, 55u8,
+ 53u8, 79u8, 163u8, 65u8, 57u8,
+ ],
+ )
+ }
+ #[doc = " The set of suspended members."]
+ pub fn suspended_members_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::bool>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "SuspendedMembers",
+ Vec::new(),
+ [
+ 158u8, 26u8, 34u8, 152u8, 137u8, 151u8, 205u8, 19u8, 12u8,
+ 138u8, 107u8, 21u8, 14u8, 162u8, 103u8, 25u8, 181u8, 13u8,
+ 59u8, 3u8, 225u8, 23u8, 242u8, 184u8, 225u8, 122u8, 55u8,
+ 53u8, 79u8, 163u8, 65u8, 57u8,
+ ],
+ )
+ }
+ #[doc = " The current bids, stored ordered by the value of the bid."]
+ pub fn bids(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<
+ runtime_types::pallet_society::Bid<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Bids",
+ vec![],
+ [
+ 8u8, 152u8, 107u8, 47u8, 7u8, 45u8, 86u8, 149u8, 230u8, 81u8,
+ 253u8, 110u8, 255u8, 83u8, 16u8, 168u8, 169u8, 70u8, 196u8,
+ 167u8, 168u8, 98u8, 36u8, 122u8, 124u8, 77u8, 61u8, 245u8,
+ 248u8, 48u8, 224u8, 125u8,
+ ],
+ )
+ }
+ #[doc = " Members currently vouching or banned from vouching again"]
+ pub fn vouching(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_society::VouchingStatus,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Vouching",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 189u8, 212u8, 60u8, 171u8, 135u8, 82u8, 34u8, 93u8, 206u8,
+ 206u8, 31u8, 99u8, 197u8, 0u8, 97u8, 228u8, 118u8, 200u8,
+ 123u8, 81u8, 242u8, 93u8, 31u8, 1u8, 9u8, 121u8, 215u8,
+ 223u8, 15u8, 56u8, 223u8, 96u8,
+ ],
+ )
+ }
+ #[doc = " Members currently vouching or banned from vouching again"]
+ pub fn vouching_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_society::VouchingStatus,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Vouching",
+ Vec::new(),
+ [
+ 189u8, 212u8, 60u8, 171u8, 135u8, 82u8, 34u8, 93u8, 206u8,
+ 206u8, 31u8, 99u8, 197u8, 0u8, 97u8, 228u8, 118u8, 200u8,
+ 123u8, 81u8, 242u8, 93u8, 31u8, 1u8, 9u8, 121u8, 215u8,
+ 223u8, 15u8, 56u8, 223u8, 96u8,
+ ],
+ )
+ }
+ #[doc = " Pending payouts; ordered by block number, with the amount that should be paid out."]
+ pub fn payouts(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ )>,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Payouts",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 88u8, 208u8, 72u8, 186u8, 175u8, 77u8, 18u8, 108u8, 69u8,
+ 117u8, 227u8, 73u8, 126u8, 56u8, 32u8, 1u8, 198u8, 6u8,
+ 231u8, 172u8, 3u8, 155u8, 72u8, 152u8, 68u8, 222u8, 19u8,
+ 229u8, 69u8, 181u8, 196u8, 202u8,
+ ],
+ )
+ }
+ #[doc = " Pending payouts; ordered by block number, with the amount that should be paid out."]
+ pub fn payouts_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::std::vec::Vec<(
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ )>,
+ >,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Payouts",
+ Vec::new(),
+ [
+ 88u8, 208u8, 72u8, 186u8, 175u8, 77u8, 18u8, 108u8, 69u8,
+ 117u8, 227u8, 73u8, 126u8, 56u8, 32u8, 1u8, 198u8, 6u8,
+ 231u8, 172u8, 3u8, 155u8, 72u8, 152u8, 68u8, 222u8, 19u8,
+ 229u8, 69u8, 181u8, 196u8, 202u8,
+ ],
+ )
+ }
+ #[doc = " The ongoing number of losing votes cast by the member."]
+ pub fn strikes(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Strikes",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 120u8, 174u8, 185u8, 72u8, 167u8, 85u8, 204u8, 187u8, 139u8,
+ 103u8, 124u8, 14u8, 65u8, 243u8, 40u8, 114u8, 231u8, 200u8,
+ 174u8, 56u8, 159u8, 242u8, 102u8, 221u8, 26u8, 153u8, 154u8,
+ 238u8, 109u8, 255u8, 64u8, 135u8,
+ ],
+ )
+ }
+ #[doc = " The ongoing number of losing votes cast by the member."]
+ pub fn strikes_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Strikes",
+ Vec::new(),
+ [
+ 120u8, 174u8, 185u8, 72u8, 167u8, 85u8, 204u8, 187u8, 139u8,
+ 103u8, 124u8, 14u8, 65u8, 243u8, 40u8, 114u8, 231u8, 200u8,
+ 174u8, 56u8, 159u8, 242u8, 102u8, 221u8, 26u8, 153u8, 154u8,
+ 238u8, 109u8, 255u8, 64u8, 135u8,
+ ],
+ )
+ }
+ #[doc = " Double map from Candidate -> Voter -> (Maybe) Vote."]
+ pub fn votes(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_society::Vote,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Votes",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 82u8, 0u8, 111u8, 217u8, 223u8, 52u8, 99u8, 140u8, 145u8,
+ 35u8, 207u8, 54u8, 69u8, 86u8, 133u8, 103u8, 122u8, 3u8,
+ 153u8, 68u8, 233u8, 71u8, 62u8, 132u8, 218u8, 2u8, 126u8,
+ 136u8, 245u8, 150u8, 102u8, 77u8,
+ ],
+ )
+ }
+ #[doc = " Double map from Candidate -> Voter -> (Maybe) Vote."]
+ pub fn votes_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_society::Vote,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Votes",
+ Vec::new(),
+ [
+ 82u8, 0u8, 111u8, 217u8, 223u8, 52u8, 99u8, 140u8, 145u8,
+ 35u8, 207u8, 54u8, 69u8, 86u8, 133u8, 103u8, 122u8, 3u8,
+ 153u8, 68u8, 233u8, 71u8, 62u8, 132u8, 218u8, 2u8, 126u8,
+ 136u8, 245u8, 150u8, 102u8, 77u8,
+ ],
+ )
+ }
+ #[doc = " The defending member currently being challenged."]
+ pub fn defender(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "Defender",
+ vec![],
+ [
+ 116u8, 251u8, 243u8, 93u8, 242u8, 69u8, 62u8, 163u8, 154u8,
+ 55u8, 243u8, 204u8, 205u8, 210u8, 205u8, 5u8, 202u8, 177u8,
+ 153u8, 199u8, 126u8, 142u8, 248u8, 65u8, 88u8, 226u8, 101u8,
+ 116u8, 74u8, 170u8, 93u8, 146u8,
+ ],
+ )
+ }
+ #[doc = " Votes for the defender."]
+ pub fn defender_votes(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_society::Vote,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "DefenderVotes",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 90u8, 131u8, 201u8, 228u8, 138u8, 115u8, 75u8, 188u8, 29u8,
+ 229u8, 221u8, 218u8, 154u8, 78u8, 152u8, 166u8, 184u8, 93u8,
+ 156u8, 0u8, 110u8, 58u8, 135u8, 124u8, 179u8, 98u8, 5u8,
+ 218u8, 47u8, 145u8, 163u8, 245u8,
+ ],
+ )
+ }
+ #[doc = " Votes for the defender."]
+ pub fn defender_votes_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_society::Vote,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "DefenderVotes",
+ Vec::new(),
+ [
+ 90u8, 131u8, 201u8, 228u8, 138u8, 115u8, 75u8, 188u8, 29u8,
+ 229u8, 221u8, 218u8, 154u8, 78u8, 152u8, 166u8, 184u8, 93u8,
+ 156u8, 0u8, 110u8, 58u8, 135u8, 124u8, 179u8, 98u8, 5u8,
+ 218u8, 47u8, 145u8, 163u8, 245u8,
+ ],
+ )
+ }
+ #[doc = " The max number of members for the society at one time."]
+ pub fn max_members(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Society",
+ "MaxMembers",
+ vec![],
+ [
+ 54u8, 113u8, 4u8, 248u8, 5u8, 42u8, 67u8, 237u8, 91u8, 159u8,
+ 63u8, 239u8, 3u8, 196u8, 202u8, 135u8, 182u8, 137u8, 204u8,
+ 58u8, 39u8, 11u8, 42u8, 79u8, 129u8, 85u8, 37u8, 154u8,
+ 178u8, 189u8, 123u8, 184u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " The societies's pallet id"]
+ pub fn pallet_id(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::frame_support::PalletId,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "PalletId",
+ [
+ 139u8, 109u8, 228u8, 151u8, 252u8, 32u8, 130u8, 69u8, 112u8,
+ 154u8, 174u8, 45u8, 83u8, 245u8, 51u8, 132u8, 173u8, 5u8,
+ 186u8, 24u8, 243u8, 9u8, 12u8, 214u8, 80u8, 74u8, 69u8,
+ 189u8, 30u8, 94u8, 22u8, 39u8,
+ ],
+ )
+ }
+ #[doc = " The minimum amount of a deposit required for a bid to be made."]
+ pub fn candidate_deposit(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "CandidateDeposit",
+ [
+ 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 the unpaid reward that gets deducted in the case that either a skeptic"]
+ #[doc = " doesn't vote or someone votes in the wrong way."]
+ pub fn wrong_side_deduction(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "WrongSideDeduction",
+ [
+ 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 number of times a member may vote the wrong way (or not at all, when they are a"]
+ #[doc = " skeptic) before they become suspended."]
+ pub fn max_strikes(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "MaxStrikes",
+ [
+ 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 amount of incentive paid within each period. Doesn't include VoterTip."]
+ pub fn period_spend(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "PeriodSpend",
+ [
+ 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 number of blocks between candidate/membership rotation periods."]
+ pub fn rotation_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "RotationPeriod",
+ [
+ 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 duration of the payout lock."]
+ pub fn max_lock_duration(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "MaxLockDuration",
+ [
+ 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 between membership challenges."]
+ pub fn challenge_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "ChallengePeriod",
+ [
+ 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 candidates that we accept per round."]
+ pub fn max_candidate_intake(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Society",
+ "MaxCandidateIntake",
+ [
+ 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 recovery {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AsRecovered {
+ pub account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SetRecovered {
+ pub lost: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub rescuer: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CreateRecovery {
+ pub friends: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub threshold: ::core::primitive::u16,
+ pub delay_period: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct InitiateRecovery {
+ pub account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct VouchRecovery {
+ pub lost: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub rescuer: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ClaimRecovery {
+ pub account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CloseRecovery {
+ pub rescuer: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveRecovery;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelRecovered {
+ pub account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Send a call through a recovered account."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and registered to"]
+ #[doc = "be able to make calls on behalf of the recovered account."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `account`: The recovered account you want to make a call on-behalf-of."]
+ #[doc = "- `call`: The call you want to make with the recovered account."]
+ pub fn as_recovered(
+ &self,
+ account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "as_recovered",
+ AsRecovered {
+ account,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 74u8, 203u8, 116u8, 157u8, 170u8, 20u8, 234u8, 196u8, 125u8,
+ 117u8, 83u8, 244u8, 211u8, 42u8, 1u8, 252u8, 193u8, 67u8,
+ 214u8, 70u8, 128u8, 9u8, 180u8, 214u8, 201u8, 185u8, 123u8,
+ 49u8, 66u8, 236u8, 235u8, 204u8,
+ ],
+ )
+ }
+ #[doc = "Allow ROOT to bypass the recovery process and set an a rescuer account"]
+ #[doc = "for a lost account directly."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _ROOT_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `lost`: The \"lost account\" to be recovered."]
+ #[doc = "- `rescuer`: The \"rescuer account\" which can call as the lost account."]
+ pub fn set_recovered(
+ &self,
+ lost: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ rescuer: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "set_recovered",
+ SetRecovered { lost, rescuer },
+ [
+ 149u8, 123u8, 98u8, 179u8, 7u8, 149u8, 38u8, 221u8, 25u8,
+ 244u8, 176u8, 243u8, 202u8, 6u8, 228u8, 39u8, 248u8, 32u8,
+ 146u8, 140u8, 235u8, 21u8, 181u8, 18u8, 105u8, 44u8, 15u8,
+ 221u8, 82u8, 233u8, 133u8, 51u8,
+ ],
+ )
+ }
+ #[doc = "Create a recovery configuration for your account. This makes your account recoverable."]
+ #[doc = ""]
+ #[doc = "Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance"]
+ #[doc = "will be reserved for storing the recovery configuration. This deposit is returned"]
+ #[doc = "in full when the user calls `remove_recovery`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `friends`: A list of friends you trust to vouch for recovery attempts. Should be"]
+ #[doc = " ordered and contain no duplicate values."]
+ #[doc = "- `threshold`: The number of friends that must vouch for a recovery attempt before the"]
+ #[doc = " account can be recovered. Should be less than or equal to the length of the list of"]
+ #[doc = " friends."]
+ #[doc = "- `delay_period`: The number of blocks after a recovery attempt is initialized that"]
+ #[doc = " needs to pass before the account can be recovered."]
+ pub fn create_recovery(
+ &self,
+ friends: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ threshold: ::core::primitive::u16,
+ delay_period: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "create_recovery",
+ CreateRecovery {
+ friends,
+ threshold,
+ delay_period,
+ },
+ [
+ 80u8, 233u8, 68u8, 224u8, 181u8, 127u8, 8u8, 35u8, 135u8,
+ 121u8, 73u8, 25u8, 255u8, 192u8, 177u8, 140u8, 67u8, 113u8,
+ 112u8, 35u8, 63u8, 96u8, 1u8, 138u8, 93u8, 27u8, 219u8, 52u8,
+ 74u8, 251u8, 65u8, 96u8,
+ ],
+ )
+ }
+ #[doc = "Initiate the process for recovering a recoverable account."]
+ #[doc = ""]
+ #[doc = "Payment: `RecoveryDeposit` balance will be reserved for initiating the"]
+ #[doc = "recovery process. This deposit will always be repatriated to the account"]
+ #[doc = "trying to be recovered. See `close_recovery`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `account`: The lost account that you want to recover. This account needs to be"]
+ #[doc = " recoverable (i.e. have a recovery configuration)."]
+ pub fn initiate_recovery(
+ &self,
+ account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "initiate_recovery",
+ InitiateRecovery { account },
+ [
+ 140u8, 244u8, 135u8, 122u8, 61u8, 107u8, 212u8, 100u8, 212u8,
+ 11u8, 216u8, 47u8, 113u8, 155u8, 121u8, 232u8, 158u8, 26u8,
+ 229u8, 82u8, 231u8, 193u8, 225u8, 2u8, 112u8, 220u8, 40u8,
+ 104u8, 36u8, 17u8, 164u8, 124u8,
+ ],
+ )
+ }
+ #[doc = "Allow a \"friend\" of a recoverable account to vouch for an active recovery"]
+ #[doc = "process for that account."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"friend\""]
+ #[doc = "for the recoverable account."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `lost`: The lost account that you want to recover."]
+ #[doc = "- `rescuer`: The account trying to rescue the lost account that you want to vouch for."]
+ #[doc = ""]
+ #[doc = "The combination of these two parameters must point to an active recovery"]
+ #[doc = "process."]
+ pub fn vouch_recovery(
+ &self,
+ lost: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ rescuer: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "vouch_recovery",
+ VouchRecovery { lost, rescuer },
+ [
+ 188u8, 113u8, 2u8, 31u8, 149u8, 123u8, 248u8, 46u8, 211u8,
+ 88u8, 121u8, 207u8, 227u8, 92u8, 198u8, 199u8, 29u8, 216u8,
+ 84u8, 140u8, 169u8, 154u8, 240u8, 183u8, 140u8, 203u8, 223u8,
+ 82u8, 222u8, 187u8, 20u8, 21u8,
+ ],
+ )
+ }
+ #[doc = "Allow a successful rescuer to claim their recovered account."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and must be a \"rescuer\""]
+ #[doc = "who has successfully completed the account recovery process: collected"]
+ #[doc = "`threshold` or more vouches, waited `delay_period` blocks since initiation."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `account`: The lost account that you want to claim has been successfully recovered by"]
+ #[doc = " you."]
+ pub fn claim_recovery(
+ &self,
+ account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "claim_recovery",
+ ClaimRecovery { account },
+ [
+ 60u8, 49u8, 116u8, 129u8, 138u8, 95u8, 243u8, 120u8, 231u8,
+ 20u8, 149u8, 37u8, 56u8, 209u8, 196u8, 177u8, 186u8, 175u8,
+ 58u8, 203u8, 226u8, 89u8, 80u8, 212u8, 12u8, 17u8, 119u8,
+ 163u8, 74u8, 164u8, 180u8, 187u8,
+ ],
+ )
+ }
+ #[doc = "As the controller of a recoverable account, close an active recovery"]
+ #[doc = "process for your account."]
+ #[doc = ""]
+ #[doc = "Payment: By calling this function, the recoverable account will receive"]
+ #[doc = "the recovery deposit `RecoveryDeposit` placed by the rescuer."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and must be a"]
+ #[doc = "recoverable account with an active recovery process for it."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `rescuer`: The account trying to rescue this recoverable account."]
+ pub fn close_recovery(
+ &self,
+ rescuer: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "close_recovery",
+ CloseRecovery { rescuer },
+ [
+ 61u8, 242u8, 216u8, 157u8, 103u8, 149u8, 121u8, 151u8, 132u8,
+ 247u8, 95u8, 157u8, 178u8, 27u8, 100u8, 222u8, 72u8, 188u8,
+ 168u8, 64u8, 63u8, 135u8, 248u8, 133u8, 177u8, 15u8, 205u8,
+ 146u8, 98u8, 79u8, 135u8, 157u8,
+ ],
+ )
+ }
+ #[doc = "Remove the recovery process for your account. Recovered accounts are still accessible."]
+ #[doc = ""]
+ #[doc = "NOTE: The user must make sure to call `close_recovery` on all active"]
+ #[doc = "recovery attempts before calling this function else it will fail."]
+ #[doc = ""]
+ #[doc = "Payment: By calling this function the recoverable account will unreserve"]
+ #[doc = "their recovery configuration deposit."]
+ #[doc = "(`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends)"]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and must be a"]
+ #[doc = "recoverable account (i.e. has a recovery configuration)."]
+ pub fn remove_recovery(
+ &self,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "remove_recovery",
+ RemoveRecovery {},
+ [
+ 14u8, 1u8, 44u8, 24u8, 242u8, 16u8, 67u8, 192u8, 79u8, 206u8,
+ 104u8, 233u8, 91u8, 202u8, 253u8, 100u8, 48u8, 78u8, 233u8,
+ 24u8, 124u8, 176u8, 211u8, 87u8, 63u8, 110u8, 2u8, 7u8,
+ 231u8, 53u8, 177u8, 196u8,
+ ],
+ )
+ }
+ #[doc = "Cancel the ability to use `as_recovered` for `account`."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and registered to"]
+ #[doc = "be able to make calls on behalf of the recovered account."]
+ #[doc = ""]
+ #[doc = "Parameters:"]
+ #[doc = "- `account`: The recovered account you are able to call on-behalf-of."]
+ pub fn cancel_recovered(
+ &self,
+ account: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Recovery",
+ "cancel_recovered",
+ CancelRecovered { account },
+ [
+ 153u8, 253u8, 13u8, 12u8, 200u8, 69u8, 113u8, 49u8, 75u8,
+ 61u8, 10u8, 209u8, 18u8, 192u8, 233u8, 158u8, 241u8, 24u8,
+ 243u8, 0u8, 136u8, 55u8, 43u8, 179u8, 43u8, 113u8, 130u8,
+ 99u8, 146u8, 132u8, 193u8, 251u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "Events type."]
+ pub type Event = runtime_types::pallet_recovery::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A recovery process has been set up for an account."]
+ pub struct RecoveryCreated {
+ pub account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for RecoveryCreated {
+ const PALLET: &'static str = "Recovery";
+ const EVENT: &'static str = "RecoveryCreated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A recovery process has been initiated for lost account by rescuer account."]
+ pub struct RecoveryInitiated {
+ pub lost_account: ::subxt::utils::AccountId32,
+ pub rescuer_account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for RecoveryInitiated {
+ const PALLET: &'static str = "Recovery";
+ const EVENT: &'static str = "RecoveryInitiated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A recovery process for lost account by rescuer account has been vouched for by sender."]
+ pub struct RecoveryVouched {
+ pub lost_account: ::subxt::utils::AccountId32,
+ pub rescuer_account: ::subxt::utils::AccountId32,
+ pub sender: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for RecoveryVouched {
+ const PALLET: &'static str = "Recovery";
+ const EVENT: &'static str = "RecoveryVouched";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A recovery process for lost account by rescuer account has been closed."]
+ pub struct RecoveryClosed {
+ pub lost_account: ::subxt::utils::AccountId32,
+ pub rescuer_account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for RecoveryClosed {
+ const PALLET: &'static str = "Recovery";
+ const EVENT: &'static str = "RecoveryClosed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Lost account has been successfully recovered by rescuer account."]
+ pub struct AccountRecovered {
+ pub lost_account: ::subxt::utils::AccountId32,
+ pub rescuer_account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for AccountRecovered {
+ const PALLET: &'static str = "Recovery";
+ const EVENT: &'static str = "AccountRecovered";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A recovery process has been removed for an account."]
+ pub struct RecoveryRemoved {
+ pub lost_account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for RecoveryRemoved {
+ const PALLET: &'static str = "Recovery";
+ const EVENT: &'static str = "RecoveryRemoved";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The set of recoverable accounts and their recovery configuration."]
+ pub fn recoverable(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_recovery::RecoveryConfig<
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Recovery",
+ "Recoverable",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 77u8, 165u8, 1u8, 120u8, 139u8, 195u8, 113u8, 101u8, 31u8,
+ 182u8, 235u8, 20u8, 225u8, 108u8, 173u8, 70u8, 96u8, 14u8,
+ 95u8, 36u8, 146u8, 171u8, 61u8, 209u8, 37u8, 154u8, 6u8,
+ 197u8, 212u8, 20u8, 167u8, 142u8,
+ ],
+ )
+ }
+ #[doc = " The set of recoverable accounts and their recovery configuration."]
+ pub fn recoverable_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_recovery::RecoveryConfig<
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Recovery",
+ "Recoverable",
+ Vec::new(),
+ [
+ 77u8, 165u8, 1u8, 120u8, 139u8, 195u8, 113u8, 101u8, 31u8,
+ 182u8, 235u8, 20u8, 225u8, 108u8, 173u8, 70u8, 96u8, 14u8,
+ 95u8, 36u8, 146u8, 171u8, 61u8, 209u8, 37u8, 154u8, 6u8,
+ 197u8, 212u8, 20u8, 167u8, 142u8,
+ ],
+ )
+ }
+ #[doc = " Active recovery attempts."]
+ #[doc = ""]
+ #[doc = " First account is the account to be recovered, and the second account"]
+ #[doc = " is the user trying to recover the account."]
+ pub fn active_recoveries(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ _1: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_recovery::ActiveRecovery<
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Recovery",
+ "ActiveRecoveries",
+ vec![
+ ::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ::subxt::storage::address::StorageMapKey::new(
+ _1.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ ),
+ ],
+ [
+ 105u8, 72u8, 0u8, 48u8, 187u8, 107u8, 42u8, 95u8, 221u8,
+ 206u8, 105u8, 207u8, 228u8, 150u8, 103u8, 62u8, 195u8, 177u8,
+ 233u8, 97u8, 12u8, 17u8, 76u8, 204u8, 236u8, 29u8, 225u8,
+ 60u8, 228u8, 44u8, 103u8, 39u8,
+ ],
+ )
+ }
+ #[doc = " Active recovery attempts."]
+ #[doc = ""]
+ #[doc = " First account is the account to be recovered, and the second account"]
+ #[doc = " is the user trying to recover the account."]
+ pub fn active_recoveries_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_recovery::ActiveRecovery<
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Recovery",
+ "ActiveRecoveries",
+ Vec::new(),
+ [
+ 105u8, 72u8, 0u8, 48u8, 187u8, 107u8, 42u8, 95u8, 221u8,
+ 206u8, 105u8, 207u8, 228u8, 150u8, 103u8, 62u8, 195u8, 177u8,
+ 233u8, 97u8, 12u8, 17u8, 76u8, 204u8, 236u8, 29u8, 225u8,
+ 60u8, 228u8, 44u8, 103u8, 39u8,
+ ],
+ )
+ }
+ #[doc = " The list of allowed proxy accounts."]
+ #[doc = ""]
+ #[doc = " Map from the user who can access it to the recovered account."]
+ pub fn proxy(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Recovery",
+ "Proxy",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 100u8, 137u8, 55u8, 32u8, 228u8, 27u8, 3u8, 84u8, 255u8,
+ 68u8, 45u8, 4u8, 215u8, 84u8, 189u8, 81u8, 175u8, 61u8,
+ 252u8, 254u8, 68u8, 179u8, 57u8, 134u8, 223u8, 49u8, 158u8,
+ 165u8, 108u8, 172u8, 70u8, 108u8,
+ ],
+ )
+ }
+ #[doc = " The list of allowed proxy accounts."]
+ #[doc = ""]
+ #[doc = " Map from the user who can access it to the recovered account."]
+ pub fn proxy_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::subxt::utils::AccountId32>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Recovery",
+ "Proxy",
+ Vec::new(),
+ [
+ 100u8, 137u8, 55u8, 32u8, 228u8, 27u8, 3u8, 84u8, 255u8,
+ 68u8, 45u8, 4u8, 215u8, 84u8, 189u8, 81u8, 175u8, 61u8,
+ 252u8, 254u8, 68u8, 179u8, 57u8, 134u8, 223u8, 49u8, 158u8,
+ 165u8, 108u8, 172u8, 70u8, 108u8,
+ ],
+ )
+ }
+ }
+ }
+ pub mod constants {
+ use super::runtime_types;
+ pub struct ConstantsApi;
+ impl ConstantsApi {
+ #[doc = " The base amount of currency needed to reserve for creating a recovery configuration."]
+ #[doc = ""]
+ #[doc = " This is held for an additional storage item whose value size is"]
+ #[doc = " `2 + sizeof(BlockNumber, Balance)` bytes."]
+ pub fn config_deposit_base(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Recovery",
+ "ConfigDepositBase",
+ [
+ 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 additional user when creating a recovery"]
+ #[doc = " configuration."]
+ #[doc = ""]
+ #[doc = " This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage"]
+ #[doc = " value."]
+ pub fn friend_deposit_factor(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Recovery",
+ "FriendDepositFactor",
+ [
+ 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 friends allowed in a recovery configuration."]
+ #[doc = ""]
+ #[doc = " NOTE: The threshold programmed in this Pallet uses u16, so it does"]
+ #[doc = " not really make sense to have a limit here greater than u16::MAX."]
+ #[doc = " But also, that is a lot more than you should probably set this value"]
+ #[doc = " to anyway..."]
+ pub fn max_friends(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Recovery",
+ "MaxFriends",
+ [
+ 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 starting a recovery."]
+ #[doc = ""]
+ #[doc = " This is primarily held for deterring malicious recovery attempts, and should"]
+ #[doc = " have a value large enough that a bad actor would choose not to place this"]
+ #[doc = " deposit. It also acts to fund additional storage item whose value size is"]
+ #[doc = " `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable"]
+ #[doc = " threshold."]
+ pub fn recovery_deposit(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Recovery",
+ "RecoveryDeposit",
+ [
+ 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 vesting {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Vest;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct VestOther {
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct VestedTransfer {
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo<
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ForceVestedTransfer {
+ pub source: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo<
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct MergeSchedules {
+ pub schedule1_index: ::core::primitive::u32,
+ pub schedule2_index: ::core::primitive::u32,
+ }
+ 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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- DbWeight: 2 Reads, 2 Writes"]
+ #[doc = " - Reads: Vesting Storage, Balances Locks, [Sender Account]"]
+ #[doc = " - Writes: Vesting Storage, Balances Locks, [Sender Account]"]
+ #[doc = "# "]
+ pub fn vest(&self) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Vesting",
+ "vest",
+ Vest {},
+ [
+ 123u8, 54u8, 10u8, 208u8, 154u8, 24u8, 39u8, 166u8, 64u8,
+ 27u8, 74u8, 29u8, 243u8, 97u8, 155u8, 5u8, 130u8, 155u8,
+ 65u8, 181u8, 196u8, 125u8, 45u8, 133u8, 25u8, 33u8, 3u8,
+ 34u8, 21u8, 167u8, 172u8, 54u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- DbWeight: 3 Reads, 3 Writes"]
+ #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account"]
+ #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account"]
+ #[doc = "# "]
+ pub fn vest_other(
+ &self,
+ target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Vesting",
+ "vest_other",
+ VestOther { target },
+ [
+ 243u8, 97u8, 222u8, 101u8, 143u8, 17u8, 184u8, 191u8, 208u8,
+ 162u8, 31u8, 121u8, 22u8, 88u8, 2u8, 36u8, 9u8, 22u8, 27u8,
+ 117u8, 236u8, 82u8, 83u8, 218u8, 166u8, 154u8, 49u8, 141u8,
+ 95u8, 127u8, 63u8, 13u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- DbWeight: 3 Reads, 3 Writes"]
+ #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, [Sender Account]"]
+ #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, [Sender Account]"]
+ #[doc = "# "]
+ pub fn vested_transfer(
+ &self,
+ target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo<
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Vesting",
+ "vested_transfer",
+ VestedTransfer { target, schedule },
+ [
+ 157u8, 78u8, 209u8, 131u8, 29u8, 102u8, 180u8, 61u8, 212u8,
+ 154u8, 28u8, 3u8, 150u8, 236u8, 22u8, 116u8, 8u8, 142u8,
+ 174u8, 35u8, 37u8, 167u8, 5u8, 200u8, 189u8, 227u8, 122u8,
+ 55u8, 188u8, 213u8, 59u8, 206u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- `O(1)`."]
+ #[doc = "- DbWeight: 4 Reads, 4 Writes"]
+ #[doc = " - Reads: Vesting Storage, Balances Locks, Target Account, Source Account"]
+ #[doc = " - Writes: Vesting Storage, Balances Locks, Target Account, Source Account"]
+ #[doc = "# "]
+ pub fn force_vested_transfer(
+ &self,
+ source: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ target: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo<
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Vesting",
+ "force_vested_transfer",
+ ForceVestedTransfer {
+ source,
+ target,
+ schedule,
+ },
+ [
+ 181u8, 47u8, 44u8, 166u8, 243u8, 122u8, 51u8, 81u8, 136u8,
+ 192u8, 248u8, 150u8, 149u8, 49u8, 208u8, 203u8, 156u8, 100u8,
+ 56u8, 133u8, 22u8, 53u8, 241u8, 237u8, 145u8, 210u8, 25u8,
+ 48u8, 61u8, 184u8, 112u8, 253u8,
+ ],
+ )
+ }
+ #[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: ::core::primitive::u32,
+ schedule2_index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Vesting",
+ "merge_schedules",
+ MergeSchedules {
+ schedule1_index,
+ schedule2_index,
+ },
+ [
+ 95u8, 255u8, 147u8, 12u8, 49u8, 25u8, 70u8, 112u8, 55u8,
+ 154u8, 183u8, 97u8, 56u8, 244u8, 148u8, 61u8, 107u8, 163u8,
+ 220u8, 31u8, 153u8, 25u8, 193u8, 251u8, 131u8, 26u8, 166u8,
+ 157u8, 75u8, 4u8, 110u8, 125u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_vesting::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[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: ::subxt::utils::AccountId32,
+ pub unvested: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for VestingUpdated {
+ const PALLET: &'static str = "Vesting";
+ const EVENT: &'static str = "VestingUpdated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An \\[account\\] has become fully vested."]
+ pub struct VestingCompleted {
+ pub account: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for VestingCompleted {
+ const PALLET: &'static str = "Vesting";
+ const EVENT: &'static str = "VestingCompleted";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Information regarding the vesting of a given account."]
+ pub fn vesting(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_vesting::vesting_info::VestingInfo<
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Vesting",
+ "Vesting",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Blake2_128Concat,
+ )],
+ [
+ 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8,
+ 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8,
+ 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8,
+ 168u8, 239u8, 212u8, 36u8,
+ ],
+ )
+ }
+ #[doc = " Information regarding the vesting of a given account."]
+ pub fn vesting_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_vesting::vesting_info::VestingInfo<
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Vesting",
+ "Vesting",
+ Vec::new(),
+ [
+ 23u8, 209u8, 233u8, 126u8, 89u8, 156u8, 193u8, 204u8, 100u8,
+ 90u8, 14u8, 120u8, 36u8, 167u8, 148u8, 239u8, 179u8, 74u8,
+ 207u8, 83u8, 54u8, 77u8, 27u8, 135u8, 74u8, 31u8, 33u8, 11u8,
+ 168u8, 239u8, 212u8, 36u8,
+ ],
+ )
+ }
+ #[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::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_vesting::Releases,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Vesting",
+ "StorageVersion",
+ vec![],
+ [
+ 50u8, 143u8, 26u8, 88u8, 129u8, 31u8, 61u8, 118u8, 19u8,
+ 202u8, 119u8, 160u8, 34u8, 219u8, 60u8, 57u8, 189u8, 66u8,
+ 93u8, 239u8, 121u8, 114u8, 241u8, 116u8, 0u8, 122u8, 232u8,
+ 94u8, 189u8, 23u8, 45u8, 191u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 scheduler {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Schedule {
+ pub when: ::core::primitive::u32,
+ pub maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ pub priority: ::core::primitive::u8,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Cancel {
+ pub when: ::core::primitive::u32,
+ pub index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ScheduleNamed {
+ pub id: [::core::primitive::u8; 32usize],
+ pub when: ::core::primitive::u32,
+ pub maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ pub priority: ::core::primitive::u8,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelNamed {
+ pub id: [::core::primitive::u8; 32usize],
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ScheduleAfter {
+ pub after: ::core::primitive::u32,
+ pub maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ pub priority: ::core::primitive::u8,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ScheduleNamedAfter {
+ pub id: [::core::primitive::u8; 32usize],
+ pub after: ::core::primitive::u32,
+ pub maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ pub priority: ::core::primitive::u8,
+ pub call:
+ ::std::boxed::Box,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Anonymously schedule a task."]
+ pub fn schedule(
+ &self,
+ when: ::core::primitive::u32,
+ maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ priority: ::core::primitive::u8,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Scheduler",
+ "schedule",
+ Schedule {
+ when,
+ maybe_periodic,
+ priority,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 65u8, 37u8, 202u8, 193u8, 158u8, 251u8, 1u8, 252u8, 234u8,
+ 16u8, 232u8, 94u8, 223u8, 233u8, 122u8, 7u8, 165u8, 253u8,
+ 155u8, 239u8, 58u8, 191u8, 202u8, 49u8, 82u8, 154u8, 2u8,
+ 9u8, 88u8, 57u8, 211u8, 59u8,
+ ],
+ )
+ }
+ #[doc = "Cancel an anonymously scheduled task."]
+ pub fn cancel(
+ &self,
+ when: ::core::primitive::u32,
+ index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Scheduler",
+ "cancel",
+ Cancel { when, index },
+ [
+ 81u8, 251u8, 234u8, 17u8, 214u8, 75u8, 19u8, 59u8, 19u8,
+ 30u8, 89u8, 74u8, 6u8, 216u8, 238u8, 165u8, 7u8, 19u8, 153u8,
+ 253u8, 161u8, 103u8, 178u8, 227u8, 152u8, 180u8, 80u8, 156u8,
+ 82u8, 126u8, 132u8, 120u8,
+ ],
+ )
+ }
+ #[doc = "Schedule a named task."]
+ pub fn schedule_named(
+ &self,
+ id: [::core::primitive::u8; 32usize],
+ when: ::core::primitive::u32,
+ maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ priority: ::core::primitive::u8,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Scheduler",
+ "schedule_named",
+ ScheduleNamed {
+ id,
+ when,
+ maybe_periodic,
+ priority,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 104u8, 63u8, 169u8, 203u8, 191u8, 136u8, 253u8, 169u8, 52u8,
+ 194u8, 13u8, 25u8, 130u8, 217u8, 224u8, 165u8, 192u8, 152u8,
+ 10u8, 31u8, 183u8, 255u8, 231u8, 46u8, 125u8, 27u8, 77u8,
+ 0u8, 156u8, 233u8, 17u8, 6u8,
+ ],
+ )
+ }
+ #[doc = "Cancel a named scheduled task."]
+ pub fn cancel_named(
+ &self,
+ id: [::core::primitive::u8; 32usize],
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Scheduler",
+ "cancel_named",
+ CancelNamed { id },
+ [
+ 51u8, 3u8, 140u8, 50u8, 214u8, 211u8, 50u8, 4u8, 19u8, 43u8,
+ 230u8, 114u8, 18u8, 108u8, 138u8, 67u8, 99u8, 24u8, 255u8,
+ 11u8, 246u8, 37u8, 192u8, 207u8, 90u8, 157u8, 171u8, 93u8,
+ 233u8, 189u8, 64u8, 180u8,
+ ],
+ )
+ }
+ #[doc = "Anonymously schedule a task after a delay."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Same as [`schedule`]."]
+ #[doc = "# "]
+ pub fn schedule_after(
+ &self,
+ after: ::core::primitive::u32,
+ maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ priority: ::core::primitive::u8,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Scheduler",
+ "schedule_after",
+ ScheduleAfter {
+ after,
+ maybe_periodic,
+ priority,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 246u8, 245u8, 193u8, 81u8, 2u8, 23u8, 127u8, 110u8, 125u8,
+ 176u8, 226u8, 189u8, 241u8, 208u8, 167u8, 208u8, 135u8,
+ 186u8, 11u8, 24u8, 119u8, 50u8, 223u8, 22u8, 44u8, 136u8,
+ 236u8, 222u8, 118u8, 117u8, 20u8, 158u8,
+ ],
+ )
+ }
+ #[doc = "Schedule a named task after a delay."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "Same as [`schedule_named`](Self::schedule_named)."]
+ #[doc = "# "]
+ pub fn schedule_named_after(
+ &self,
+ id: [::core::primitive::u8; 32usize],
+ after: ::core::primitive::u32,
+ maybe_periodic: ::core::option::Option<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ priority: ::core::primitive::u8,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Scheduler",
+ "schedule_named_after",
+ ScheduleNamedAfter {
+ id,
+ after,
+ maybe_periodic,
+ priority,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 226u8, 69u8, 74u8, 53u8, 191u8, 207u8, 203u8, 174u8, 2u8,
+ 120u8, 231u8, 250u8, 114u8, 74u8, 126u8, 63u8, 129u8, 119u8,
+ 248u8, 175u8, 126u8, 82u8, 134u8, 255u8, 249u8, 57u8, 59u8,
+ 164u8, 64u8, 145u8, 33u8, 73u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "Events type."]
+ pub type Event = runtime_types::pallet_scheduler::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Scheduled some task."]
+ pub struct Scheduled {
+ pub when: ::core::primitive::u32,
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Scheduled {
+ const PALLET: &'static str = "Scheduler";
+ const EVENT: &'static str = "Scheduled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Canceled some task."]
+ pub struct Canceled {
+ pub when: ::core::primitive::u32,
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for Canceled {
+ const PALLET: &'static str = "Scheduler";
+ const EVENT: &'static str = "Canceled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "Dispatched some task."]
+ pub struct Dispatched {
+ pub task: (::core::primitive::u32, ::core::primitive::u32),
+ pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>,
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for Dispatched {
+ const PALLET: &'static str = "Scheduler";
+ const EVENT: &'static str = "Dispatched";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The call for the provided hash was not found so the task has been aborted."]
+ pub struct CallUnavailable {
+ pub task: (::core::primitive::u32, ::core::primitive::u32),
+ pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>,
+ }
+ impl ::subxt::events::StaticEvent for CallUnavailable {
+ const PALLET: &'static str = "Scheduler";
+ const EVENT: &'static str = "CallUnavailable";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The given task was unable to be renewed since the agenda is full at that block."]
+ pub struct PeriodicFailed {
+ pub task: (::core::primitive::u32, ::core::primitive::u32),
+ pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>,
+ }
+ impl ::subxt::events::StaticEvent for PeriodicFailed {
+ const PALLET: &'static str = "Scheduler";
+ const EVENT: &'static str = "PeriodicFailed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "The given task can never be executed since it is overweight."]
+ pub struct PermanentlyOverweight {
+ pub task: (::core::primitive::u32, ::core::primitive::u32),
+ pub id: ::core::option::Option<[::core::primitive::u8; 32usize]>,
+ }
+ impl ::subxt::events::StaticEvent for PermanentlyOverweight {
+ const PALLET: &'static str = "Scheduler";
+ const EVENT: &'static str = "PermanentlyOverweight";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ pub fn incomplete_since(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ (),
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Scheduler",
+ "IncompleteSince",
+ vec![],
+ [
+ 149u8, 66u8, 239u8, 67u8, 235u8, 219u8, 101u8, 182u8, 145u8,
+ 56u8, 252u8, 150u8, 253u8, 221u8, 125u8, 57u8, 38u8, 152u8,
+ 153u8, 31u8, 92u8, 238u8, 66u8, 246u8, 104u8, 163u8, 94u8,
+ 73u8, 222u8, 168u8, 193u8, 227u8,
+ ],
+ )
+ }
+ #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda (& self , _0 : impl :: std :: borrow :: Borrow < :: core :: primitive :: u32 > ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: Scheduled < [:: core :: primitive :: u8 ; 32usize] , runtime_types :: frame_support :: traits :: preimages :: Bounded < runtime_types :: kitchensink_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: kitchensink_runtime :: OriginCaller , :: subxt :: utils :: AccountId32 > > > > , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Scheduler",
+ "Agenda",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 19u8, 214u8, 72u8, 97u8, 75u8, 249u8, 252u8, 10u8, 144u8,
+ 74u8, 36u8, 2u8, 196u8, 58u8, 48u8, 240u8, 117u8, 231u8,
+ 111u8, 26u8, 254u8, 81u8, 151u8, 131u8, 242u8, 194u8, 55u8,
+ 158u8, 218u8, 90u8, 183u8, 109u8,
+ ],
+ )
+ }
+ #[doc = " Items to be executed, indexed by the block number that they should be executed on."] pub fn agenda_root (& self ,) -> :: subxt :: storage :: address :: StaticStorageAddress :: < :: subxt :: metadata :: DecodeStaticType < runtime_types :: sp_core :: bounded :: bounded_vec :: BoundedVec < :: core :: option :: Option < runtime_types :: pallet_scheduler :: Scheduled < [:: core :: primitive :: u8 ; 32usize] , runtime_types :: frame_support :: traits :: preimages :: Bounded < runtime_types :: kitchensink_runtime :: RuntimeCall > , :: core :: primitive :: u32 , runtime_types :: kitchensink_runtime :: OriginCaller , :: subxt :: utils :: AccountId32 > > > > , () , :: subxt :: storage :: address :: Yes , :: subxt :: storage :: address :: Yes >{
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Scheduler",
+ "Agenda",
+ Vec::new(),
+ [
+ 19u8, 214u8, 72u8, 97u8, 75u8, 249u8, 252u8, 10u8, 144u8,
+ 74u8, 36u8, 2u8, 196u8, 58u8, 48u8, 240u8, 117u8, 231u8,
+ 111u8, 26u8, 254u8, 81u8, 151u8, 131u8, 242u8, 194u8, 55u8,
+ 158u8, 218u8, 90u8, 183u8, 109u8,
+ ],
+ )
+ }
+ #[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 ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Scheduler",
+ "Lookup",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8,
+ 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8,
+ 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8,
+ 211u8, 158u8, 250u8, 103u8, 243u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ ::core::primitive::u32,
+ ::core::primitive::u32,
+ )>,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Scheduler",
+ "Lookup",
+ Vec::new(),
+ [
+ 82u8, 20u8, 178u8, 101u8, 108u8, 198u8, 71u8, 99u8, 16u8,
+ 175u8, 15u8, 187u8, 229u8, 243u8, 140u8, 200u8, 99u8, 77u8,
+ 248u8, 178u8, 45u8, 121u8, 193u8, 67u8, 165u8, 43u8, 234u8,
+ 211u8, 158u8, 250u8, 103u8, 243u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_weights::weight_v2::Weight,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Scheduler",
+ "MaximumWeight",
+ [
+ 206u8, 61u8, 253u8, 247u8, 163u8, 40u8, 161u8, 52u8, 134u8,
+ 140u8, 206u8, 83u8, 44u8, 166u8, 226u8, 115u8, 181u8, 14u8,
+ 227u8, 130u8, 210u8, 32u8, 85u8, 29u8, 230u8, 97u8, 130u8,
+ 165u8, 147u8, 134u8, 106u8, 76u8,
+ ],
+ )
+ }
+ #[doc = " The maximum number of scheduled calls in the queue for a single block."]
+ pub fn max_scheduled_per_block(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct NotePreimage {
+ pub bytes: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct UnnotePreimage {
+ pub hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RequestPreimage {
+ pub hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct UnrequestPreimage {
+ pub hash: ::subxt::utils::H256,
+ }
+ 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: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Preimage",
+ "note_preimage",
+ NotePreimage { bytes },
+ [
+ 77u8, 48u8, 104u8, 3u8, 254u8, 65u8, 106u8, 95u8, 204u8,
+ 89u8, 149u8, 29u8, 144u8, 188u8, 99u8, 23u8, 146u8, 142u8,
+ 35u8, 17u8, 125u8, 130u8, 31u8, 206u8, 106u8, 83u8, 163u8,
+ 192u8, 81u8, 23u8, 232u8, 230u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Preimage",
+ "unnote_preimage",
+ UnnotePreimage { hash },
+ [
+ 211u8, 204u8, 205u8, 58u8, 33u8, 179u8, 68u8, 74u8, 149u8,
+ 138u8, 213u8, 45u8, 140u8, 27u8, 106u8, 81u8, 68u8, 212u8,
+ 147u8, 116u8, 27u8, 130u8, 84u8, 34u8, 231u8, 197u8, 135u8,
+ 8u8, 19u8, 242u8, 207u8, 17u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Preimage",
+ "request_preimage",
+ RequestPreimage { hash },
+ [
+ 195u8, 26u8, 146u8, 255u8, 79u8, 43u8, 73u8, 60u8, 115u8,
+ 78u8, 99u8, 197u8, 137u8, 95u8, 139u8, 141u8, 79u8, 213u8,
+ 170u8, 169u8, 127u8, 30u8, 236u8, 65u8, 38u8, 16u8, 118u8,
+ 228u8, 141u8, 83u8, 162u8, 233u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Preimage",
+ "unrequest_preimage",
+ UnrequestPreimage { hash },
+ [
+ 143u8, 225u8, 239u8, 44u8, 237u8, 83u8, 18u8, 105u8, 101u8,
+ 68u8, 111u8, 116u8, 66u8, 212u8, 63u8, 190u8, 38u8, 32u8,
+ 105u8, 152u8, 69u8, 177u8, 193u8, 15u8, 60u8, 26u8, 95u8,
+ 130u8, 11u8, 113u8, 187u8, 108u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_preimage::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A preimage has been noted."]
+ pub struct Noted {
+ pub hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Noted {
+ const PALLET: &'static str = "Preimage";
+ const EVENT: &'static str = "Noted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A preimage has been requested."]
+ pub struct Requested {
+ pub hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Requested {
+ const PALLET: &'static str = "Preimage";
+ const EVENT: &'static str = "Requested";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A preimage has ben cleared."]
+ pub struct Cleared {
+ pub hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Cleared {
+ const PALLET: &'static str = "Preimage";
+ const EVENT: &'static str = "Cleared";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The request status of a given hash."]
+ pub fn status_for(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_preimage::RequestStatus<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Preimage",
+ "StatusFor",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8,
+ 80u8, 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8,
+ 37u8, 108u8, 88u8, 233u8, 18u8, 145u8, 9u8, 235u8, 5u8,
+ 132u8, 42u8, 17u8, 227u8, 56u8,
+ ],
+ )
+ }
+ #[doc = " The request status of a given hash."]
+ pub fn status_for_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_preimage::RequestStatus<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Preimage",
+ "StatusFor",
+ Vec::new(),
+ [
+ 103u8, 208u8, 88u8, 167u8, 244u8, 198u8, 129u8, 134u8, 182u8,
+ 80u8, 71u8, 192u8, 73u8, 92u8, 190u8, 15u8, 20u8, 132u8,
+ 37u8, 108u8, 88u8, 233u8, 18u8, 145u8, 9u8, 235u8, 5u8,
+ 132u8, 42u8, 17u8, 227u8, 56u8,
+ ],
+ )
+ }
+ pub fn preimage_for(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::H256>,
+ _1: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u8,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Preimage",
+ "PreimageFor",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ &(_0.borrow(), _1.borrow()),
+ ::subxt::storage::address::StorageHasher::Identity,
+ )],
+ [
+ 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8,
+ 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8,
+ 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8,
+ 185u8, 234u8, 131u8, 124u8,
+ ],
+ )
+ }
+ pub fn preimage_for_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u8,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Preimage",
+ "PreimageFor",
+ Vec::new(),
+ [
+ 96u8, 74u8, 30u8, 112u8, 120u8, 41u8, 52u8, 187u8, 252u8,
+ 68u8, 42u8, 5u8, 61u8, 228u8, 250u8, 192u8, 224u8, 61u8,
+ 53u8, 222u8, 95u8, 148u8, 6u8, 53u8, 43u8, 152u8, 88u8, 58u8,
+ 185u8, 234u8, 131u8, 124u8,
+ ],
+ )
+ }
+ }
+ }
+ }
+ pub mod proxy {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Proxy {
+ pub real: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub force_proxy_type:
+ ::core::option::Option,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AddProxy {
+ pub delegate: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub delay: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveProxy {
+ pub delegate: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub delay: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveProxies;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CreatePure {
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub delay: ::core::primitive::u32,
+ pub index: ::core::primitive::u16,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct KillPure {
+ pub spawner: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub index: ::core::primitive::u16,
+ #[codec(compact)]
+ pub height: ::core::primitive::u32,
+ #[codec(compact)]
+ pub ext_index: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Announce {
+ pub real: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub call_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RemoveAnnouncement {
+ pub real: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub call_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RejectAnnouncement {
+ pub delegate: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub call_hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ProxyAnnounced {
+ pub delegate: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub real: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ pub force_proxy_type:
+ ::core::option::Option,
+ pub call:
+ ::std::boxed::Box,
+ }
+ 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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ force_proxy_type: ::core::option::Option<
+ runtime_types::kitchensink_runtime::ProxyType,
+ >,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "proxy",
+ Proxy {
+ real,
+ force_proxy_type,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 35u8, 191u8, 194u8, 99u8, 76u8, 27u8, 31u8, 235u8, 33u8,
+ 41u8, 155u8, 0u8, 171u8, 8u8, 183u8, 28u8, 149u8, 254u8,
+ 251u8, 194u8, 129u8, 73u8, 117u8, 147u8, 150u8, 154u8, 83u8,
+ 49u8, 117u8, 90u8, 59u8, 188u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ delay: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "add_proxy",
+ AddProxy {
+ delegate,
+ proxy_type,
+ delay,
+ },
+ [
+ 179u8, 225u8, 244u8, 52u8, 43u8, 253u8, 204u8, 37u8, 236u8,
+ 61u8, 140u8, 160u8, 140u8, 4u8, 198u8, 186u8, 91u8, 113u8,
+ 204u8, 15u8, 167u8, 9u8, 232u8, 208u8, 130u8, 202u8, 67u8,
+ 44u8, 30u8, 35u8, 113u8, 152u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ delay: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "remove_proxy",
+ RemoveProxy {
+ delegate,
+ proxy_type,
+ delay,
+ },
+ [
+ 207u8, 163u8, 188u8, 238u8, 61u8, 133u8, 145u8, 118u8, 223u8,
+ 169u8, 11u8, 101u8, 38u8, 135u8, 194u8, 141u8, 84u8, 194u8,
+ 65u8, 159u8, 215u8, 210u8, 109u8, 7u8, 46u8, 31u8, 92u8,
+ 233u8, 50u8, 224u8, 57u8, 8u8,
+ ],
+ )
+ }
+ #[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::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "remove_proxies",
+ RemoveProxies {},
+ [
+ 15u8, 237u8, 27u8, 166u8, 254u8, 218u8, 92u8, 5u8, 213u8,
+ 239u8, 99u8, 59u8, 1u8, 26u8, 73u8, 252u8, 81u8, 94u8, 214u8,
+ 227u8, 169u8, 58u8, 40u8, 253u8, 187u8, 225u8, 192u8, 26u8,
+ 19u8, 23u8, 121u8, 129u8,
+ ],
+ )
+ }
+ #[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: runtime_types::kitchensink_runtime::ProxyType,
+ delay: ::core::primitive::u32,
+ index: ::core::primitive::u16,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "create_pure",
+ CreatePure {
+ proxy_type,
+ delay,
+ index,
+ },
+ [
+ 46u8, 194u8, 136u8, 133u8, 111u8, 12u8, 51u8, 219u8, 148u8,
+ 227u8, 22u8, 236u8, 91u8, 15u8, 73u8, 48u8, 222u8, 219u8,
+ 133u8, 157u8, 65u8, 136u8, 119u8, 76u8, 116u8, 13u8, 33u8,
+ 215u8, 138u8, 211u8, 195u8, 157u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ index: ::core::primitive::u16,
+ height: ::core::primitive::u32,
+ ext_index: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "kill_pure",
+ KillPure {
+ spawner,
+ proxy_type,
+ index,
+ height,
+ ext_index,
+ },
+ [
+ 76u8, 246u8, 203u8, 222u8, 54u8, 155u8, 53u8, 188u8, 243u8,
+ 178u8, 173u8, 59u8, 31u8, 188u8, 152u8, 209u8, 211u8, 139u8,
+ 65u8, 150u8, 18u8, 5u8, 75u8, 223u8, 112u8, 196u8, 45u8,
+ 157u8, 111u8, 92u8, 106u8, 255u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ call_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "announce",
+ Announce { real, call_hash },
+ [
+ 226u8, 252u8, 69u8, 50u8, 248u8, 212u8, 209u8, 225u8, 201u8,
+ 236u8, 51u8, 136u8, 56u8, 85u8, 36u8, 130u8, 233u8, 84u8,
+ 44u8, 192u8, 174u8, 119u8, 245u8, 62u8, 150u8, 78u8, 217u8,
+ 90u8, 167u8, 154u8, 228u8, 141u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ call_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "remove_announcement",
+ RemoveAnnouncement { real, call_hash },
+ [
+ 251u8, 236u8, 113u8, 182u8, 125u8, 244u8, 31u8, 144u8, 66u8,
+ 28u8, 65u8, 97u8, 67u8, 94u8, 225u8, 210u8, 46u8, 143u8,
+ 242u8, 124u8, 120u8, 93u8, 23u8, 165u8, 83u8, 177u8, 250u8,
+ 171u8, 58u8, 66u8, 70u8, 64u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ call_hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "reject_announcement",
+ RejectAnnouncement {
+ delegate,
+ call_hash,
+ },
+ [
+ 122u8, 165u8, 114u8, 85u8, 209u8, 197u8, 11u8, 96u8, 211u8,
+ 93u8, 201u8, 42u8, 1u8, 131u8, 254u8, 177u8, 191u8, 212u8,
+ 229u8, 13u8, 28u8, 163u8, 133u8, 200u8, 113u8, 28u8, 132u8,
+ 45u8, 105u8, 177u8, 82u8, 206u8,
+ ],
+ )
+ }
+ #[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: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ real: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ force_proxy_type: ::core::option::Option<
+ runtime_types::kitchensink_runtime::ProxyType,
+ >,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Proxy",
+ "proxy_announced",
+ ProxyAnnounced {
+ delegate,
+ real,
+ force_proxy_type,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 151u8, 115u8, 208u8, 117u8, 44u8, 177u8, 216u8, 185u8, 152u8,
+ 246u8, 150u8, 107u8, 146u8, 110u8, 145u8, 208u8, 56u8, 231u8,
+ 30u8, 251u8, 247u8, 209u8, 156u8, 167u8, 106u8, 173u8, 29u8,
+ 194u8, 212u8, 199u8, 19u8, 218u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_proxy::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proxy was executed correctly, with the given."]
+ pub struct ProxyExecuted {
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for ProxyExecuted {
+ const PALLET: &'static str = "Proxy";
+ const EVENT: &'static str = "ProxyExecuted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A pure account has been created by new proxy with given"]
+ #[doc = "disambiguation index and proxy type."]
+ pub struct PureCreated {
+ pub pure: ::subxt::utils::AccountId32,
+ pub who: ::subxt::utils::AccountId32,
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub disambiguation_index: ::core::primitive::u16,
+ }
+ impl ::subxt::events::StaticEvent for PureCreated {
+ const PALLET: &'static str = "Proxy";
+ const EVENT: &'static str = "PureCreated";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "An announcement was placed to make a call in the future."]
+ pub struct Announced {
+ pub real: ::subxt::utils::AccountId32,
+ pub proxy: ::subxt::utils::AccountId32,
+ pub call_hash: ::subxt::utils::H256,
+ }
+ impl ::subxt::events::StaticEvent for Announced {
+ const PALLET: &'static str = "Proxy";
+ const EVENT: &'static str = "Announced";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proxy was added."]
+ pub struct ProxyAdded {
+ pub delegator: ::subxt::utils::AccountId32,
+ pub delegatee: ::subxt::utils::AccountId32,
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub delay: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for ProxyAdded {
+ const PALLET: &'static str = "Proxy";
+ const EVENT: &'static str = "ProxyAdded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A proxy was removed."]
+ pub struct ProxyRemoved {
+ pub delegator: ::subxt::utils::AccountId32,
+ pub delegatee: ::subxt::utils::AccountId32,
+ pub proxy_type: runtime_types::kitchensink_runtime::ProxyType,
+ pub delay: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for ProxyRemoved {
+ const PALLET: &'static str = "Proxy";
+ const EVENT: &'static str = "ProxyRemoved";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ 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(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_proxy::ProxyDefinition<
+ ::subxt::utils::AccountId32,
+ runtime_types::kitchensink_runtime::ProxyType,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::core::primitive::u128,
+ )>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Proxy",
+ "Proxies",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 35u8, 140u8, 42u8, 184u8, 125u8, 223u8, 255u8, 143u8, 55u8,
+ 148u8, 168u8, 246u8, 208u8, 160u8, 176u8, 177u8, 174u8,
+ 162u8, 90u8, 65u8, 156u8, 91u8, 110u8, 131u8, 24u8, 8u8,
+ 18u8, 89u8, 96u8, 108u8, 55u8, 47u8,
+ ],
+ )
+ }
+ #[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_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_proxy::ProxyDefinition<
+ ::subxt::utils::AccountId32,
+ runtime_types::kitchensink_runtime::ProxyType,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::core::primitive::u128,
+ )>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Proxy",
+ "Proxies",
+ Vec::new(),
+ [
+ 35u8, 140u8, 42u8, 184u8, 125u8, 223u8, 255u8, 143u8, 55u8,
+ 148u8, 168u8, 246u8, 208u8, 160u8, 176u8, 177u8, 174u8,
+ 162u8, 90u8, 65u8, 156u8, 91u8, 110u8, 131u8, 24u8, 8u8,
+ 18u8, 89u8, 96u8, 108u8, 55u8, 47u8,
+ ],
+ )
+ }
+ #[doc = " The announcements made by the proxy (key)."]
+ pub fn announcements(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_proxy::Announcement<
+ ::subxt::utils::AccountId32,
+ ::subxt::utils::H256,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::core::primitive::u128,
+ )>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Proxy",
+ "Announcements",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8,
+ 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8,
+ 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8,
+ 237u8, 103u8, 217u8, 53u8,
+ ],
+ )
+ }
+ #[doc = " The announcements made by the proxy (key)."]
+ pub fn announcements_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<(
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ runtime_types::pallet_proxy::Announcement<
+ ::subxt::utils::AccountId32,
+ ::subxt::utils::H256,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::core::primitive::u128,
+ )>,
+ (),
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Proxy",
+ "Announcements",
+ Vec::new(),
+ [
+ 233u8, 38u8, 249u8, 89u8, 103u8, 87u8, 64u8, 52u8, 140u8,
+ 228u8, 110u8, 37u8, 8u8, 92u8, 48u8, 7u8, 46u8, 99u8, 179u8,
+ 83u8, 232u8, 171u8, 160u8, 45u8, 37u8, 23u8, 151u8, 198u8,
+ 237u8, 103u8, 217u8, 53u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 multisig {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AsMultiThreshold1 {
+ pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub call:
+ ::std::boxed::Box,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AsMulti {
+ pub threshold: ::core::primitive::u16,
+ pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub maybe_timepoint: ::core::option::Option<
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ >,
+ pub call:
+ ::std::boxed::Box,
+ pub max_weight: runtime_types::sp_weights::weight_v2::Weight,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ApproveAsMulti {
+ pub threshold: ::core::primitive::u16,
+ pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub maybe_timepoint: ::core::option::Option<
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ >,
+ pub call_hash: [::core::primitive::u8; 32usize],
+ pub max_weight: runtime_types::sp_weights::weight_v2::Weight,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CancelAsMulti {
+ pub threshold: ::core::primitive::u16,
+ pub other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ pub timepoint:
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ pub call_hash: [::core::primitive::u8; 32usize],
+ }
+ 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 = "# "]
+ #[doc = "O(Z + C) where Z is the length of the call and C its execution weight."]
+ #[doc = "-------------------------------"]
+ #[doc = "- DB Weight: None"]
+ #[doc = "- Plus Call Weight"]
+ #[doc = "# "]
+ pub fn as_multi_threshold_1(
+ &self,
+ other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Multisig",
+ "as_multi_threshold_1",
+ AsMultiThreshold1 {
+ other_signatories,
+ call: ::std::boxed::Box::new(call),
+ },
+ [
+ 225u8, 116u8, 99u8, 232u8, 184u8, 9u8, 5u8, 129u8, 233u8,
+ 11u8, 27u8, 225u8, 25u8, 47u8, 174u8, 3u8, 83u8, 108u8, 40u8,
+ 208u8, 63u8, 195u8, 29u8, 167u8, 209u8, 149u8, 8u8, 172u8,
+ 216u8, 72u8, 99u8, 223u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[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`."]
+ #[doc = "-------------------------------"]
+ #[doc = "- DB Weight:"]
+ #[doc = " - Reads: Multisig Storage, [Caller Account]"]
+ #[doc = " - Writes: Multisig Storage, [Caller Account]"]
+ #[doc = "- Plus Call Weight"]
+ #[doc = "# "]
+ pub fn as_multi(
+ &self,
+ threshold: ::core::primitive::u16,
+ other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ maybe_timepoint: ::core::option::Option<
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ >,
+ call: runtime_types::kitchensink_runtime::RuntimeCall,
+ max_weight: runtime_types::sp_weights::weight_v2::Weight,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Multisig",
+ "as_multi",
+ AsMulti {
+ threshold,
+ other_signatories,
+ maybe_timepoint,
+ call: ::std::boxed::Box::new(call),
+ max_weight,
+ },
+ [
+ 191u8, 221u8, 239u8, 34u8, 200u8, 99u8, 81u8, 47u8, 59u8,
+ 12u8, 221u8, 203u8, 49u8, 91u8, 106u8, 222u8, 34u8, 135u8,
+ 88u8, 204u8, 139u8, 47u8, 248u8, 222u8, 141u8, 28u8, 58u8,
+ 80u8, 87u8, 117u8, 134u8, 24u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[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`."]
+ #[doc = "----------------------------------"]
+ #[doc = "- DB Weight:"]
+ #[doc = " - Read: Multisig Storage, [Caller Account]"]
+ #[doc = " - Write: Multisig Storage, [Caller Account]"]
+ #[doc = "# "]
+ pub fn approve_as_multi(
+ &self,
+ threshold: ::core::primitive::u16,
+ other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ maybe_timepoint: ::core::option::Option<
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ >,
+ call_hash: [::core::primitive::u8; 32usize],
+ max_weight: runtime_types::sp_weights::weight_v2::Weight,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Multisig",
+ "approve_as_multi",
+ ApproveAsMulti {
+ threshold,
+ other_signatories,
+ maybe_timepoint,
+ call_hash,
+ max_weight,
+ },
+ [
+ 133u8, 113u8, 121u8, 66u8, 218u8, 219u8, 48u8, 64u8, 211u8,
+ 114u8, 163u8, 193u8, 164u8, 21u8, 140u8, 218u8, 253u8, 237u8,
+ 240u8, 126u8, 200u8, 213u8, 184u8, 50u8, 187u8, 182u8, 30u8,
+ 52u8, 142u8, 72u8, 210u8, 101u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[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."]
+ #[doc = "----------------------------------"]
+ #[doc = "- DB Weight:"]
+ #[doc = " - Read: Multisig Storage, [Caller Account], Refund Account"]
+ #[doc = " - Write: Multisig Storage, [Caller Account], Refund Account"]
+ #[doc = "# "]
+ pub fn cancel_as_multi(
+ &self,
+ threshold: ::core::primitive::u16,
+ other_signatories: ::std::vec::Vec<::subxt::utils::AccountId32>,
+ timepoint: runtime_types::pallet_multisig::Timepoint<
+ ::core::primitive::u32,
+ >,
+ call_hash: [::core::primitive::u8; 32usize],
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Multisig",
+ "cancel_as_multi",
+ CancelAsMulti {
+ threshold,
+ other_signatories,
+ timepoint,
+ call_hash,
+ },
+ [
+ 30u8, 25u8, 186u8, 142u8, 168u8, 81u8, 235u8, 164u8, 82u8,
+ 209u8, 66u8, 129u8, 209u8, 78u8, 172u8, 9u8, 163u8, 222u8,
+ 125u8, 57u8, 2u8, 43u8, 169u8, 174u8, 159u8, 167u8, 25u8,
+ 226u8, 254u8, 110u8, 80u8, 216u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_multisig::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A new multisig operation has begun."]
+ pub struct NewMultisig {
+ pub approving: ::subxt::utils::AccountId32,
+ pub multisig: ::subxt::utils::AccountId32,
+ pub call_hash: [::core::primitive::u8; 32usize],
+ }
+ impl ::subxt::events::StaticEvent for NewMultisig {
+ const PALLET: &'static str = "Multisig";
+ const EVENT: &'static str = "NewMultisig";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A multisig operation has been approved by someone."]
+ pub struct MultisigApproval {
+ pub approving: ::subxt::utils::AccountId32,
+ pub timepoint:
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ pub multisig: ::subxt::utils::AccountId32,
+ pub call_hash: [::core::primitive::u8; 32usize],
+ }
+ impl ::subxt::events::StaticEvent for MultisigApproval {
+ const PALLET: &'static str = "Multisig";
+ const EVENT: &'static str = "MultisigApproval";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A multisig operation has been executed."]
+ pub struct MultisigExecuted {
+ pub approving: ::subxt::utils::AccountId32,
+ pub timepoint:
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ pub multisig: ::subxt::utils::AccountId32,
+ pub call_hash: [::core::primitive::u8; 32usize],
+ pub result:
+ ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>,
+ }
+ impl ::subxt::events::StaticEvent for MultisigExecuted {
+ const PALLET: &'static str = "Multisig";
+ const EVENT: &'static str = "MultisigExecuted";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A multisig operation has been cancelled."]
+ pub struct MultisigCancelled {
+ pub cancelling: ::subxt::utils::AccountId32,
+ pub timepoint:
+ runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>,
+ pub multisig: ::subxt::utils::AccountId32,
+ pub call_hash: [::core::primitive::u8; 32usize],
+ }
+ impl ::subxt::events::StaticEvent for MultisigCancelled {
+ const PALLET: &'static str = "Multisig";
+ const EVENT: &'static str = "MultisigCancelled";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " The set of open multisig operations."]
+ pub fn multisigs(
+ &self,
+ _0: impl ::std::borrow::Borrow<::subxt::utils::AccountId32>,
+ _1: impl ::std::borrow::Borrow<[::core::primitive::u8; 32usize]>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_multisig::Multisig<
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ :: subxt :: storage :: address :: StaticStorageAddress :: new ("Multisig" , "Multisigs" , vec ! [:: subxt :: storage :: address :: StorageMapKey :: new (_0 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Twox64Concat) , :: subxt :: storage :: address :: StorageMapKey :: new (_1 . borrow () , :: subxt :: storage :: address :: StorageHasher :: Blake2_128Concat)] , [69u8 , 153u8 , 186u8 , 204u8 , 117u8 , 95u8 , 119u8 , 182u8 , 220u8 , 87u8 , 8u8 , 15u8 , 123u8 , 83u8 , 5u8 , 188u8 , 115u8 , 121u8 , 163u8 , 96u8 , 218u8 , 3u8 , 106u8 , 44u8 , 44u8 , 187u8 , 46u8 , 238u8 , 80u8 , 203u8 , 175u8 , 155u8 ,])
+ }
+ #[doc = " The set of open multisig operations."]
+ pub fn multisigs_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_multisig::Multisig<
+ ::core::primitive::u32,
+ ::core::primitive::u128,
+ ::subxt::utils::AccountId32,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Multisig",
+ "Multisigs",
+ Vec::new(),
+ [
+ 69u8, 153u8, 186u8, 204u8, 117u8, 95u8, 119u8, 182u8, 220u8,
+ 87u8, 8u8, 15u8, 123u8, 83u8, 5u8, 188u8, 115u8, 121u8,
+ 163u8, 96u8, 218u8, 3u8, 106u8, 44u8, 44u8, 187u8, 46u8,
+ 238u8, 80u8, 203u8, 175u8, 155u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 bounties {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ProposeBounty {
+ #[codec(compact)]
+ pub value: ::core::primitive::u128,
+ pub description: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ApproveBounty {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ProposeCurator {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ pub curator: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub fee: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct UnassignCurator {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AcceptCurator {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct AwardBounty {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ pub beneficiary: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ClaimBounty {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CloseBounty {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ExtendBountyExpiry {
+ #[codec(compact)]
+ pub bounty_id: ::core::primitive::u32,
+ pub remark: ::std::vec::Vec<::core::primitive::u8>,
+ }
+ 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: ::core::primitive::u128,
+ description: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "propose_bounty",
+ ProposeBounty { value, description },
+ [
+ 99u8, 160u8, 94u8, 74u8, 105u8, 161u8, 123u8, 239u8, 241u8,
+ 117u8, 97u8, 99u8, 84u8, 101u8, 87u8, 3u8, 88u8, 175u8, 75u8,
+ 59u8, 114u8, 87u8, 18u8, 113u8, 126u8, 26u8, 42u8, 104u8,
+ 201u8, 128u8, 102u8, 219u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn approve_bounty(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "approve_bounty",
+ ApproveBounty { bounty_id },
+ [
+ 82u8, 228u8, 232u8, 103u8, 198u8, 173u8, 190u8, 148u8, 159u8,
+ 86u8, 48u8, 4u8, 32u8, 169u8, 1u8, 129u8, 96u8, 145u8, 235u8,
+ 68u8, 48u8, 34u8, 5u8, 1u8, 76u8, 26u8, 100u8, 228u8, 92u8,
+ 198u8, 183u8, 173u8,
+ ],
+ )
+ }
+ #[doc = "Assign a curator to a funded bounty."]
+ #[doc = ""]
+ #[doc = "May only be called from `T::SpendOrigin`."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn propose_curator(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ curator: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ fee: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "propose_curator",
+ ProposeCurator {
+ bounty_id,
+ curator,
+ fee,
+ },
+ [
+ 85u8, 186u8, 206u8, 137u8, 98u8, 87u8, 202u8, 71u8, 89u8,
+ 241u8, 56u8, 212u8, 89u8, 215u8, 65u8, 97u8, 202u8, 139u8,
+ 78u8, 66u8, 92u8, 177u8, 163u8, 111u8, 212u8, 244u8, 41u8,
+ 153u8, 104u8, 129u8, 112u8, 237u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn unassign_curator(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "unassign_curator",
+ UnassignCurator { bounty_id },
+ [
+ 218u8, 241u8, 247u8, 89u8, 95u8, 120u8, 93u8, 18u8, 85u8,
+ 114u8, 158u8, 254u8, 68u8, 77u8, 230u8, 186u8, 230u8, 201u8,
+ 63u8, 223u8, 28u8, 173u8, 244u8, 82u8, 113u8, 177u8, 99u8,
+ 27u8, 207u8, 247u8, 207u8, 213u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn accept_curator(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "accept_curator",
+ AcceptCurator { bounty_id },
+ [
+ 106u8, 96u8, 22u8, 67u8, 52u8, 109u8, 180u8, 225u8, 122u8,
+ 253u8, 209u8, 214u8, 132u8, 131u8, 247u8, 131u8, 162u8, 51u8,
+ 144u8, 30u8, 12u8, 126u8, 50u8, 152u8, 229u8, 119u8, 54u8,
+ 116u8, 112u8, 235u8, 34u8, 166u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn award_bounty(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ beneficiary: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "award_bounty",
+ AwardBounty {
+ bounty_id,
+ beneficiary,
+ },
+ [
+ 7u8, 205u8, 73u8, 45u8, 57u8, 8u8, 24u8, 135u8, 89u8, 157u8,
+ 35u8, 176u8, 224u8, 106u8, 167u8, 232u8, 230u8, 153u8, 239u8,
+ 45u8, 210u8, 61u8, 17u8, 106u8, 220u8, 131u8, 105u8, 136u8,
+ 232u8, 194u8, 243u8, 48u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn claim_bounty(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "claim_bounty",
+ ClaimBounty { bounty_id },
+ [
+ 102u8, 95u8, 8u8, 89u8, 4u8, 126u8, 189u8, 28u8, 241u8, 16u8,
+ 125u8, 218u8, 42u8, 92u8, 177u8, 91u8, 8u8, 235u8, 33u8,
+ 48u8, 64u8, 115u8, 177u8, 95u8, 242u8, 97u8, 181u8, 50u8,
+ 68u8, 37u8, 59u8, 85u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn close_bounty(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "close_bounty",
+ CloseBounty { bounty_id },
+ [
+ 64u8, 113u8, 151u8, 228u8, 90u8, 55u8, 251u8, 63u8, 27u8,
+ 211u8, 119u8, 229u8, 137u8, 137u8, 183u8, 240u8, 241u8,
+ 146u8, 69u8, 169u8, 124u8, 220u8, 236u8, 111u8, 98u8, 188u8,
+ 100u8, 52u8, 127u8, 245u8, 244u8, 92u8,
+ ],
+ )
+ }
+ #[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 = "# "]
+ #[doc = "- O(1)."]
+ #[doc = "# "]
+ pub fn extend_bounty_expiry(
+ &self,
+ bounty_id: ::core::primitive::u32,
+ remark: ::std::vec::Vec<::core::primitive::u8>,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Bounties",
+ "extend_bounty_expiry",
+ ExtendBountyExpiry { bounty_id, remark },
+ [
+ 97u8, 69u8, 157u8, 39u8, 59u8, 72u8, 79u8, 88u8, 104u8,
+ 119u8, 91u8, 26u8, 73u8, 216u8, 174u8, 95u8, 254u8, 214u8,
+ 63u8, 138u8, 100u8, 112u8, 185u8, 81u8, 159u8, 247u8, 221u8,
+ 60u8, 87u8, 40u8, 80u8, 202u8,
+ ],
+ )
+ }
+ }
+ }
+ #[doc = "\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"]
+ pub type Event = runtime_types::pallet_bounties::pallet::Event;
+ pub mod events {
+ use super::runtime_types;
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "New bounty proposal."]
+ pub struct BountyProposed {
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for BountyProposed {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyProposed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A bounty proposal was rejected; funds were slashed."]
+ pub struct BountyRejected {
+ pub index: ::core::primitive::u32,
+ pub bond: ::core::primitive::u128,
+ }
+ impl ::subxt::events::StaticEvent for BountyRejected {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyRejected";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A bounty proposal is funded and became active."]
+ pub struct BountyBecameActive {
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for BountyBecameActive {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyBecameActive";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A bounty is awarded to a beneficiary."]
+ pub struct BountyAwarded {
+ pub index: ::core::primitive::u32,
+ pub beneficiary: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for BountyAwarded {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyAwarded";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A bounty is claimed by beneficiary."]
+ pub struct BountyClaimed {
+ pub index: ::core::primitive::u32,
+ pub payout: ::core::primitive::u128,
+ pub beneficiary: ::subxt::utils::AccountId32,
+ }
+ impl ::subxt::events::StaticEvent for BountyClaimed {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyClaimed";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A bounty is cancelled."]
+ pub struct BountyCanceled {
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for BountyCanceled {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyCanceled";
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: CompactAs,
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ #[doc = "A bounty expiry is extended."]
+ pub struct BountyExtended {
+ pub index: ::core::primitive::u32,
+ }
+ impl ::subxt::events::StaticEvent for BountyExtended {
+ const PALLET: &'static str = "Bounties";
+ const EVENT: &'static str = "BountyExtended";
+ }
+ }
+ pub mod storage {
+ use super::runtime_types;
+ pub struct StorageApi;
+ impl StorageApi {
+ #[doc = " Number of bounty proposals that have been made."]
+ pub fn bounty_count(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Bounties",
+ "BountyCount",
+ vec![],
+ [
+ 5u8, 188u8, 134u8, 220u8, 64u8, 49u8, 188u8, 98u8, 185u8,
+ 186u8, 230u8, 65u8, 247u8, 199u8, 28u8, 178u8, 202u8, 193u8,
+ 41u8, 83u8, 115u8, 253u8, 182u8, 123u8, 92u8, 138u8, 12u8,
+ 31u8, 31u8, 213u8, 23u8, 118u8,
+ ],
+ )
+ }
+ #[doc = " Bounties that have been made."]
+ pub fn bounties(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_bounties::Bounty<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Bounties",
+ "Bounties",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8,
+ 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8,
+ 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8,
+ 11u8, 99u8, 126u8, 225u8, 208u8,
+ ],
+ )
+ }
+ #[doc = " Bounties that have been made."]
+ pub fn bounties_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::pallet_bounties::Bounty<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u128,
+ ::core::primitive::u32,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Bounties",
+ "Bounties",
+ Vec::new(),
+ [
+ 111u8, 149u8, 33u8, 54u8, 172u8, 143u8, 41u8, 231u8, 184u8,
+ 255u8, 238u8, 206u8, 87u8, 142u8, 84u8, 10u8, 236u8, 141u8,
+ 190u8, 193u8, 72u8, 170u8, 19u8, 110u8, 135u8, 136u8, 220u8,
+ 11u8, 99u8, 126u8, 225u8, 208u8,
+ ],
+ )
+ }
+ #[doc = " The description of each bounty."]
+ pub fn bounty_descriptions(
+ &self,
+ _0: impl ::std::borrow::Borrow<::core::primitive::u32>,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u8,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Bounties",
+ "BountyDescriptions",
+ vec![::subxt::storage::address::StorageMapKey::new(
+ _0.borrow(),
+ ::subxt::storage::address::StorageHasher::Twox64Concat,
+ )],
+ [
+ 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8,
+ 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8,
+ 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8,
+ 239u8, 111u8, 22u8, 29u8, 13u8,
+ ],
+ )
+ }
+ #[doc = " The description of each bounty."]
+ pub fn bounty_descriptions_root(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u8,
+ >,
+ >,
+ (),
+ (),
+ ::subxt::storage::address::Yes,
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Bounties",
+ "BountyDescriptions",
+ Vec::new(),
+ [
+ 252u8, 0u8, 9u8, 225u8, 13u8, 135u8, 7u8, 121u8, 154u8,
+ 155u8, 116u8, 83u8, 160u8, 37u8, 72u8, 11u8, 72u8, 0u8,
+ 248u8, 73u8, 158u8, 84u8, 125u8, 221u8, 176u8, 231u8, 100u8,
+ 239u8, 111u8, 22u8, 29u8, 13u8,
+ ],
+ )
+ }
+ #[doc = " Bounty indices that have been approved but not yet funded."]
+ pub fn bounty_approvals(
+ &self,
+ ) -> ::subxt::storage::address::StaticStorageAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_core::bounded::bounded_vec::BoundedVec<
+ ::core::primitive::u32,
+ >,
+ >,
+ ::subxt::storage::address::Yes,
+ ::subxt::storage::address::Yes,
+ (),
+ > {
+ ::subxt::storage::address::StaticStorageAddress::new(
+ "Bounties",
+ "BountyApprovals",
+ vec![],
+ [
+ 64u8, 93u8, 54u8, 94u8, 122u8, 9u8, 246u8, 86u8, 234u8, 30u8,
+ 125u8, 132u8, 49u8, 128u8, 1u8, 219u8, 241u8, 13u8, 217u8,
+ 186u8, 48u8, 21u8, 5u8, 227u8, 71u8, 157u8, 128u8, 226u8,
+ 214u8, 49u8, 249u8, 183u8,
+ ],
+ )
+ }
+ }
+ }
+ 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Bounties",
+ "BountyDepositPayoutDelay",
+ [
+ 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 = " Bounty duration in blocks."]
+ pub fn bounty_update_period(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Bounties",
+ "BountyUpdatePeriod",
+ [
+ 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 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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ runtime_types::sp_arithmetic::per_things::Permill,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Bounties",
+ "CuratorDepositMultiplier",
+ [
+ 225u8, 236u8, 95u8, 157u8, 90u8, 94u8, 106u8, 192u8, 254u8,
+ 19u8, 87u8, 80u8, 16u8, 62u8, 42u8, 204u8, 136u8, 106u8,
+ 225u8, 53u8, 212u8, 52u8, 177u8, 79u8, 4u8, 116u8, 201u8,
+ 104u8, 222u8, 75u8, 86u8, 227u8,
+ ],
+ )
+ }
+ #[doc = " Maximum amount of funds that should be placed in a deposit for making a proposal."]
+ pub fn curator_deposit_max(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::core::option::Option<::core::primitive::u128>,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Bounties",
+ "CuratorDepositMax",
+ [
+ 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8,
+ 194u8, 88u8, 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8,
+ 154u8, 237u8, 134u8, 204u8, 102u8, 247u8, 52u8, 103u8, 231u8,
+ 43u8, 243u8, 122u8, 60u8, 216u8,
+ ],
+ )
+ }
+ #[doc = " Minimum amount of funds that should be placed in a deposit for making a proposal."]
+ pub fn curator_deposit_min(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<
+ ::core::option::Option<::core::primitive::u128>,
+ >,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "Bounties",
+ "CuratorDepositMin",
+ [
+ 84u8, 154u8, 218u8, 83u8, 84u8, 189u8, 32u8, 20u8, 120u8,
+ 194u8, 88u8, 205u8, 109u8, 216u8, 114u8, 193u8, 120u8, 198u8,
+ 154u8, 237u8, 134u8, 204u8, 102u8, 247u8, 52u8, 103u8, 231u8,
+ 43u8, 243u8, 122u8, 60u8, 216u8,
+ ],
+ )
+ }
+ #[doc = " Minimum value for a bounty."]
+ pub fn bounty_value_minimum(
+ &self,
+ ) -> ::subxt::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u128>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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::constants::StaticConstantAddress<
+ ::subxt::metadata::DecodeStaticType<::core::primitive::u32>,
+ > {
+ ::subxt::constants::StaticConstantAddress::new(
+ "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 tips {
+ use super::root_mod;
+ use super::runtime_types;
+ #[doc = "Contains one variant per dispatchable that can be called by an extrinsic."]
+ pub mod calls {
+ use super::root_mod;
+ use super::runtime_types;
+ type DispatchError = runtime_types::sp_runtime::DispatchError;
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct ReportAwesome {
+ pub reason: ::std::vec::Vec<::core::primitive::u8>,
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct RetractTip {
+ pub hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct TipNew {
+ pub reason: ::std::vec::Vec<::core::primitive::u8>,
+ pub who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ #[codec(compact)]
+ pub tip_value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct Tip {
+ pub hash: ::subxt::utils::H256,
+ #[codec(compact)]
+ pub tip_value: ::core::primitive::u128,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct CloseTip {
+ pub hash: ::subxt::utils::H256,
+ }
+ #[derive(
+ :: subxt :: ext :: codec :: Decode,
+ :: subxt :: ext :: codec :: Encode,
+ Debug,
+ )]
+ pub struct SlashTip {
+ pub hash: ::subxt::utils::H256,
+ }
+ pub struct TransactionApi;
+ impl TransactionApi {
+ #[doc = "Report something `reason` that deserves a tip and claim any eventual the finder's fee."]
+ #[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`."]
+ #[doc = ""]
+ #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"]
+ #[doc = " a UTF-8-encoded URL."]
+ #[doc = "- `who`: The account which should be credited for the tip."]
+ #[doc = ""]
+ #[doc = "Emits `NewTip` if successful."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: `O(R)` where `R` length of `reason`."]
+ #[doc = " - encoding and hashing of 'reason'"]
+ #[doc = "- DbReads: `Reasons`, `Tips`"]
+ #[doc = "- DbWrites: `Reasons`, `Tips`"]
+ #[doc = "# "]
+ pub fn report_awesome(
+ &self,
+ reason: ::std::vec::Vec<::core::primitive::u8>,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Tips",
+ "report_awesome",
+ ReportAwesome { reason, who },
+ [
+ 234u8, 199u8, 253u8, 109u8, 105u8, 252u8, 249u8, 138u8,
+ 197u8, 187u8, 226u8, 67u8, 195u8, 51u8, 197u8, 85u8, 110u8,
+ 173u8, 85u8, 176u8, 27u8, 147u8, 221u8, 85u8, 177u8, 55u8,
+ 2u8, 218u8, 4u8, 115u8, 67u8, 121u8,
+ ],
+ )
+ }
+ #[doc = "Retract a prior tip-report from `report_awesome`, and cancel the process of tipping."]
+ #[doc = ""]
+ #[doc = "If successful, the original deposit will be unreserved."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and the tip identified by `hash`"]
+ #[doc = "must have been reported by the signing account through `report_awesome` (and not"]
+ #[doc = "through `tip_new`)."]
+ #[doc = ""]
+ #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"]
+ #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."]
+ #[doc = ""]
+ #[doc = "Emits `TipRetracted` if successful."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: `O(1)`"]
+ #[doc = " - Depends on the length of `T::Hash` which is fixed."]
+ #[doc = "- DbReads: `Tips`, `origin account`"]
+ #[doc = "- DbWrites: `Reasons`, `Tips`, `origin account`"]
+ #[doc = "# "]
+ pub fn retract_tip(
+ &self,
+ hash: ::subxt::utils::H256,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Tips",
+ "retract_tip",
+ RetractTip { hash },
+ [
+ 137u8, 42u8, 229u8, 188u8, 157u8, 195u8, 184u8, 176u8, 64u8,
+ 142u8, 67u8, 175u8, 185u8, 207u8, 214u8, 71u8, 165u8, 29u8,
+ 137u8, 227u8, 132u8, 195u8, 255u8, 66u8, 186u8, 57u8, 34u8,
+ 184u8, 187u8, 65u8, 129u8, 131u8,
+ ],
+ )
+ }
+ #[doc = "Give a tip for something new; no finder's fee will be taken."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"]
+ #[doc = "member of the `Tippers` set."]
+ #[doc = ""]
+ #[doc = "- `reason`: The reason for, or the thing that deserves, the tip; generally this will be"]
+ #[doc = " a UTF-8-encoded URL."]
+ #[doc = "- `who`: The account which should be credited for the tip."]
+ #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"]
+ #[doc = " value of active tippers will be given to the `who`."]
+ #[doc = ""]
+ #[doc = "Emits `NewTip` if successful."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers."]
+ #[doc = " - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by"]
+ #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of"]
+ #[doc = " `T::Tippers`."]
+ #[doc = " - `O(R)`: hashing and encoding of reason of length `R`"]
+ #[doc = "- DbReads: `Tippers`, `Reasons`"]
+ #[doc = "- DbWrites: `Reasons`, `Tips`"]
+ #[doc = "# "]
+ pub fn tip_new(
+ &self,
+ reason: ::std::vec::Vec<::core::primitive::u8>,
+ who: ::subxt::utils::MultiAddress<
+ ::subxt::utils::AccountId32,
+ ::core::primitive::u32,
+ >,
+ tip_value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Tips",
+ "tip_new",
+ TipNew {
+ reason,
+ who,
+ tip_value,
+ },
+ [
+ 166u8, 19u8, 234u8, 170u8, 180u8, 74u8, 235u8, 156u8, 58u8,
+ 125u8, 199u8, 215u8, 15u8, 96u8, 240u8, 71u8, 205u8, 61u8,
+ 60u8, 204u8, 12u8, 35u8, 252u8, 233u8, 31u8, 86u8, 204u8,
+ 230u8, 40u8, 247u8, 47u8, 135u8,
+ ],
+ )
+ }
+ #[doc = "Declare a tip value for an already-open tip."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_ and the signing account must be a"]
+ #[doc = "member of the `Tippers` set."]
+ #[doc = ""]
+ #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"]
+ #[doc = " as the hash of the tuple of the hash of the original tip `reason` and the beneficiary"]
+ #[doc = " account ID."]
+ #[doc = "- `tip_value`: The amount of tip that the sender would like to give. The median tip"]
+ #[doc = " value of active tippers will be given to the `who`."]
+ #[doc = ""]
+ #[doc = "Emits `TipClosing` if the threshold of tippers has been reached and the countdown period"]
+ #[doc = "has started."]
+ #[doc = ""]
+ #[doc = "# "]
+ #[doc = "- Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length"]
+ #[doc = " `T`, insert tip and check closing, `T` is charged as upper bound given by"]
+ #[doc = " `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`."]
+ #[doc = ""]
+ #[doc = " Actually weight could be lower as it depends on how many tips are in `OpenTip` but it"]
+ #[doc = " is weighted as if almost full i.e of length `T-1`."]
+ #[doc = "- DbReads: `Tippers`, `Tips`"]
+ #[doc = "- DbWrites: `Tips`"]
+ #[doc = "# "]
+ pub fn tip(
+ &self,
+ hash: ::subxt::utils::H256,
+ tip_value: ::core::primitive::u128,
+ ) -> ::subxt::tx::StaticTxPayload {
+ ::subxt::tx::StaticTxPayload::new(
+ "Tips",
+ "tip",
+ Tip { hash, tip_value },
+ [
+ 133u8, 52u8, 131u8, 14u8, 71u8, 232u8, 254u8, 31u8, 33u8,
+ 206u8, 50u8, 76u8, 56u8, 167u8, 228u8, 202u8, 195u8, 0u8,
+ 164u8, 107u8, 170u8, 98u8, 192u8, 37u8, 209u8, 199u8, 130u8,
+ 15u8, 168u8, 63u8, 181u8, 134u8,
+ ],
+ )
+ }
+ #[doc = "Close and payout a tip."]
+ #[doc = ""]
+ #[doc = "The dispatch origin for this call must be _Signed_."]
+ #[doc = ""]
+ #[doc = "The tip identified by `hash` must have finished its countdown period."]
+ #[doc = ""]
+ #[doc = "- `hash`: The identity of the open tip for which a tip value is declared. This is formed"]
+ #[doc = " as the hash of the tuple of the original tip `reason` and the beneficiary account ID."]
+ #[doc = ""]
+ #[doc = "#