From 062449d8cea744b829675f9f39493180134bfe7b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 31 Oct 2023 09:28:51 +0100 Subject: [PATCH] Add Rococo<>Westend bridge support/relay (#2647) * Added Rococo<>Westend primitives * Latest fashion * WIP * Temporary hack for AssetHubWestend to Millau * typo * tool/runtime-codegen tweaks * Rococo<>Westend relay part * zepter * Unify `Parachain` vs `Parachains` --- Cargo.lock | 75 +- Cargo.toml | 5 + bin/millau/runtime/src/lib.rs | 52 +- modules/beefy/Cargo.toml | 2 +- modules/xcm-bridge-hub-router/src/lib.rs | 2 +- primitives/beefy/Cargo.toml | 2 +- primitives/chain-asset-hub-rococo/Cargo.toml | 2 +- primitives/chain-asset-hub-rococo/src/lib.rs | 7 +- primitives/chain-asset-hub-westend/Cargo.toml | 26 + primitives/chain-asset-hub-westend/src/lib.rs | 52 + primitives/chain-asset-hub-wococo/Cargo.toml | 2 +- primitives/chain-asset-hub-wococo/src/lib.rs | 4 +- primitives/chain-bridge-hub-rococo/src/lib.rs | 5 +- .../chain-bridge-hub-westend/Cargo.toml | 34 + .../chain-bridge-hub-westend/src/lib.rs | 75 + primitives/chain-bridge-hub-wococo/src/lib.rs | 2 +- primitives/chain-rococo/Cargo.toml | 2 +- primitives/chain-westend/src/lib.rs | 50 +- primitives/runtime/src/lib.rs | 3 + relays/bin-substrate/Cargo.toml | 1 + relays/bin-substrate/src/bridges/mod.rs | 1 + ...b_rococo_messages_to_bridge_hub_westend.rs | 64 + ...b_westend_messages_to_bridge_hub_rococo.rs | 64 + .../src/bridges/rococo_westend/mod.rs | 24 + .../rococo_headers_to_bridge_hub_westend.rs | 96 + ...rococo_parachains_to_bridge_hub_westend.rs | 75 + .../westend_headers_to_bridge_hub_rococo.rs | 96 + ...westend_parachains_to_bridge_hub_rococo.rs | 75 + .../rococo_parachains_to_bridge_hub_wococo.rs | 2 +- .../wococo_parachains_to_bridge_hub_rococo.rs | 2 +- .../westend_parachains_to_millau.rs | 37 +- relays/bin-substrate/src/chains/millau.rs | 8 + relays/bin-substrate/src/chains/westend.rs | 8 +- relays/bin-substrate/src/cli/bridge.rs | 2 + relays/bin-substrate/src/cli/init_bridge.rs | 36 + .../src/cli/relay_headers_and_messages/mod.rs | 49 + .../bin-substrate/src/cli/relay_messages.rs | 10 + .../bin-substrate/src/cli/relay_parachains.rs | 12 + .../src/codegen_runtime.rs | 32 +- relays/client-bridge-hub-westend/Cargo.toml | 34 + relays/client-bridge-hub-westend/src/lib.rs | 162 + .../src/runtime_wrapper.rs | 116 + relays/client-bridge-hub-wococo/Cargo.toml | 1 - relays/client-rococo/src/lib.rs | 2 +- relays/client-westend/Cargo.toml | 12 +- relays/client-westend/src/codegen_runtime.rs | 6945 +++++++++++++++++ relays/client-westend/src/lib.rs | 86 +- relays/client-wococo/src/lib.rs | 2 +- scripts/regenerate_runtimes.sh | 11 +- scripts/verify-pallets-build.sh | 1 - tools/runtime-codegen/Cargo.lock | 65 +- tools/runtime-codegen/Cargo.toml | 5 +- tools/runtime-codegen/README.md | 2 +- 53 files changed, 8400 insertions(+), 140 deletions(-) create mode 100644 primitives/chain-asset-hub-westend/Cargo.toml create mode 100644 primitives/chain-asset-hub-westend/src/lib.rs create mode 100644 primitives/chain-bridge-hub-westend/Cargo.toml create mode 100644 primitives/chain-bridge-hub-westend/src/lib.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/mod.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs create mode 100644 relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs create mode 100644 relays/client-bridge-hub-westend/Cargo.toml create mode 100644 relays/client-bridge-hub-westend/src/lib.rs create mode 100644 relays/client-bridge-hub-westend/src/runtime_wrapper.rs create mode 100644 relays/client-westend/src/codegen_runtime.rs diff --git a/Cargo.lock b/Cargo.lock index a47356e4a71f2..a4899dd3f7f31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1156,6 +1156,36 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "bp-asset-hub-rococo" +version = "0.1.0" +dependencies = [ + "bp-xcm-bridge-hub-router 0.1.0", + "frame-support", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "bp-asset-hub-westend" +version = "0.1.0" +dependencies = [ + "bp-xcm-bridge-hub-router 0.1.0", + "frame-support", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "bp-asset-hub-wococo" +version = "0.1.0" +dependencies = [ + "bp-xcm-bridge-hub-router 0.1.0", + "frame-support", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "bp-beefy" version = "0.1.0" @@ -1226,6 +1256,19 @@ dependencies = [ "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", ] +[[package]] +name = "bp-bridge-hub-westend" +version = "0.1.0" +dependencies = [ + "bp-bridge-hub-cumulus", + "bp-messages", + "bp-runtime", + "frame-support", + "sp-api", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", +] + [[package]] name = "bp-bridge-hub-wococo" version = "0.1.0" @@ -10645,6 +10688,29 @@ dependencies = [ "subxt", ] +[[package]] +name = "relay-bridge-hub-westend-client" +version = "0.1.0" +dependencies = [ + "bp-bridge-hub-rococo", + "bp-bridge-hub-westend", + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-polkadot-core", + "bp-rococo", + "bp-runtime", + "bridge-runtime-common", + "parity-scale-codec", + "relay-substrate-client", + "scale-info", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "sp-weights", + "subxt", +] + [[package]] name = "relay-bridge-hub-wococo-client" version = "0.1.0" @@ -10655,7 +10721,6 @@ dependencies = [ "bp-messages", "bp-parachains", "bp-polkadot-core", - "bp-rococo", "bp-runtime", "bridge-runtime-common", "parity-scale-codec", @@ -10877,12 +10942,19 @@ dependencies = [ name = "relay-westend-client" version = "0.1.0" dependencies = [ + "bp-polkadot-core", "bp-runtime", "bp-westend", + "parity-scale-codec", "relay-substrate-client", "relay-utils", + "scale-info", + "sp-consensus-grandpa", "sp-core", + "sp-runtime", "sp-session", + "sp-weights", + "subxt", ] [[package]] @@ -14632,6 +14704,7 @@ dependencies = [ "relay-bridge-hub-kusama-client", "relay-bridge-hub-polkadot-client", "relay-bridge-hub-rococo-client", + "relay-bridge-hub-westend-client", "relay-bridge-hub-wococo-client", "relay-kusama-client", "relay-millau-client", diff --git a/Cargo.toml b/Cargo.toml index e1af099859cf9..e73b387a460b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,10 +26,14 @@ members = [ "primitives/beefy", "primitives/chain-asset-hub-kusama", "primitives/chain-asset-hub-polkadot", + "primitives/chain-asset-hub-rococo", + "primitives/chain-asset-hub-westend", + "primitives/chain-asset-hub-wococo", "primitives/chain-bridge-hub-cumulus", "primitives/chain-bridge-hub-kusama", "primitives/chain-bridge-hub-polkadot", "primitives/chain-bridge-hub-rococo", + "primitives/chain-bridge-hub-westend", "primitives/chain-bridge-hub-wococo", "primitives/chain-kusama", "primitives/chain-millau", @@ -52,6 +56,7 @@ members = [ "relays/client-bridge-hub-kusama", "relays/client-bridge-hub-polkadot", "relays/client-bridge-hub-rococo", + "relays/client-bridge-hub-westend", "relays/client-bridge-hub-wococo", "relays/client-kusama", "relays/client-millau", diff --git a/bin/millau/runtime/src/lib.rs b/bin/millau/runtime/src/lib.rs index 27f00c801bc4d..a349551a873c0 100644 --- a/bin/millau/runtime/src/lib.rs +++ b/bin/millau/runtime/src/lib.rs @@ -568,7 +568,7 @@ impl pallet_bridge_parachains::Config for Runtime type BridgesGrandpaPalletInstance = WestendGrandpaInstance; type ParasPalletName = WestendParasPalletName; type ParaStoredHeaderDataBuilder = - SingleParaStoredHeaderDataBuilder; + SingleParaStoredHeaderDataBuilder; type HeadsToKeep = ConstU32<1024>; type MaxParaHeadDataSize = MaxWestendParaHeadDataSize; } @@ -974,12 +974,12 @@ impl_runtime_apis! { } } - impl bp_westend::AssetHubWestendFinalityApi for Runtime { + impl bp_bridged_chain::AssetHubWestendFinalityApi for Runtime { fn best_finalized() -> Option> { pallet_bridge_parachains::Pallet::< Runtime, WithWestendParachainsInstance, - >::best_parachain_head_id::().unwrap_or(None) + >::best_parachain_head_id::().unwrap_or(None) } } @@ -1252,3 +1252,49 @@ mod tests { assert!(core::mem::size_of::() <= MAX_CALL_SIZE); } } + +/// TODO: Note: I know this does not belong here, but I don't want to add it to the +/// `chain-asset-hub-westend` or `chain-westend`, because we wont use it for production and I don't +/// want to bring this to the bridges subtree now. Anyway, we plan to retire millau/rialto, so this +/// hack will disappear with that. +pub mod bp_bridged_chain { + use bp_messages::Weight; + pub use bp_polkadot_core::{ + AccountId, AccountInfoStorageMapKeyProvider, AccountPublic, Balance, BlockNumber, Hash, + Hasher, Hashing, Header, Nonce, Perbill, Signature, SignedBlock, UncheckedExtrinsic, + EXTRA_STORAGE_PROOF_SIZE, TX_EXTRA_BYTES, + }; + use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, Parachain}; + + /// `AssetHubWestend` parachain definition + #[derive(Debug, Clone, Copy)] + pub struct AssetHubWestend; + + // AssetHubWestend seems to use the same configuration as all Polkadot-like chains, so we'll use + // Westend primitives here. + impl Chain for AssetHubWestend { + type BlockNumber = BlockNumber; + type Hash = Hash; + type Hasher = Hasher; + type Header = Header; + + type AccountId = AccountId; + type Balance = Balance; + type Nonce = Nonce; + type Signature = Signature; + + fn max_extrinsic_size() -> u32 { + bp_westend::Westend::max_extrinsic_size() + } + + fn max_extrinsic_weight() -> Weight { + bp_westend::Westend::max_extrinsic_weight() + } + } + + impl Parachain for AssetHubWestend { + const PARACHAIN_ID: u32 = 1000; + } + + decl_bridge_finality_runtime_apis!(AssetHubWestend); +} diff --git a/modules/beefy/Cargo.toml b/modules/beefy/Cargo.toml index 97fb6c7237e48..5d699019e63ec 100644 --- a/modules/beefy/Cargo.toml +++ b/modules/beefy/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } serde = { version = "1.0", optional = true } diff --git a/modules/xcm-bridge-hub-router/src/lib.rs b/modules/xcm-bridge-hub-router/src/lib.rs index 5cf94fc83fd9d..cf51ef82412fb 100644 --- a/modules/xcm-bridge-hub-router/src/lib.rs +++ b/modules/xcm-bridge-hub-router/src/lib.rs @@ -335,7 +335,7 @@ impl, I: 'static> SendXcm for Pallet { // just use exporter to validate destination and insert instructions to pay message fee // at the sibling/child bridge hub // - // the cost will include both cost of: (1) to-sibling bridg hub delivery (returned by + // the cost will include both cost of: (1) to-sibling bridge hub delivery (returned by // the `Config::ToBridgeHubSender`) and (2) to-bridged bridge hub delivery (returned by // `Self::exporter_for`) ViaBridgeHubExporter::::validate(dest, xcm) diff --git a/primitives/beefy/Cargo.toml b/primitives/beefy/Cargo.toml index 1a2870997379c..09ff1fdb1fbcf 100644 --- a/primitives/beefy/Cargo.toml +++ b/primitives/beefy/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "bit-vec"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "bit-vec"] } scale-info = { version = "2.10.0", default-features = false, features = ["bit-vec", "derive"] } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } diff --git a/primitives/chain-asset-hub-rococo/Cargo.toml b/primitives/chain-asset-hub-rococo/Cargo.toml index d5e4328893dbf..de9cd8b0d8060 100644 --- a/primitives/chain-asset-hub-rococo/Cargo.toml +++ b/primitives/chain-asset-hub-rococo/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate Dependencies frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } diff --git a/primitives/chain-asset-hub-rococo/src/lib.rs b/primitives/chain-asset-hub-rococo/src/lib.rs index f1ea1e9c88c9a..1a08ade2f4f2f 100644 --- a/primitives/chain-asset-hub-rococo/src/lib.rs +++ b/primitives/chain-asset-hub-rococo/src/lib.rs @@ -37,6 +37,9 @@ pub enum Call { /// `ToWococoXcmRouter` bridge pallet. #[codec(index = 43)] ToWococoXcmRouter(XcmBridgeHubRouterCall), + /// `ToWestendXcmRouter` bridge pallet. + #[codec(index = 45)] + ToWestendXcmRouter(XcmBridgeHubRouterCall), } frame_support::parameter_types! { @@ -44,8 +47,8 @@ frame_support::parameter_types! { pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144); /// Base delivery fee to `BridgeHubRococo`. - /// (initially was calculated by test `BridgeHubRococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer`) - pub const BridgeHubRococoBaseFeeInRocs: u128 = 1214739988; + /// (initially was calculated by test `BridgeHubRococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubRococoBaseFeeInRocs: u128 = 1624803349; } /// Identifier of AssetHubRococo in the Rococo relay chain. diff --git a/primitives/chain-asset-hub-westend/Cargo.toml b/primitives/chain-asset-hub-westend/Cargo.toml new file mode 100644 index 0000000000000..5ed968763550c --- /dev/null +++ b/primitives/chain-asset-hub-westend/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "bp-asset-hub-westend" +description = "Primitives of AssetHubWestend parachain runtime." +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } + +# Substrate Dependencies +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } + +# Bridge Dependencies +bp-xcm-bridge-hub-router = { path = "../xcm-bridge-hub-router", default-features = false } + +[features] +default = [ "std" ] +std = [ + "bp-xcm-bridge-hub-router/std", + "codec/std", + "frame-support/std", + "scale-info/std", +] diff --git a/primitives/chain-asset-hub-westend/src/lib.rs b/primitives/chain-asset-hub-westend/src/lib.rs new file mode 100644 index 0000000000000..c943dc320b76a --- /dev/null +++ b/primitives/chain-asset-hub-westend/src/lib.rs @@ -0,0 +1,52 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Module with configuration which reflects AssetHubWestend runtime setup. + +#![cfg_attr(not(feature = "std"), no_std)] + +use codec::{Decode, Encode}; +use scale_info::TypeInfo; + +pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; + +/// `AssetHubWestend` Runtime `Call` enum. +/// +/// The enum represents a subset of possible `Call`s we can send to `AssetHubWestend` chain. +/// Ideally this code would be auto-generated from metadata, because we want to +/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. +/// +/// All entries here (like pretty much in the entire file) must be kept in sync with +/// `AssetHubWestend` `construct_runtime`, so that we maintain SCALE-compatibility. +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum Call { + /// `ToRococoXcmRouter` bridge pallet. + #[codec(index = 34)] + ToRococoXcmRouter(XcmBridgeHubRouterCall), +} + +frame_support::parameter_types! { + /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. + pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144); + + /// Base delivery fee to `BridgeHubWestend`. + /// (initially was calculated by test `BridgeHubWestend::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubWestendBaseFeeInWocs: u128 = 1624803349; +} + +/// Identifier of AssetHubWestend in the Westend relay chain. +pub const ASSET_HUB_WESTEND_PARACHAIN_ID: u32 = 1000; diff --git a/primitives/chain-asset-hub-wococo/Cargo.toml b/primitives/chain-asset-hub-wococo/Cargo.toml index 5120bd2b43140..d56205c3a1257 100644 --- a/primitives/chain-asset-hub-wococo/Cargo.toml +++ b/primitives/chain-asset-hub-wococo/Cargo.toml @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -scale-info = { version = "2.9.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # Substrate Dependencies frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } diff --git a/primitives/chain-asset-hub-wococo/src/lib.rs b/primitives/chain-asset-hub-wococo/src/lib.rs index 5ce66054d64aa..809e56934e96e 100644 --- a/primitives/chain-asset-hub-wococo/src/lib.rs +++ b/primitives/chain-asset-hub-wococo/src/lib.rs @@ -44,8 +44,8 @@ frame_support::parameter_types! { pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144); /// Base delivery fee to `BridgeHubWococo`. - /// (initially was calculated by test `BridgeHubWococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer`) - pub const BridgeHubWococoBaseFeeInWocs: u128 = 1214739988; + /// (initially was calculated by test `BridgeHubWococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) + pub const BridgeHubWococoBaseFeeInWocs: u128 = 1624803349; } /// Identifier of AssetHubWococo in the Wococo relay chain. diff --git a/primitives/chain-bridge-hub-rococo/src/lib.rs b/primitives/chain-bridge-hub-rococo/src/lib.rs index 6da5cd3818fe4..039d681951cd1 100644 --- a/primitives/chain-bridge-hub-rococo/src/lib.rs +++ b/primitives/chain-bridge-hub-rococo/src/lib.rs @@ -75,7 +75,10 @@ pub const WITH_BRIDGE_HUB_ROCOCO_MESSAGES_PALLET_NAME: &str = "BridgeRococoMessa pub const WITH_BRIDGE_HUB_ROCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; /// Pallet index of `BridgeWococoMessages: pallet_bridge_messages::`. -pub const WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX: u8 = 46; +pub const WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX: u8 = 46; + +/// Pallet index of `BridgeWestendMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_ROCOCO_TO_WESTEND_MESSAGES_PALLET_INDEX: u8 = 51; decl_bridge_finality_runtime_apis!(bridge_hub_rococo); decl_bridge_messages_runtime_apis!(bridge_hub_rococo); diff --git a/primitives/chain-bridge-hub-westend/Cargo.toml b/primitives/chain-bridge-hub-westend/Cargo.toml new file mode 100644 index 0000000000000..f425e7dbdbeb8 --- /dev/null +++ b/primitives/chain-bridge-hub-westend/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "bp-bridge-hub-westend" +description = "Primitives of BridgeHubWestend parachain runtime." +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" + +[dependencies] + +# Bridge Dependencies + +bp-bridge-hub-cumulus = { path = "../chain-bridge-hub-cumulus", default-features = false } +bp-runtime = { path = "../../primitives/runtime", default-features = false } +bp-messages = { path = "../../primitives/messages", default-features = false } + +# Substrate Based Dependencies + +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } + +[features] +default = [ "std" ] +std = [ + "bp-bridge-hub-cumulus/std", + "bp-messages/std", + "bp-runtime/std", + "frame-support/std", + "sp-api/std", + "sp-runtime/std", + "sp-std/std", +] diff --git a/primitives/chain-bridge-hub-westend/src/lib.rs b/primitives/chain-bridge-hub-westend/src/lib.rs new file mode 100644 index 0000000000000..a52e328b68753 --- /dev/null +++ b/primitives/chain-bridge-hub-westend/src/lib.rs @@ -0,0 +1,75 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Module with configuration which reflects BridgeHubWestend runtime setup +//! (AccountId, Headers, Hashes...) + +#![cfg_attr(not(feature = "std"), no_std)] + +pub use bp_bridge_hub_cumulus::*; +use bp_messages::*; +use bp_runtime::{ + decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, Parachain, +}; +use frame_support::dispatch::DispatchClass; +use sp_runtime::RuntimeDebug; + +/// BridgeHubWestend parachain. +#[derive(RuntimeDebug)] +pub struct BridgeHubWestend; + +impl Chain for BridgeHubWestend { + type BlockNumber = BlockNumber; + type Hash = Hash; + type Hasher = Hasher; + type Header = Header; + + type AccountId = AccountId; + type Balance = Balance; + type Nonce = Nonce; + type Signature = Signature; + + fn max_extrinsic_size() -> u32 { + *BlockLength::get().max.get(DispatchClass::Normal) + } + + fn max_extrinsic_weight() -> Weight { + BlockWeights::get() + .get(DispatchClass::Normal) + .max_extrinsic + .unwrap_or(Weight::MAX) + } +} + +impl Parachain for BridgeHubWestend { + const PARACHAIN_ID: u32 = BRIDGE_HUB_WESTEND_PARACHAIN_ID; +} + +/// Identifier of BridgeHubWestend in the Westend relay chain. +pub const BRIDGE_HUB_WESTEND_PARACHAIN_ID: u32 = 1002; + +/// Name of the With-BridgeHubWestend messages pallet instance that is deployed at bridged chains. +pub const WITH_BRIDGE_HUB_WESTEND_MESSAGES_PALLET_NAME: &str = "BridgeWestendMessages"; + +/// Name of the With-BridgeHubWestend bridge-relayers pallet instance that is deployed at bridged +/// chains. +pub const WITH_BRIDGE_HUB_WESTEND_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; + +/// Pallet index of `BridgeRococoMessages: pallet_bridge_messages::`. +pub const WITH_BRIDGE_WESTEND_TO_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 44; + +decl_bridge_finality_runtime_apis!(bridge_hub_westend); +decl_bridge_messages_runtime_apis!(bridge_hub_westend); diff --git a/primitives/chain-bridge-hub-wococo/src/lib.rs b/primitives/chain-bridge-hub-wococo/src/lib.rs index 0c7717368042a..750a8f7ecb9dd 100644 --- a/primitives/chain-bridge-hub-wococo/src/lib.rs +++ b/primitives/chain-bridge-hub-wococo/src/lib.rs @@ -69,7 +69,7 @@ pub const WITH_BRIDGE_HUB_WOCOCO_MESSAGES_PALLET_NAME: &str = "BridgeWococoMessa pub const WITH_BRIDGE_HUB_WOCOCO_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; /// Pallet index of `BridgeRococoMessages: pallet_bridge_messages::`. -pub const WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 45; +pub const WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX: u8 = 45; decl_bridge_finality_runtime_apis!(bridge_hub_wococo); decl_bridge_messages_runtime_apis!(bridge_hub_wococo); diff --git a/primitives/chain-rococo/Cargo.toml b/primitives/chain-rococo/Cargo.toml index 49a98747acbf6..29ac59dd3ed20 100644 --- a/primitives/chain-rococo/Cargo.toml +++ b/primitives/chain-rococo/Cargo.toml @@ -16,9 +16,9 @@ bp-runtime = { path = "../runtime", default-features = false } # Substrate Based Dependencies +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } -frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master", default-features = false } [features] default = [ "std" ] diff --git a/primitives/chain-westend/src/lib.rs b/primitives/chain-westend/src/lib.rs index 11182e9aefe97..45c13d600601f 100644 --- a/primitives/chain-westend/src/lib.rs +++ b/primitives/chain-westend/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies (UK) Ltd. // This file is part of Parity Bridges Common. // Parity Bridges Common is free software: you can redistribute it and/or modify @@ -21,9 +21,8 @@ pub use bp_polkadot_core::*; use bp_header_chain::ChainWithGrandpa; -use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, Parachain}; -use frame_support::weights::Weight; -use sp_std::prelude::*; +use bp_runtime::{decl_bridge_finality_runtime_apis, Chain}; +use frame_support::{parameter_types, weights::Weight}; /// Westend Chain pub struct Westend; @@ -57,53 +56,24 @@ impl ChainWithGrandpa for Westend { const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION; } -/// `AssetHubWestend` parachain definition -#[derive(Debug, Clone, Copy)] -pub struct AssetHubWestend; - -// AssetHubWestend seems to use the same configuration as all Polkadot-like chains, so we'll use -// Westend primitives here. -impl Chain for AssetHubWestend { - type BlockNumber = BlockNumber; - type Hash = Hash; - type Hasher = Hasher; - type Header = Header; - - type AccountId = AccountId; - type Balance = Balance; - type Nonce = Nonce; - type Signature = Signature; - - fn max_extrinsic_size() -> u32 { - Westend::max_extrinsic_size() - } - - fn max_extrinsic_weight() -> Weight { - Westend::max_extrinsic_weight() - } +parameter_types! { + pub const SS58Prefix: u8 = 42; } -impl Parachain for AssetHubWestend { - const PARACHAIN_ID: u32 = ASSET_HUB_WESTEND_PARACHAIN_ID; -} +// The SignedExtension used by Westend. +pub use bp_polkadot_core::CommonSignedExtension as SignedExtension; -/// Name of the parachains pallet at the Westend runtime. +/// Name of the parachains pallet in the Rococo runtime. pub const PARAS_PALLET_NAME: &str = "Paras"; /// Name of the With-Westend GRANDPA pallet instance that is deployed at bridged chains. pub const WITH_WESTEND_GRANDPA_PALLET_NAME: &str = "BridgeWestendGrandpa"; -/// Name of the With-Westend parachains bridge pallet instance that is deployed at bridged chains. -pub const WITH_WESTEND_BRIDGE_PARAS_PALLET_NAME: &str = "BridgeWestendParachains"; -/// Maximal SCALE-encoded size of parachains headers that are stored at Westend `Paras` pallet. +/// Maximal size of encoded `bp_parachains::ParaStoredHeaderData` structure among all Westend +/// parachains. /// /// It includes the block number and state root, so it shall be near 40 bytes, but let's have some /// reserve. pub const MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE: u32 = 128; -/// Identifier of `AssetHubWestend` parachain at the Westend relay chain. -pub const ASSET_HUB_WESTEND_PARACHAIN_ID: u32 = 1000; - decl_bridge_finality_runtime_apis!(westend, grandpa); - -decl_bridge_finality_runtime_apis!(AssetHubWestend); diff --git a/primitives/runtime/src/lib.rs b/primitives/runtime/src/lib.rs index 16cd603fe3449..e5277d8db6a84 100644 --- a/primitives/runtime/src/lib.rs +++ b/primitives/runtime/src/lib.rs @@ -97,6 +97,9 @@ pub const BRIDGE_HUB_ROCOCO_CHAIN_ID: ChainId = *b"bhro"; /// BridgeHubWococo chain id. pub const BRIDGE_HUB_WOCOCO_CHAIN_ID: ChainId = *b"bhwo"; +/// BridgeHubWestend chain id. +pub const BRIDGE_HUB_WESTEND_CHAIN_ID: ChainId = *b"bhwd"; + /// BridgeHubKusama chain id. pub const BRIDGE_HUB_KUSAMA_CHAIN_ID: ChainId = *b"bhks"; diff --git a/relays/bin-substrate/Cargo.toml b/relays/bin-substrate/Cargo.toml index 3e822a9bb6ca8..b4e69816e59c4 100644 --- a/relays/bin-substrate/Cargo.toml +++ b/relays/bin-substrate/Cargo.toml @@ -41,6 +41,7 @@ relay-rialto-parachain-client = { path = "../client-rialto-parachain" } relay-bridge-hub-kusama-client = { path = "../client-bridge-hub-kusama" } relay-bridge-hub-polkadot-client = { path = "../client-bridge-hub-polkadot" } relay-bridge-hub-rococo-client = { path = "../client-bridge-hub-rococo" } +relay-bridge-hub-westend-client = { path = "../client-bridge-hub-westend" } relay-bridge-hub-wococo-client = { path = "../client-bridge-hub-wococo" } relay-kusama-client = { path = "../client-kusama" } relay-polkadot-client = { path = "../client-polkadot" } diff --git a/relays/bin-substrate/src/bridges/mod.rs b/relays/bin-substrate/src/bridges/mod.rs index 53fe5e0c192d8..5a6bf72d0c523 100644 --- a/relays/bin-substrate/src/bridges/mod.rs +++ b/relays/bin-substrate/src/bridges/mod.rs @@ -20,5 +20,6 @@ pub mod kusama_polkadot; pub mod polkadot_bulletin; pub mod rialto_millau; pub mod rialto_parachain_millau; +pub mod rococo_westend; pub mod rococo_wococo; pub mod westend_millau; diff --git a/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs new file mode 100644 index 0000000000000..353fa7df32a4e --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_rococo_messages_to_bridge_hub_westend.rs @@ -0,0 +1,64 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! BridgeHubRococo-to-BridgeHubWestend messages sync entrypoint. + +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; +use relay_bridge_hub_rococo_client::BridgeHubRococo; +use relay_bridge_hub_westend_client::BridgeHubWestend; +use substrate_relay_helper::{messages_lane::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; + +pub struct BridgeHubRococoToBridgeHubWestendMessagesCliBridge {} + +impl CliBridgeBase for BridgeHubRococoToBridgeHubWestendMessagesCliBridge { + type Source = BridgeHubRococo; + type Target = BridgeHubWestend; +} + +impl MessagesCliBridge for BridgeHubRococoToBridgeHubWestendMessagesCliBridge { + type MessagesLane = BridgeHubRococoMessagesToBridgeHubWestendMessageLane; +} + +substrate_relay_helper::generate_receive_message_proof_call_builder!( + BridgeHubRococoMessagesToBridgeHubWestendMessageLane, + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesProofCallBuilder, + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoMessages, + relay_bridge_hub_westend_client::runtime::BridgeRococoMessagesCall::receive_messages_proof +); + +substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( + BridgeHubRococoMessagesToBridgeHubWestendMessageLane, + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesDeliveryProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendMessages, + relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_delivery_proof +); + +/// Description of BridgeHubRococo -> BridgeHubWestendWestend messages bridge. +#[derive(Clone, Debug)] +pub struct BridgeHubRococoMessagesToBridgeHubWestendMessageLane; + +impl SubstrateMessageLane for BridgeHubRococoMessagesToBridgeHubWestendMessageLane { + type SourceChain = BridgeHubRococo; + type TargetChain = BridgeHubWestend; + + type ReceiveMessagesProofCallBuilder = + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesProofCallBuilder; + type ReceiveMessagesDeliveryProofCallBuilder = + BridgeHubRococoMessagesToBridgeHubWestendMessageLaneReceiveMessagesDeliveryProofCallBuilder; + + type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; + type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; +} diff --git a/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs new file mode 100644 index 0000000000000..ceea252db4216 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/bridge_hub_westend_messages_to_bridge_hub_rococo.rs @@ -0,0 +1,64 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! BridgeHubWestend-to-BridgeHubRococo messages sync entrypoint. + +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge}; +use relay_bridge_hub_rococo_client::BridgeHubRococo; +use relay_bridge_hub_westend_client::BridgeHubWestend; +use substrate_relay_helper::{messages_lane::SubstrateMessageLane, UtilityPalletBatchCallBuilder}; + +pub struct BridgeHubWestendToBridgeHubRococoMessagesCliBridge {} + +impl CliBridgeBase for BridgeHubWestendToBridgeHubRococoMessagesCliBridge { + type Source = BridgeHubWestend; + type Target = BridgeHubRococo; +} + +impl MessagesCliBridge for BridgeHubWestendToBridgeHubRococoMessagesCliBridge { + type MessagesLane = BridgeHubWestendMessagesToBridgeHubRococoMessageLane; +} + +substrate_relay_helper::generate_receive_message_proof_call_builder!( + BridgeHubWestendMessagesToBridgeHubRococoMessageLane, + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendMessages, + relay_bridge_hub_rococo_client::BridgeMessagesCall::receive_messages_proof +); + +substrate_relay_helper::generate_receive_message_delivery_proof_call_builder!( + BridgeHubWestendMessagesToBridgeHubRococoMessageLane, + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder, + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoMessages, + relay_bridge_hub_westend_client::runtime::BridgeRococoMessagesCall::receive_messages_delivery_proof +); + +/// Description of BridgeHubWestend -> BridgeHubRococo messages bridge. +#[derive(Clone, Debug)] +pub struct BridgeHubWestendMessagesToBridgeHubRococoMessageLane; + +impl SubstrateMessageLane for BridgeHubWestendMessagesToBridgeHubRococoMessageLane { + type SourceChain = BridgeHubWestend; + type TargetChain = BridgeHubRococo; + + type ReceiveMessagesProofCallBuilder = + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesProofCallBuilder; + type ReceiveMessagesDeliveryProofCallBuilder = + BridgeHubWestendMessagesToBridgeHubRococoMessageLaneReceiveMessagesDeliveryProofCallBuilder; + + type SourceBatchCallBuilder = UtilityPalletBatchCallBuilder; + type TargetBatchCallBuilder = UtilityPalletBatchCallBuilder; +} diff --git a/relays/bin-substrate/src/bridges/rococo_westend/mod.rs b/relays/bin-substrate/src/bridges/rococo_westend/mod.rs new file mode 100644 index 0000000000000..965d3e0561f99 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/mod.rs @@ -0,0 +1,24 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Declaration of all bridges between Rococo Bridge Hub and Westend Bridge Hub. + +pub mod bridge_hub_rococo_messages_to_bridge_hub_westend; +pub mod bridge_hub_westend_messages_to_bridge_hub_rococo; +pub mod rococo_headers_to_bridge_hub_westend; +pub mod rococo_parachains_to_bridge_hub_westend; +pub mod westend_headers_to_bridge_hub_rococo; +pub mod westend_parachains_to_bridge_hub_rococo; diff --git a/relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs b/relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs new file mode 100644 index 0000000000000..75f6ff6f25c20 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/rococo_headers_to_bridge_hub_westend.rs @@ -0,0 +1,96 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Rococo-to-Westend bridge hubs headers sync entrypoint. + +use crate::cli::bridge::{ + CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, +}; + +use async_trait::async_trait; +use relay_substrate_client::{AccountKeyPairOf, Client}; +use substrate_relay_helper::{ + equivocation::SubstrateEquivocationDetectionPipeline, + finality::SubstrateFinalitySyncPipeline, + finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, + TransactionParams, +}; + +/// Description of Rococo -> Westend finalized headers bridge. +#[derive(Clone, Debug)] +pub struct RococoFinalityToBridgeHubWestend; + +substrate_relay_helper::generate_submit_finality_proof_call_builder!( + RococoFinalityToBridgeHubWestend, + SubmitFinalityProofCallBuilder, + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoGrandpa, + relay_bridge_hub_westend_client::runtime::BridgeRococoGrandpaCall::submit_finality_proof +); + +substrate_relay_helper::generate_report_equivocation_call_builder!( + RococoFinalityToBridgeHubWestend, + ReportEquivocationCallBuilder, + relay_rococo_client::RuntimeCall::Grandpa, + relay_rococo_client::GrandpaCall::report_equivocation +); + +#[async_trait] +impl SubstrateFinalityPipeline for RococoFinalityToBridgeHubWestend { + type SourceChain = relay_rococo_client::Rococo; + type TargetChain = relay_bridge_hub_westend_client::BridgeHubWestend; + + type FinalityEngine = GrandpaFinalityEngine; +} + +#[async_trait] +impl SubstrateFinalitySyncPipeline for RococoFinalityToBridgeHubWestend { + type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; + + async fn start_relay_guards( + target_client: &Client, + _transaction_params: &TransactionParams>, + enable_version_guard: bool, + ) -> relay_substrate_client::Result<()> { + if enable_version_guard { + relay_substrate_client::guard::abort_on_spec_version_change( + target_client.clone(), + target_client.simple_runtime_version().await?.spec_version, + ); + } + Ok(()) + } +} + +#[async_trait] +impl SubstrateEquivocationDetectionPipeline for RococoFinalityToBridgeHubWestend { + type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; +} + +/// `Rococo` to BridgeHub `Westend` bridge definition. +pub struct RococoToBridgeHubWestendCliBridge {} + +impl CliBridgeBase for RococoToBridgeHubWestendCliBridge { + type Source = relay_rococo_client::Rococo; + type Target = relay_bridge_hub_westend_client::BridgeHubWestend; +} + +impl RelayToRelayHeadersCliBridge for RococoToBridgeHubWestendCliBridge { + type Finality = RococoFinalityToBridgeHubWestend; +} + +impl RelayToRelayEquivocationDetectionCliBridge for RococoToBridgeHubWestendCliBridge { + type Equivocation = RococoFinalityToBridgeHubWestend; +} diff --git a/relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs b/relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs new file mode 100644 index 0000000000000..edd600acc4d5b --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/rococo_parachains_to_bridge_hub_westend.rs @@ -0,0 +1,75 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Westend-to-Rococo parachains sync entrypoint. + +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; +use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; +use relay_substrate_client::{CallOf, HeaderIdOf}; +use substrate_relay_helper::parachains::{ + SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, +}; + +/// BridgeHub-to-BridgeHub parachain sync description. +#[derive(Clone, Debug)] +pub struct BridgeHubRococoToBridgeHubWestend; + +impl SubstrateParachainsPipeline for BridgeHubRococoToBridgeHubWestend { + type SourceParachain = relay_bridge_hub_rococo_client::BridgeHubRococo; + type SourceRelayChain = relay_rococo_client::Rococo; + type TargetChain = relay_bridge_hub_westend_client::BridgeHubWestend; + + type SubmitParachainHeadsCallBuilder = BridgeHubRococoToBridgeHubWestendCallBuilder; +} + +pub struct BridgeHubRococoToBridgeHubWestendCallBuilder; +impl SubmitParachainHeadsCallBuilder + for BridgeHubRococoToBridgeHubWestendCallBuilder +{ + fn build_submit_parachain_heads_call( + at_relay_block: HeaderIdOf, + parachains: Vec<(ParaId, ParaHash)>, + parachain_heads_proof: ParaHeadsProof, + ) -> CallOf { + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoParachains( + relay_bridge_hub_westend_client::runtime::BridgeParachainCall::submit_parachain_heads { + at_relay_block: (at_relay_block.0, at_relay_block.1), + parachains, + parachain_heads_proof, + }, + ) + } +} + +/// `BridgeHubParachain` to `BridgeHubParachain` bridge definition. +pub struct BridgeHubRococoToBridgeHubWestendCliBridge {} + +impl ParachainToRelayHeadersCliBridge for BridgeHubRococoToBridgeHubWestendCliBridge { + type SourceRelay = relay_rococo_client::Rococo; + type ParachainFinality = BridgeHubRococoToBridgeHubWestend; + type RelayFinality = + crate::bridges::rococo_westend::rococo_headers_to_bridge_hub_westend::RococoFinalityToBridgeHubWestend; +} + +impl CliBridgeBase for BridgeHubRococoToBridgeHubWestendCliBridge { + type Source = relay_bridge_hub_rococo_client::BridgeHubRococo; + type Target = relay_bridge_hub_westend_client::BridgeHubWestend; +} + +impl MessagesCliBridge for BridgeHubRococoToBridgeHubWestendCliBridge { + type MessagesLane = + crate::bridges::rococo_westend::bridge_hub_rococo_messages_to_bridge_hub_westend::BridgeHubRococoMessagesToBridgeHubWestendMessageLane; +} diff --git a/relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs new file mode 100644 index 0000000000000..1532e06b95386 --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/westend_headers_to_bridge_hub_rococo.rs @@ -0,0 +1,96 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Westend-to-Rococo bridge hubs headers sync entrypoint. + +use crate::cli::bridge::{ + CliBridgeBase, RelayToRelayEquivocationDetectionCliBridge, RelayToRelayHeadersCliBridge, +}; + +use async_trait::async_trait; +use relay_substrate_client::{AccountKeyPairOf, Client}; +use substrate_relay_helper::{ + equivocation::SubstrateEquivocationDetectionPipeline, + finality::SubstrateFinalitySyncPipeline, + finality_base::{engine::Grandpa as GrandpaFinalityEngine, SubstrateFinalityPipeline}, + TransactionParams, +}; + +/// Description of Westend -> Rococo finalized headers bridge. +#[derive(Clone, Debug)] +pub struct WestendFinalityToBridgeHubRococo; + +substrate_relay_helper::generate_submit_finality_proof_call_builder!( + WestendFinalityToBridgeHubRococo, + SubmitFinalityProofCallBuilder, + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendGrandpa, + relay_bridge_hub_rococo_client::BridgeGrandpaCall::submit_finality_proof +); + +substrate_relay_helper::generate_report_equivocation_call_builder!( + WestendFinalityToBridgeHubRococo, + ReportEquivocationCallBuilder, + relay_westend_client::RuntimeCall::Grandpa, + relay_westend_client::GrandpaCall::report_equivocation +); + +#[async_trait] +impl SubstrateFinalityPipeline for WestendFinalityToBridgeHubRococo { + type SourceChain = relay_westend_client::Westend; + type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; + + type FinalityEngine = GrandpaFinalityEngine; +} + +#[async_trait] +impl SubstrateFinalitySyncPipeline for WestendFinalityToBridgeHubRococo { + type SubmitFinalityProofCallBuilder = SubmitFinalityProofCallBuilder; + + async fn start_relay_guards( + target_client: &Client, + _transaction_params: &TransactionParams>, + enable_version_guard: bool, + ) -> relay_substrate_client::Result<()> { + if enable_version_guard { + relay_substrate_client::guard::abort_on_spec_version_change( + target_client.clone(), + target_client.simple_runtime_version().await?.spec_version, + ); + } + Ok(()) + } +} + +#[async_trait] +impl SubstrateEquivocationDetectionPipeline for WestendFinalityToBridgeHubRococo { + type ReportEquivocationCallBuilder = ReportEquivocationCallBuilder; +} + +/// `Westend` to BridgeHub `Rococo` bridge definition. +pub struct WestendToBridgeHubRococoCliBridge {} + +impl CliBridgeBase for WestendToBridgeHubRococoCliBridge { + type Source = relay_westend_client::Westend; + type Target = relay_bridge_hub_rococo_client::BridgeHubRococo; +} + +impl RelayToRelayHeadersCliBridge for WestendToBridgeHubRococoCliBridge { + type Finality = WestendFinalityToBridgeHubRococo; +} + +impl RelayToRelayEquivocationDetectionCliBridge for WestendToBridgeHubRococoCliBridge { + type Equivocation = WestendFinalityToBridgeHubRococo; +} diff --git a/relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs new file mode 100644 index 0000000000000..dac915dc3ba9e --- /dev/null +++ b/relays/bin-substrate/src/bridges/rococo_westend/westend_parachains_to_bridge_hub_rococo.rs @@ -0,0 +1,75 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Rococo-to-Westend parachains sync entrypoint. + +use crate::cli::bridge::{CliBridgeBase, MessagesCliBridge, ParachainToRelayHeadersCliBridge}; +use bp_polkadot_core::parachains::{ParaHash, ParaHeadsProof, ParaId}; +use relay_substrate_client::{CallOf, HeaderIdOf}; +use substrate_relay_helper::parachains::{ + SubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, +}; + +/// BridgeHub-to-BridgeHub parachain sync description. +#[derive(Clone, Debug)] +pub struct BridgeHubWestendToBridgeHubRococo; + +impl SubstrateParachainsPipeline for BridgeHubWestendToBridgeHubRococo { + type SourceParachain = relay_bridge_hub_westend_client::BridgeHubWestend; + type SourceRelayChain = relay_westend_client::Westend; + type TargetChain = relay_bridge_hub_rococo_client::BridgeHubRococo; + + type SubmitParachainHeadsCallBuilder = BridgeHubWestendToBridgeHubRococoCallBuilder; +} + +pub struct BridgeHubWestendToBridgeHubRococoCallBuilder; +impl SubmitParachainHeadsCallBuilder + for BridgeHubWestendToBridgeHubRococoCallBuilder +{ + fn build_submit_parachain_heads_call( + at_relay_block: HeaderIdOf, + parachains: Vec<(ParaId, ParaHash)>, + parachain_heads_proof: ParaHeadsProof, + ) -> CallOf { + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendParachains( + relay_bridge_hub_rococo_client::BridgeParachainCall::submit_parachain_heads { + at_relay_block: (at_relay_block.0, at_relay_block.1), + parachains, + parachain_heads_proof, + }, + ) + } +} + +/// `BridgeHubParachain` to `BridgeHubParachain` bridge definition. +pub struct BridgeHubWestendToBridgeHubRococoCliBridge {} + +impl ParachainToRelayHeadersCliBridge for BridgeHubWestendToBridgeHubRococoCliBridge { + type SourceRelay = relay_westend_client::Westend; + type ParachainFinality = BridgeHubWestendToBridgeHubRococo; + type RelayFinality = + crate::bridges::rococo_westend::westend_headers_to_bridge_hub_rococo::WestendFinalityToBridgeHubRococo; +} + +impl CliBridgeBase for BridgeHubWestendToBridgeHubRococoCliBridge { + type Source = relay_bridge_hub_westend_client::BridgeHubWestend; + type Target = relay_bridge_hub_rococo_client::BridgeHubRococo; +} + +impl MessagesCliBridge for BridgeHubWestendToBridgeHubRococoCliBridge { + type MessagesLane = + crate::bridges::rococo_westend::bridge_hub_westend_messages_to_bridge_hub_rococo::BridgeHubWestendMessagesToBridgeHubRococoMessageLane; +} diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs index b2704c092b845..b7296e0a38fb4 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_wococo/rococo_parachains_to_bridge_hub_wococo.rs @@ -44,7 +44,7 @@ impl SubmitParachainHeadsCallBuilder parachains: Vec<(ParaId, ParaHash)>, parachain_heads_proof: ParaHeadsProof, ) -> CallOf { - relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoParachain( + relay_bridge_hub_wococo_client::RuntimeCall::BridgeRococoParachains( relay_bridge_hub_wococo_client::BridgeParachainCall::submit_parachain_heads { at_relay_block: (at_relay_block.0, at_relay_block.1), parachains, diff --git a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs b/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs index ca77857833d0b..165f4af11c8fe 100644 --- a/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs +++ b/relays/bin-substrate/src/bridges/rococo_wococo/wococo_parachains_to_bridge_hub_rococo.rs @@ -44,7 +44,7 @@ impl SubmitParachainHeadsCallBuilder parachains: Vec<(ParaId, ParaHash)>, parachain_heads_proof: ParaHeadsProof, ) -> CallOf { - relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoParachain( + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWococoParachains( relay_bridge_hub_rococo_client::BridgeParachainCall::submit_parachain_heads { at_relay_block: (at_relay_block.0, at_relay_block.1), parachains, diff --git a/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs b/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs index a3d5ba08df503..96023dc430a28 100644 --- a/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs +++ b/relays/bin-substrate/src/bridges/westend_millau/westend_parachains_to_millau.rs @@ -18,7 +18,7 @@ use crate::cli::bridge::{CliBridgeBase, ParachainToRelayHeadersCliBridge}; use relay_millau_client::Millau; -use relay_westend_client::{AssetHubWestend, Westend}; +use relay_westend_client::Westend; use substrate_relay_helper::parachains::{ DirectSubmitParachainHeadsCallBuilder, SubstrateParachainsPipeline, }; @@ -28,7 +28,7 @@ use substrate_relay_helper::parachains::{ pub struct WestendParachainsToMillau; impl SubstrateParachainsPipeline for WestendParachainsToMillau { - type SourceParachain = AssetHubWestend; + type SourceParachain = relay_asset_hub_westend_client::AssetHubWestend; type SourceRelayChain = Westend; type TargetChain = Millau; @@ -54,6 +54,37 @@ impl ParachainToRelayHeadersCliBridge for AssetHubWestendToMillauCliBridge { } impl CliBridgeBase for AssetHubWestendToMillauCliBridge { - type Source = AssetHubWestend; + type Source = relay_asset_hub_westend_client::AssetHubWestend; type Target = Millau; } + +/// TODO: Note: I know this does not belong here, but I don't want to add it to the +/// `chain-asset-hub-westend` or `chain-westend`, because we wont use it for production and I don't +/// want to bring this to the bridges subtree now. Anyway, we plan to retire millau/rialto, so this +/// hack will disappear with that. +pub mod relay_asset_hub_westend_client { + use bp_runtime::{ChainId, UnderlyingChainProvider}; + use relay_substrate_client::Chain; + use std::time::Duration; + + /// `AssetHubWestend` parachain definition + #[derive(Debug, Clone, Copy)] + pub struct AssetHubWestend; + + impl UnderlyingChainProvider for AssetHubWestend { + type Chain = millau_runtime::bp_bridged_chain::AssetHubWestend; + } + + // Westmint seems to use the same configuration as all Polkadot-like chains, so we'll use + // Westend primitives here. + impl Chain for AssetHubWestend { + const ID: ChainId = bp_runtime::ASSET_HUB_WESTEND_CHAIN_ID; + const NAME: &'static str = "Westmint"; + const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = + millau_runtime::bp_bridged_chain::BEST_FINALIZED_ASSETHUBWESTEND_HEADER_METHOD; + const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); + + type SignedBlock = bp_polkadot_core::SignedBlock; + type Call = (); + } +} diff --git a/relays/bin-substrate/src/chains/millau.rs b/relays/bin-substrate/src/chains/millau.rs index 4cee26255d397..f60d60386e9ba 100644 --- a/relays/bin-substrate/src/chains/millau.rs +++ b/relays/bin-substrate/src/chains/millau.rs @@ -65,3 +65,11 @@ impl CliChain for Millau { const RUNTIME_VERSION: Option = Some(SimpleRuntimeVersion::from_runtime_version(&millau_runtime::VERSION)); } + +/// TODO: Note: I know this does not belong here, but I don't want to add it to the +/// `chain-asset-hub-westend` or `chain-westend`, because we wont use it for production and I don't +/// want to bring this to the bridges subtree now. Anyway, we plan to retire millau/rialto, so this +/// hack will disappear with that. +impl CliChain for crate::bridges::westend_millau::westend_parachains_to_millau::relay_asset_hub_westend_client::AssetHubWestend { + const RUNTIME_VERSION: Option = None; +} diff --git a/relays/bin-substrate/src/chains/westend.rs b/relays/bin-substrate/src/chains/westend.rs index af404878ceb06..5376fc210e520 100644 --- a/relays/bin-substrate/src/chains/westend.rs +++ b/relays/bin-substrate/src/chains/westend.rs @@ -17,13 +17,15 @@ //! Westend chain specification for CLI. use crate::cli::CliChain; +use relay_bridge_hub_westend_client::BridgeHubWestend; use relay_substrate_client::SimpleRuntimeVersion; -use relay_westend_client::{AssetHubWestend, Westend}; +use relay_westend_client::Westend; impl CliChain for Westend { const RUNTIME_VERSION: Option = None; } -impl CliChain for AssetHubWestend { - const RUNTIME_VERSION: Option = None; +impl CliChain for BridgeHubWestend { + const RUNTIME_VERSION: Option = + Some(SimpleRuntimeVersion { spec_version: 10000, transaction_version: 3 }); } diff --git a/relays/bin-substrate/src/cli/bridge.rs b/relays/bin-substrate/src/cli/bridge.rs index 59015f07f247b..0c1483b348b1a 100644 --- a/relays/bin-substrate/src/cli/bridge.rs +++ b/relays/bin-substrate/src/cli/bridge.rs @@ -35,6 +35,8 @@ pub enum FullBridge { RialtoParachainToMillau, BridgeHubRococoToBridgeHubWococo, BridgeHubWococoToBridgeHubRococo, + BridgeHubRococoToBridgeHubWestend, + BridgeHubWestendToBridgeHubRococo, BridgeHubKusamaToBridgeHubPolkadot, BridgeHubPolkadotToBridgeHubKusama, PolkadotBulletinToBridgeHubPolkadot, diff --git a/relays/bin-substrate/src/cli/init_bridge.rs b/relays/bin-substrate/src/cli/init_bridge.rs index af938102e40d1..415897aeba94c 100644 --- a/relays/bin-substrate/src/cli/init_bridge.rs +++ b/relays/bin-substrate/src/cli/init_bridge.rs @@ -32,6 +32,10 @@ use crate::{ rialto_headers_to_millau::RialtoToMillauCliBridge, }, rialto_parachain_millau::millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, + rococo_westend::{ + rococo_headers_to_bridge_hub_westend::RococoToBridgeHubWestendCliBridge, + westend_headers_to_bridge_hub_rococo::WestendToBridgeHubRococoCliBridge, + }, rococo_wococo::{ rococo_headers_to_bridge_hub_wococo::RococoToBridgeHubWococoCliBridge, wococo_headers_to_bridge_hub_rococo::WococoToBridgeHubRococoCliBridge, @@ -78,6 +82,8 @@ pub enum InitBridgeName { PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, PolkadotBulletinToBridgeHubPolkadot, + RococoToBridgeHubWestend, + WestendToBridgeHubRococo, } #[async_trait] @@ -210,6 +216,32 @@ impl BridgeInitializer for WococoToBridgeHubRococoCliBridge { } } +impl BridgeInitializer for RococoToBridgeHubWestendCliBridge { + type Engine = GrandpaFinalityEngine; + + fn encode_init_bridge( + init_data: >::InitializationData, + ) -> ::Call { + relay_bridge_hub_westend_client::runtime::Call::BridgeRococoGrandpa( + relay_bridge_hub_westend_client::runtime::BridgeRococoGrandpaCall::initialize { + init_data, + }, + ) + } +} + +impl BridgeInitializer for WestendToBridgeHubRococoCliBridge { + type Engine = GrandpaFinalityEngine; + + fn encode_init_bridge( + init_data: >::InitializationData, + ) -> ::Call { + relay_bridge_hub_rococo_client::RuntimeCall::BridgeWestendGrandpa( + relay_bridge_hub_rococo_client::BridgeGrandpaCall::initialize { init_data }, + ) + } +} + impl BridgeInitializer for KusamaToBridgeHubPolkadotCliBridge { type Engine = GrandpaFinalityEngine; @@ -290,6 +322,10 @@ impl InitBridge { PolkadotToPolkadotBulletinCliBridge::init_bridge(self), InitBridgeName::PolkadotBulletinToBridgeHubPolkadot => PolkadotBulletinToBridgeHubPolkadotCliBridge::init_bridge(self), + InitBridgeName::RococoToBridgeHubWestend => + RococoToBridgeHubWestendCliBridge::init_bridge(self), + InitBridgeName::WestendToBridgeHubRococo => + WestendToBridgeHubRococoCliBridge::init_bridge(self), } .await } diff --git a/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs b/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs index 86f6ef9e3472c..5a8c084889d75 100644 --- a/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs +++ b/relays/bin-substrate/src/cli/relay_headers_and_messages/mod.rs @@ -56,6 +56,10 @@ use crate::{ millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, }, + rococo_westend::{ + rococo_parachains_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendCliBridge, + westend_parachains_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoCliBridge, + }, rococo_wococo::{ rococo_parachains_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoCliBridge, wococo_parachains_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoCliBridge, @@ -206,6 +210,8 @@ declare_chain_cli_schema!(Rococo, rococo); declare_chain_cli_schema!(BridgeHubRococo, bridge_hub_rococo); declare_chain_cli_schema!(Wococo, wococo); declare_chain_cli_schema!(BridgeHubWococo, bridge_hub_wococo); +declare_chain_cli_schema!(Westend, westend); +declare_chain_cli_schema!(BridgeHubWestend, bridge_hub_westend); declare_chain_cli_schema!(Kusama, kusama); declare_chain_cli_schema!(BridgeHubKusama, bridge_hub_kusama); declare_chain_cli_schema!(Polkadot, polkadot); @@ -226,6 +232,16 @@ declare_chain_cli_schema!( WococoParachainsToBridgeHubRococo, wococo_parachains_to_bridge_hub_rococo ); +declare_chain_cli_schema!(RococoHeadersToBridgeHubWestend, rococo_headers_to_bridge_hub_westend); +declare_chain_cli_schema!( + RococoParachainsToBridgeHubWestend, + rococo_parachains_to_bridge_hub_westend +); +declare_chain_cli_schema!(WestendHeadersToBridgeHubRococo, westend_headers_to_bridge_hub_rococo); +declare_chain_cli_schema!( + WestendParachainsToBridgeHubRococo, + westend_parachains_to_bridge_hub_rococo +); declare_chain_cli_schema!(KusamaHeadersToBridgeHubPolkadot, kusama_headers_to_bridge_hub_polkadot); declare_chain_cli_schema!( KusamaParachainsToBridgeHubPolkadot, @@ -249,6 +265,7 @@ declare_chain_cli_schema!( declare_relay_to_relay_bridge_schema!(Millau, Rialto); declare_relay_to_parachain_bridge_schema!(Millau, RialtoParachain, Rialto); declare_parachain_to_parachain_bridge_schema!(BridgeHubRococo, Rococo, BridgeHubWococo, Wococo); +declare_parachain_to_parachain_bridge_schema!(BridgeHubRococo, Rococo, BridgeHubWestend, Westend); declare_parachain_to_parachain_bridge_schema!(BridgeHubKusama, Kusama, BridgeHubPolkadot, Polkadot); declare_relay_to_parachain_bridge_schema!(PolkadotBulletin, BridgeHubPolkadot, Polkadot); @@ -495,6 +512,32 @@ impl Full2WayBridge for BridgeHubRococoBridgeHubWococoFull2WayBridge { } } +/// BridgeHubRococo <> BridgeHubWestend complex relay. +pub struct BridgeHubRococoBridgeHubWestendFull2WayBridge { + base: ::Base, +} + +#[async_trait] +impl Full2WayBridge for BridgeHubRococoBridgeHubWestendFull2WayBridge { + type Base = ParachainToParachainBridge; + type Left = relay_bridge_hub_rococo_client::BridgeHubRococo; + type Right = relay_bridge_hub_westend_client::BridgeHubWestend; + type L2R = BridgeHubRococoToBridgeHubWestendCliBridge; + type R2L = BridgeHubWestendToBridgeHubRococoCliBridge; + + fn new(base: Self::Base) -> anyhow::Result { + Ok(Self { base }) + } + + fn base(&self) -> &Self::Base { + &self.base + } + + fn mut_base(&mut self) -> &mut Self::Base { + &mut self.base + } +} + /// BridgeHubKusama <> BridgeHubPolkadot complex relay. pub struct BridgeHubKusamaBridgeHubPolkadotFull2WayBridge { base: ::Base, @@ -560,6 +603,8 @@ pub enum RelayHeadersAndMessages { BridgeHubKusamaBridgeHubPolkadot(BridgeHubKusamaBridgeHubPolkadotHeadersAndMessages), /// `PolkadotBulletin` <> `BridgeHubPolkadot` relay. PolkadotBulletinBridgeHubPolkadot(PolkadotBulletinBridgeHubPolkadotHeadersAndMessages), + /// BridgeHubRococo <> BridgeHubWestend relay. + BridgeHubRococoBridgeHubWestend(BridgeHubRococoBridgeHubWestendHeadersAndMessages), } impl RelayHeadersAndMessages { @@ -576,6 +621,10 @@ impl RelayHeadersAndMessages { BridgeHubRococoBridgeHubWococoFull2WayBridge::new(params.into_bridge().await?)? .run() .await, + RelayHeadersAndMessages::BridgeHubRococoBridgeHubWestend(params) => + BridgeHubRococoBridgeHubWestendFull2WayBridge::new(params.into_bridge().await?)? + .run() + .await, RelayHeadersAndMessages::BridgeHubKusamaBridgeHubPolkadot(params) => BridgeHubKusamaBridgeHubPolkadotFull2WayBridge::new(params.into_bridge().await?)? .run() diff --git a/relays/bin-substrate/src/cli/relay_messages.rs b/relays/bin-substrate/src/cli/relay_messages.rs index b5ba275af6fa0..9880edcda2ca1 100644 --- a/relays/bin-substrate/src/cli/relay_messages.rs +++ b/relays/bin-substrate/src/cli/relay_messages.rs @@ -36,6 +36,10 @@ use crate::bridges::{ millau_headers_to_rialto_parachain::MillauToRialtoParachainCliBridge, rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, }, + rococo_westend::{ + bridge_hub_rococo_messages_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendMessagesCliBridge, + bridge_hub_westend_messages_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoMessagesCliBridge, + }, rococo_wococo::{ bridge_hub_rococo_messages_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoMessagesCliBridge, bridge_hub_wococo_messages_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoMessagesCliBridge, @@ -111,6 +115,8 @@ impl MessagesRelayer for MillauToRialtoParachainCliBridge {} impl MessagesRelayer for RialtoParachainToMillauCliBridge {} impl MessagesRelayer for BridgeHubRococoToBridgeHubWococoMessagesCliBridge {} impl MessagesRelayer for BridgeHubWococoToBridgeHubRococoMessagesCliBridge {} +impl MessagesRelayer for BridgeHubRococoToBridgeHubWestendMessagesCliBridge {} +impl MessagesRelayer for BridgeHubWestendToBridgeHubRococoMessagesCliBridge {} impl MessagesRelayer for BridgeHubKusamaToBridgeHubPolkadotMessagesCliBridge {} impl MessagesRelayer for BridgeHubPolkadotToBridgeHubKusamaMessagesCliBridge {} impl MessagesRelayer for PolkadotBulletinToBridgeHubPolkadotMessagesCliBridge {} @@ -130,6 +136,10 @@ impl RelayMessages { BridgeHubRococoToBridgeHubWococoMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubWococoToBridgeHubRococo => BridgeHubWococoToBridgeHubRococoMessagesCliBridge::relay_messages(self), + FullBridge::BridgeHubRococoToBridgeHubWestend => + BridgeHubRococoToBridgeHubWestendMessagesCliBridge::relay_messages(self), + FullBridge::BridgeHubWestendToBridgeHubRococo => + BridgeHubWestendToBridgeHubRococoMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubKusamaToBridgeHubPolkadot => BridgeHubKusamaToBridgeHubPolkadotMessagesCliBridge::relay_messages(self), FullBridge::BridgeHubPolkadotToBridgeHubKusama => diff --git a/relays/bin-substrate/src/cli/relay_parachains.rs b/relays/bin-substrate/src/cli/relay_parachains.rs index 3dc9daad1aab4..03d3860f3b224 100644 --- a/relays/bin-substrate/src/cli/relay_parachains.rs +++ b/relays/bin-substrate/src/cli/relay_parachains.rs @@ -21,6 +21,10 @@ use crate::bridges::{ }, polkadot_bulletin::polkadot_parachains_to_polkadot_bulletin::PolkadotToPolkadotBulletinCliBridge, rialto_parachain_millau::rialto_parachains_to_millau::RialtoParachainToMillauCliBridge, + rococo_westend::{ + rococo_parachains_to_bridge_hub_westend::BridgeHubRococoToBridgeHubWestendCliBridge, + westend_parachains_to_bridge_hub_rococo::BridgeHubWestendToBridgeHubRococoCliBridge, + }, rococo_wococo::{ rococo_parachains_to_bridge_hub_wococo::BridgeHubRococoToBridgeHubWococoCliBridge, wococo_parachains_to_bridge_hub_rococo::BridgeHubWococoToBridgeHubRococoCliBridge, @@ -73,6 +77,8 @@ pub enum RelayParachainsBridge { KusamaToBridgeHubPolkadot, PolkadotToBridgeHubKusama, PolkadotToPolkadotBulletin, + RococoToBridgeHubWestend, + WestendToBridgeHubRococo, } #[async_trait] @@ -120,6 +126,8 @@ impl ParachainsRelayer for RialtoParachainToMillauCliBridge {} impl ParachainsRelayer for AssetHubWestendToMillauCliBridge {} impl ParachainsRelayer for BridgeHubRococoToBridgeHubWococoCliBridge {} impl ParachainsRelayer for BridgeHubWococoToBridgeHubRococoCliBridge {} +impl ParachainsRelayer for BridgeHubRococoToBridgeHubWestendCliBridge {} +impl ParachainsRelayer for BridgeHubWestendToBridgeHubRococoCliBridge {} impl ParachainsRelayer for BridgeHubKusamaToBridgeHubPolkadotCliBridge {} impl ParachainsRelayer for BridgeHubPolkadotToBridgeHubKusamaCliBridge {} impl ParachainsRelayer for PolkadotToPolkadotBulletinCliBridge {} @@ -136,6 +144,10 @@ impl RelayParachains { BridgeHubRococoToBridgeHubWococoCliBridge::relay_parachains(self), RelayParachainsBridge::WococoToBridgeHubRococo => BridgeHubWococoToBridgeHubRococoCliBridge::relay_parachains(self), + RelayParachainsBridge::RococoToBridgeHubWestend => + BridgeHubRococoToBridgeHubWestendCliBridge::relay_parachains(self), + RelayParachainsBridge::WestendToBridgeHubRococo => + BridgeHubWestendToBridgeHubRococoCliBridge::relay_parachains(self), RelayParachainsBridge::KusamaToBridgeHubPolkadot => BridgeHubKusamaToBridgeHubPolkadotCliBridge::relay_parachains(self), RelayParachainsBridge::PolkadotToBridgeHubKusama => diff --git a/relays/client-bridge-hub-rococo/src/codegen_runtime.rs b/relays/client-bridge-hub-rococo/src/codegen_runtime.rs index 2ad17d8eb7c9f..cf125b8cf5966 100644 --- a/relays/client-bridge-hub-rococo/src/codegen_runtime.rs +++ b/relays/client-bridge-hub-rococo/src/codegen_runtime.rs @@ -264,16 +264,22 @@ pub mod api { Multisig(runtime_types::pallet_multisig::pallet::Call), #[codec(index = 41)] BridgeWococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), - #[codec(index = 42)] - BridgeWococoParachain(runtime_types::pallet_bridge_parachains::pallet::Call), - #[codec(index = 46)] - BridgeWococoMessages(runtime_types::pallet_bridge_messages::pallet::Call), #[codec(index = 43)] BridgeRococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), + #[codec(index = 48)] + BridgeWestendGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), + #[codec(index = 42)] + BridgeWococoParachains(runtime_types::pallet_bridge_parachains::pallet::Call), #[codec(index = 44)] - BridgeRococoParachain(runtime_types::pallet_bridge_parachains::pallet::Call), + BridgeRococoParachains(runtime_types::pallet_bridge_parachains::pallet::Call), + #[codec(index = 49)] + BridgeWestendParachains(runtime_types::pallet_bridge_parachains::pallet::Call), + #[codec(index = 46)] + BridgeWococoMessages(runtime_types::pallet_bridge_messages::pallet::Call), #[codec(index = 45)] BridgeRococoMessages(runtime_types::pallet_bridge_messages::pallet::Call), + #[codec(index = 51)] + BridgeWestendMessages(runtime_types::pallet_bridge_messages::pallet::Call), #[codec(index = 47)] BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Call), } @@ -305,16 +311,22 @@ pub mod api { Multisig(runtime_types::pallet_multisig::pallet::Event), #[codec(index = 41)] BridgeWococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), - #[codec(index = 42)] - BridgeWococoParachain(runtime_types::pallet_bridge_parachains::pallet::Event), - #[codec(index = 46)] - BridgeWococoMessages(runtime_types::pallet_bridge_messages::pallet::Event), #[codec(index = 43)] BridgeRococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), + #[codec(index = 48)] + BridgeWestendGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Event), + #[codec(index = 42)] + BridgeWococoParachains(runtime_types::pallet_bridge_parachains::pallet::Event), #[codec(index = 44)] - BridgeRococoParachain(runtime_types::pallet_bridge_parachains::pallet::Event), + BridgeRococoParachains(runtime_types::pallet_bridge_parachains::pallet::Event), + #[codec(index = 49)] + BridgeWestendParachains(runtime_types::pallet_bridge_parachains::pallet::Event), + #[codec(index = 46)] + BridgeWococoMessages(runtime_types::pallet_bridge_messages::pallet::Event), #[codec(index = 45)] BridgeRococoMessages(runtime_types::pallet_bridge_messages::pallet::Event), + #[codec(index = 51)] + BridgeWestendMessages(runtime_types::pallet_bridge_messages::pallet::Event), #[codec(index = 47)] BridgeRelayers(runtime_types::pallet_bridge_relayers::pallet::Event), } diff --git a/relays/client-bridge-hub-westend/Cargo.toml b/relays/client-bridge-hub-westend/Cargo.toml new file mode 100644 index 0000000000000..a147aaee43917 --- /dev/null +++ b/relays/client-bridge-hub-westend/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "relay-bridge-hub-westend-client" +version = "0.1.0" +authors = ["Parity Technologies "] +edition = "2021" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +subxt = { version = "0.32.1", default-features = false, features = [] } + +# Bridge dependencies + +bp-bridge-hub-rococo = { path = "../../primitives/chain-bridge-hub-rococo" } +bp-bridge-hub-westend = { path = "../../primitives/chain-bridge-hub-westend" } +bp-header-chain = { path = "../../primitives/header-chain" } +bp-messages = { path = "../../primitives/messages" } +bp-parachains = { path = "../../primitives/parachains" } +bp-polkadot-core = { path = "../../primitives/polkadot-core" } +bp-rococo = { path = "../../primitives/chain-rococo" } +bp-runtime = { path = "../../primitives/runtime" } + +bridge-runtime-common = { path = "../../bin/runtime-common" } +relay-substrate-client = { path = "../client-substrate" } + +# Substrate Dependencies + +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } + +[dev-dependencies] +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-bridge-hub-westend/src/lib.rs b/relays/client-bridge-hub-westend/src/lib.rs new file mode 100644 index 0000000000000..addbbe0414786 --- /dev/null +++ b/relays/client-bridge-hub-westend/src/lib.rs @@ -0,0 +1,162 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Types used to connect to the BridgeHub-Westend-Substrate parachain. + +use bp_bridge_hub_westend::AVERAGE_BLOCK_INTERVAL; +use bp_messages::MessageNonce; +use bp_polkadot_core::SuffixedCommonSignedExtensionExt; +use bp_runtime::ChainId; +use codec::Encode; +use relay_substrate_client::{ + Chain, ChainWithBalances, ChainWithMessages, ChainWithTransactions, ChainWithUtilityPallet, + Error as SubstrateError, MockedRuntimeUtilityPallet, SignParam, UnderlyingChainProvider, + UnsignedTransaction, +}; +use sp_core::{storage::StorageKey, Pair}; +use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount}; +use std::time::Duration; + +/// Re-export runtime wrapper +pub mod runtime_wrapper; +pub use runtime_wrapper as runtime; + +/// Westend chain definition +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct BridgeHubWestend; + +impl UnderlyingChainProvider for BridgeHubWestend { + type Chain = bp_bridge_hub_westend::BridgeHubWestend; +} + +impl Chain for BridgeHubWestend { + const ID: ChainId = bp_runtime::BRIDGE_HUB_WESTEND_CHAIN_ID; + const NAME: &'static str = "BridgeHubWestend"; + const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = + bp_bridge_hub_westend::BEST_FINALIZED_BRIDGE_HUB_WESTEND_HEADER_METHOD; + const AVERAGE_BLOCK_INTERVAL: Duration = AVERAGE_BLOCK_INTERVAL; + + type SignedBlock = bp_bridge_hub_westend::SignedBlock; + type Call = runtime::Call; +} + +impl ChainWithBalances for BridgeHubWestend { + fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey { + bp_bridge_hub_westend::AccountInfoStorageMapKeyProvider::final_key(account_id) + } +} + +impl ChainWithUtilityPallet for BridgeHubWestend { + type UtilityPallet = MockedRuntimeUtilityPallet; +} + +impl ChainWithTransactions for BridgeHubWestend { + type AccountKeyPair = sp_core::sr25519::Pair; + type SignedTransaction = runtime::UncheckedExtrinsic; + + fn sign_transaction( + param: SignParam, + unsigned: UnsignedTransaction, + ) -> Result { + let raw_payload = SignedPayload::new( + unsigned.call, + runtime::SignedExtension::from_params( + param.spec_version, + param.transaction_version, + unsigned.era, + param.genesis_hash, + unsigned.nonce, + unsigned.tip, + (((), ()), ((), ())), + ), + )?; + + let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); + let signer: sp_runtime::MultiSigner = param.signer.public().into(); + let (call, extra, _) = raw_payload.deconstruct(); + + Ok(runtime::UncheckedExtrinsic::new_signed( + call, + signer.into_account().into(), + signature.into(), + extra, + )) + } + + fn is_signed(tx: &Self::SignedTransaction) -> bool { + tx.signature.is_some() + } + + fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { + tx.signature + .as_ref() + .map(|(address, _, _)| { + *address == bp_bridge_hub_westend::Address::Id(signer.public().into()) + }) + .unwrap_or(false) + } + + fn parse_transaction(tx: Self::SignedTransaction) -> Option> { + let extra = &tx.signature.as_ref()?.2; + Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) + } +} + +impl ChainWithMessages for BridgeHubWestend { + const WITH_CHAIN_MESSAGES_PALLET_NAME: &'static str = + bp_bridge_hub_westend::WITH_BRIDGE_HUB_WESTEND_MESSAGES_PALLET_NAME; + const WITH_CHAIN_RELAYERS_PALLET_NAME: Option<&'static str> = + Some(bp_bridge_hub_westend::WITH_BRIDGE_HUB_WESTEND_RELAYERS_PALLET_NAME); + + const TO_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = + bp_bridge_hub_westend::TO_BRIDGE_HUB_WESTEND_MESSAGE_DETAILS_METHOD; + const FROM_CHAIN_MESSAGE_DETAILS_METHOD: &'static str = + bp_bridge_hub_westend::FROM_BRIDGE_HUB_WESTEND_MESSAGE_DETAILS_METHOD; + + const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = + bp_bridge_hub_westend::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = + bp_bridge_hub_westend::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; +} + +#[cfg(test)] +mod tests { + use super::*; + use relay_substrate_client::TransactionEra; + + #[test] + fn parse_transaction_works() { + let unsigned = UnsignedTransaction { + call: runtime::Call::System(runtime::SystemCall::remark(b"Hello world!".to_vec())) + .into(), + nonce: 777, + tip: 888, + era: TransactionEra::immortal(), + }; + let signed_transaction = BridgeHubWestend::sign_transaction( + SignParam { + spec_version: 42, + transaction_version: 50000, + genesis_hash: [42u8; 32].into(), + signer: sp_core::sr25519::Pair::from_seed_slice(&[1u8; 32]).unwrap(), + }, + unsigned.clone(), + ) + .unwrap(); + let parsed_transaction = BridgeHubWestend::parse_transaction(signed_transaction).unwrap(); + assert_eq!(parsed_transaction, unsigned); + } +} diff --git a/relays/client-bridge-hub-westend/src/runtime_wrapper.rs b/relays/client-bridge-hub-westend/src/runtime_wrapper.rs new file mode 100644 index 0000000000000..b4ff36cde7a30 --- /dev/null +++ b/relays/client-bridge-hub-westend/src/runtime_wrapper.rs @@ -0,0 +1,116 @@ +// Copyright 2019-2021 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Types that are specific to the BridgeHubWestend runtime. +// TODO: regenerate me using `runtime-codegen` tool? (https://github.com/paritytech/parity-bridges-common/issues/1945) + +use codec::{Decode, Encode}; +use scale_info::TypeInfo; + +pub use bp_bridge_hub_westend::SignedExtension; +pub use bp_header_chain::BridgeGrandpaCallOf; +pub use bp_parachains::BridgeParachainCall; +pub use bridge_runtime_common::messages::BridgeMessagesCallOf; +pub use relay_substrate_client::calls::{SystemCall, UtilityCall}; + +/// Unchecked BridgeHubWestend extrinsic. +pub type UncheckedExtrinsic = bp_bridge_hub_westend::UncheckedExtrinsic; + +/// The indirect pallet call used to sync `Rococo` GRANDPA finality to `BHWestend`. +pub type BridgeRococoGrandpaCall = BridgeGrandpaCallOf; +/// The indirect pallet call used to sync `BridgeHubRococo` messages to `BridgeHubWestend`. +pub type BridgeRococoMessagesCall = BridgeMessagesCallOf; + +/// `BridgeHubWestend` Runtime `Call` enum. +/// +/// The enum represents a subset of possible `Call`s we can send to `BridgeHubWestend` chain. +/// Ideally this code would be auto-generated from metadata, because we want to +/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s. +/// +/// All entries here (like pretty much in the entire file) must be kept in sync with +/// `BridgeHubWestend` `construct_runtime`, so that we maintain SCALE-compatibility. +#[allow(clippy::large_enum_variant)] +#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] +pub enum Call { + #[cfg(test)] + #[codec(index = 0)] + System(SystemCall), + /// Utility pallet. + #[codec(index = 40)] + Utility(UtilityCall), + + /// Rococo grandpa bridge pallet. + #[codec(index = 42)] + BridgeRococoGrandpa(BridgeRococoGrandpaCall), + /// Rococo parachains bridge pallet. + #[codec(index = 43)] + BridgeRococoParachains(BridgeParachainCall), + /// Rococo messages bridge pallet. + #[codec(index = 44)] + BridgeRococoMessages(BridgeRococoMessagesCall), +} + +impl From> for Call { + fn from(call: UtilityCall) -> Call { + Call::Utility(call) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use bp_runtime::BasicOperatingMode; + use sp_consensus_grandpa::AuthorityList; + use sp_core::hexdisplay::HexDisplay; + use sp_runtime::traits::Header; + use std::str::FromStr; + + pub type RelayBlockNumber = bp_polkadot_core::BlockNumber; + pub type RelayBlockHasher = bp_polkadot_core::Hasher; + pub type RelayBlockHeader = sp_runtime::generic::Header; + + #[test] + fn encode_decode_calls() { + let header = RelayBlockHeader::new( + 75, + bp_polkadot_core::Hash::from_str( + "0xd2c0afaab32de0cb8f7f0d89217e37c5ea302c1ffb5a7a83e10d20f12c32874d", + ) + .expect("invalid value"), + bp_polkadot_core::Hash::from_str( + "0x92b965f0656a4e0e5fc0167da2d4b5ee72b3be2c1583c4c1e5236c8c12aa141b", + ) + .expect("invalid value"), + bp_polkadot_core::Hash::from_str( + "0xae4a25acf250d72ed02c149ecc7dd3c9ee976d41a2888fc551de8064521dc01d", + ) + .expect("invalid value"), + Default::default(), + ); + let init_data = bp_header_chain::InitializationData { + header: Box::new(header), + authority_list: AuthorityList::default(), + set_id: 6, + operating_mode: BasicOperatingMode::Normal, + }; + let call = BridgeRococoGrandpaCall::initialize { init_data }; + let tx = Call::BridgeRococoGrandpa(call); + + // encode call as hex string + let hex_encoded_call = format!("0x{:?}", HexDisplay::from(&Encode::encode(&tx))); + assert_eq!(hex_encoded_call, "0x2a01ae4a25acf250d72ed02c149ecc7dd3c9ee976d41a2888fc551de8064521dc01d2d0192b965f0656a4e0e5fc0167da2d4b5ee72b3be2c1583c4c1e5236c8c12aa141bd2c0afaab32de0cb8f7f0d89217e37c5ea302c1ffb5a7a83e10d20f12c32874d0000060000000000000000"); + } +} diff --git a/relays/client-bridge-hub-wococo/Cargo.toml b/relays/client-bridge-hub-wococo/Cargo.toml index b60e8c0e87216..d90af65d3a0bb 100644 --- a/relays/client-bridge-hub-wococo/Cargo.toml +++ b/relays/client-bridge-hub-wococo/Cargo.toml @@ -18,7 +18,6 @@ bp-header-chain = { path = "../../primitives/header-chain" } bp-messages = { path = "../../primitives/messages" } bp-parachains = { path = "../../primitives/parachains" } bp-polkadot-core = { path = "../../primitives/polkadot-core" } -bp-rococo = { path = "../../primitives/chain-rococo" } bp-runtime = { path = "../../primitives/runtime" } bridge-runtime-common = { path = "../../bin/runtime-common" } diff --git a/relays/client-rococo/src/lib.rs b/relays/client-rococo/src/lib.rs index 03b5ff5db62de..42e022d1be336 100644 --- a/relays/client-rococo/src/lib.rs +++ b/relays/client-rococo/src/lib.rs @@ -80,7 +80,7 @@ impl ChainWithBalances for Rococo { impl RelayChain for Rococo { const PARAS_PALLET_NAME: &'static str = bp_rococo::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeRococoParachain"; + const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeRococoParachains"; } impl ChainWithTransactions for Rococo { diff --git a/relays/client-westend/Cargo.toml b/relays/client-westend/Cargo.toml index 520cb232b0f6e..0c6083f8f8c83 100644 --- a/relays/client-westend/Cargo.toml +++ b/relays/client-westend/Cargo.toml @@ -6,15 +6,23 @@ edition = "2021" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -relay-substrate-client = { path = "../client-substrate" } -relay-utils = { path = "../utils" } +codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +subxt = { version = "0.32.1", default-features = false, features = ["native"] } # Bridge dependencies +bp-polkadot-core = { path = "../../primitives/polkadot-core" } bp-runtime = { path = "../../primitives/runtime" } bp-westend = { path = "../../primitives/chain-westend" } +relay-substrate-client = { path = "../client-substrate" } +relay-utils = { path = "../utils" } + # Substrate Dependencies +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } +sp-weights = { git = "https://github.com/paritytech/polkadot-sdk", branch = "master" } diff --git a/relays/client-westend/src/codegen_runtime.rs b/relays/client-westend/src/codegen_runtime.rs new file mode 100644 index 0000000000000..9422622e48c50 --- /dev/null +++ b/relays/client-westend/src/codegen_runtime.rs @@ -0,0 +1,6945 @@ +// Copyright 2019-2023 Parity Technologies (UK) Ltd. +// This file is part of Parity Bridges Common. + +// Parity Bridges Common is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity Bridges Common is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity Bridges Common. If not, see . + +//! Autogenerated runtime API +//! THIS FILE WAS AUTOGENERATED USING parity-bridges-common::runtime-codegen +//! EXECUTED COMMAND: target/debug/runtime-codegen --from-node-url wss://westend-rpc.polkadot.io:443 + +#[allow(dead_code, unused_imports, non_camel_case_types)] +#[allow(clippy::all)] +pub mod api { + use super::api as root_mod; + pub mod runtime_types { + use super::runtime_types; + pub mod bounded_collections { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::utils::KeyedVec<_0, _1>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } + pub mod finality_grandpa { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Equivocation<_0, _1, _2> { + pub round_number: ::core::primitive::u64, + pub identity: _0, + pub first: (_1, _2), + pub second: (_1, _2), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod dispatch { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DispatchInfo { + pub weight: ::sp_weights::Weight, + pub class: runtime_types::frame_support::dispatch::DispatchClass, + pub pays_fee: runtime_types::frame_support::dispatch::Pays, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } + pub mod traits { + use super::runtime_types; + pub mod messages { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ProcessMessageError { + #[codec(index = 0)] + BadFormat, + #[codec(index = 1)] + Corrupt, + #[codec(index = 2)] + Unsupported, + #[codec(index = 3)] + Overweight(::sp_weights::Weight), + #[codec(index = 4)] + Yield, + } + } + pub mod misc { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct WrapperOpaque<_0>( + #[codec(compact)] pub ::core::primitive::u32, + pub _0, + ); + } + pub mod preimages { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Bounded<_0> { + #[codec(index = 0)] + Legacy { + hash: ::subxt::utils::H256, + }, + #[codec(index = 1)] + Inline( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Lookup { + hash: ::subxt::utils::H256, + len: ::core::primitive::u32, + }, + __Ignore(::core::marker::PhantomData<_0>), + } + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); + } + pub mod frame_system { + use super::runtime_types; + pub mod extensions { + use super::runtime_types; + pub mod check_genesis { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckGenesis; + } + pub mod check_mortality { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckMortality(pub ::sp_runtime::generic::Era); + } + pub mod check_non_zero_sender { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckNonZeroSender; + } + pub mod check_nonce { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckSpecVersion; + } + pub mod check_tx_version { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CheckWeight; + } + } + pub mod limits { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BlockLength { + pub max: runtime_types::frame_support::dispatch::PerDispatchClass< + ::core::primitive::u32, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BlockWeights { + pub base_block: ::sp_weights::Weight, + pub max_block: ::sp_weights::Weight, + pub per_class: runtime_types::frame_support::dispatch::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct WeightsPerClass { + pub base_extrinsic: ::sp_weights::Weight, + pub max_extrinsic: ::core::option::Option<::sp_weights::Weight>, + pub max_total: ::core::option::Option<::sp_weights::Weight>, + pub reserved: ::core::option::Option<::sp_weights::Weight>, + } + } + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + remark { remark: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 1)] + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 2)] + set_code { code: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 3)] + set_code_without_checks { code: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 4)] + set_storage { + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 5)] + kill_storage { keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>> }, + #[codec(index = 6)] + kill_prefix { + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 7)] + remark_with_event { remark: ::std::vec::Vec<::core::primitive::u8> }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidSpecName, + #[codec(index = 1)] + SpecVersionNeedsToIncrease, + #[codec(index = 2)] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + NonDefaultComposite, + #[codec(index = 4)] + NonZeroRefCount, + #[codec(index = 5)] + CallFiltered, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + ExtrinsicSuccess { + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 1)] + ExtrinsicFailed { + dispatch_error: runtime_types::sp_runtime::DispatchError, + dispatch_info: runtime_types::frame_support::dispatch::DispatchInfo, + }, + #[codec(index = 2)] + CodeUpdated, + #[codec(index = 3)] + NewAccount { account: ::sp_core::crypto::AccountId32 }, + #[codec(index = 4)] + KilledAccount { account: ::sp_core::crypto::AccountId32 }, + #[codec(index = 5)] + Remarked { sender: ::sp_core::crypto::AccountId32, hash: ::subxt::utils::H256 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 1)] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 2)] + plan_config_change { + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidEquivocationProof, + #[codec(index = 1)] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + DuplicateOffenceReport, + #[codec(index = 3)] + InvalidConfiguration, + } + } + } + pub mod pallet_bags_list { + use super::runtime_types; + pub mod list { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Bag { + pub head: ::core::option::Option<::sp_core::crypto::AccountId32>, + pub tail: ::core::option::Option<::sp_core::crypto::AccountId32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ListError { + #[codec(index = 0)] + Duplicate, + #[codec(index = 1)] + NotHeavier, + #[codec(index = 2)] + NotInSameBag, + #[codec(index = 3)] + NodeNotFound, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Node { + pub id: ::sp_core::crypto::AccountId32, + pub prev: ::core::option::Option<::sp_core::crypto::AccountId32>, + pub next: ::core::option::Option<::sp_core::crypto::AccountId32>, + pub bag_upper: ::core::primitive::u64, + pub score: ::core::primitive::u64, + } + } + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + rebag { + dislocated: + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 1)] + put_in_front_of { + lighter: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + List(runtime_types::pallet_bags_list::list::ListError), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Rebagged { + who: ::sp_core::crypto::AccountId32, + from: ::core::primitive::u64, + to: ::core::primitive::u64, + }, + #[codec(index = 1)] + ScoreUpdated { + who: ::sp_core::crypto::AccountId32, + new_score: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_balances { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + transfer_allow_death { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + set_balance_deprecated { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + new_free: ::core::primitive::u128, + #[codec(compact)] + old_reserved: ::core::primitive::u128, + }, + #[codec(index = 2)] + force_transfer { + source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + transfer_keep_alive { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + transfer_all { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + keep_alive: ::core::primitive::bool, + }, + #[codec(index = 5)] + force_unreserve { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + upgrade_accounts { who: ::std::vec::Vec<::sp_core::crypto::AccountId32> }, + #[codec(index = 7)] + transfer { + dest: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 8)] + force_set_balance { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + new_free: ::core::primitive::u128, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + VestingBalance, + #[codec(index = 1)] + LiquidityRestrictions, + #[codec(index = 2)] + InsufficientBalance, + #[codec(index = 3)] + ExistentialDeposit, + #[codec(index = 4)] + Expendability, + #[codec(index = 5)] + ExistingVestingSchedule, + #[codec(index = 6)] + DeadAccount, + #[codec(index = 7)] + TooManyReserves, + #[codec(index = 8)] + TooManyHolds, + #[codec(index = 9)] + TooManyFreezes, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Endowed { + account: ::sp_core::crypto::AccountId32, + free_balance: ::core::primitive::u128, + }, + #[codec(index = 1)] + DustLost { + account: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Transfer { + from: ::sp_core::crypto::AccountId32, + to: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + BalanceSet { + who: ::sp_core::crypto::AccountId32, + free: ::core::primitive::u128, + }, + #[codec(index = 4)] + Reserved { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + Unreserved { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 6)] + ReserveRepatriated { + from: ::sp_core::crypto::AccountId32, + to: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + destination_status: + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + }, + #[codec(index = 7)] + Deposit { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 8)] + Withdraw { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + Slashed { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 10)] + Minted { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 11)] + Burned { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 12)] + Suspended { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 13)] + Restored { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 14)] + Upgraded { who: ::sp_core::crypto::AccountId32 }, + #[codec(index = 15)] + Issued { amount: ::core::primitive::u128 }, + #[codec(index = 16)] + Rescinded { amount: ::core::primitive::u128 }, + #[codec(index = 17)] + Locked { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 18)] + Unlocked { + who: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 19)] + Frozen { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + #[codec(index = 20)] + Thawed { who: ::sp_core::crypto::AccountId32, amount: ::core::primitive::u128 }, + } + } + pub mod types { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub frozen: _0, + pub flags: runtime_types::pallet_balances::types::ExtraFlags, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::types::Reasons, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct ExtraFlags(pub ::core::primitive::u128); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IdAmount<_0, _1> { + pub id: _0, + pub amount: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + } + pub mod pallet_election_provider_multi_phase { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: westend_runtime :: NposCompactSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < runtime_types :: sp_npos_elections :: ElectionScore > , } , # [codec (index = 2)] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: sp_core :: crypto :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: sp_core :: crypto :: AccountId32 > ,) > , } , # [codec (index = 3)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: westend_runtime :: NposCompactSolution16 > > , } , # [codec (index = 4)] governance_fallback { maybe_max_voters : :: core :: option :: Option < :: core :: primitive :: u32 > , maybe_max_targets : :: core :: option :: Option < :: core :: primitive :: u32 > , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + PreDispatchEarlySubmission, + #[codec(index = 1)] + PreDispatchWrongWinnerCount, + #[codec(index = 2)] + PreDispatchWeakSubmission, + #[codec(index = 3)] + SignedQueueFull, + #[codec(index = 4)] + SignedCannotPayDeposit, + #[codec(index = 5)] + SignedInvalidWitness, + #[codec(index = 6)] + SignedTooMuchWeight, + #[codec(index = 7)] + OcwCallWrongEra, + #[codec(index = 8)] + MissingSnapshotMetadata, + #[codec(index = 9)] + InvalidSubmissionIndex, + #[codec(index = 10)] + CallNotAllowed, + #[codec(index = 11)] + FallbackFailed, + #[codec(index = 12)] + BoundNotMet, + #[codec(index = 13)] + TooManyWinners, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + SolutionStored { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + origin: ::core::option::Option<::sp_core::crypto::AccountId32>, + prev_ejected: ::core::primitive::bool, + }, + #[codec(index = 1)] + ElectionFinalized { + compute: + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + score: runtime_types::sp_npos_elections::ElectionScore, + }, + #[codec(index = 2)] + ElectionFailed, + #[codec(index = 3)] + Rewarded { + account: ::sp_core::crypto::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 4)] + Slashed { + account: ::sp_core::crypto::AccountId32, + value: ::core::primitive::u128, + }, + #[codec(index = 5)] + PhaseTransitioned { + from: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + to: runtime_types::pallet_election_provider_multi_phase::Phase< + ::core::primitive::u32, + >, + round: ::core::primitive::u32, + }, + } + } + pub mod signed { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SignedSubmission<_0, _1, _2> { + pub who: _0, + pub deposit: _1, + pub raw_solution: + runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, + pub call_fee: _1, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RawSolution<_0> { + pub solution: _0, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub round: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ReadySolution { + pub supports: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::sp_core::crypto::AccountId32, + runtime_types::sp_npos_elections::Support<::sp_core::crypto::AccountId32>, + )>, + pub score: runtime_types::sp_npos_elections::ElectionScore, + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RoundSnapshot<_0, _1> { + pub voters: ::std::vec::Vec<_1>, + pub targets: ::std::vec::Vec<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, + } + } + pub mod pallet_fast_unstake { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + register_fast_unstake, + #[codec(index = 1)] + deregister, + #[codec(index = 2)] + control { eras_to_check: ::core::primitive::u32 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotController, + #[codec(index = 1)] + AlreadyQueued, + #[codec(index = 2)] + NotFullyBonded, + #[codec(index = 3)] + NotQueued, + #[codec(index = 4)] + AlreadyHead, + #[codec(index = 5)] + CallNotAllowed, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Unstaked { + stash: ::sp_core::crypto::AccountId32, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + Slashed { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + InternalError, + #[codec(index = 3)] + BatchChecked { eras: ::std::vec::Vec<::core::primitive::u32> }, + #[codec(index = 4)] + BatchFinished { size: ::core::primitive::u32 }, + } + } + pub mod types { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnstakeRequest { + pub stashes: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + pub checked: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + } + } + } + pub mod pallet_grandpa { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + ::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 1)] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + ::sp_consensus_grandpa::EquivocationProof< + ::subxt::utils::H256, + ::core::primitive::u32, + >, + >, + key_owner_proof: ::sp_session::MembershipProof, + }, + #[codec(index = 2)] + note_stalled { + delay: ::core::primitive::u32, + best_finalized_block_number: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + PauseFailed, + #[codec(index = 1)] + ResumeFailed, + #[codec(index = 2)] + ChangePending, + #[codec(index = 3)] + TooSoon, + #[codec(index = 4)] + InvalidKeyOwnershipProof, + #[codec(index = 5)] + InvalidEquivocationProof, + #[codec(index = 6)] + DuplicateOffenceReport, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewAuthorities { + authority_set: ::std::vec::Vec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + }, + #[codec(index = 1)] + Paused, + #[codec(index = 2)] + Resumed, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct StoredPendingChange<_0> { + pub scheduled_at: _0, + pub delay: _0, + pub next_authorities: + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec<( + runtime_types::sp_consensus_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub forced: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum StoredState<_0> { + #[codec(index = 0)] + Live, + #[codec(index = 1)] + PendingPause { scheduled_at: _0, delay: _0 }, + #[codec(index = 2)] + Paused, + #[codec(index = 3)] + PendingResume { scheduled_at: _0, delay: _0 }, + } + } + pub mod pallet_identity { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + add_registrar { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 1)] + set_identity { + info: + ::std::boxed::Box, + }, + #[codec(index = 2)] + set_subs { + subs: ::std::vec::Vec<( + ::sp_core::crypto::AccountId32, + runtime_types::pallet_identity::types::Data, + )>, + }, + #[codec(index = 3)] + clear_identity, + #[codec(index = 4)] + request_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + #[codec(compact)] + max_fee: ::core::primitive::u128, + }, + #[codec(index = 5)] + cancel_request { reg_index: ::core::primitive::u32 }, + #[codec(index = 6)] + set_fee { + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 7)] + set_account_id { + #[codec(compact)] + index: ::core::primitive::u32, + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 8)] + set_fields { + #[codec(compact)] + index: ::core::primitive::u32, + fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + }, + #[codec(index = 9)] + provide_judgement { + #[codec(compact)] + reg_index: ::core::primitive::u32, + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + judgement: runtime_types::pallet_identity::types::Judgement< + ::core::primitive::u128, + >, + identity: ::subxt::utils::H256, + }, + #[codec(index = 10)] + kill_identity { + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 11)] + add_sub { + sub: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 12)] + rename_sub { + sub: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + data: runtime_types::pallet_identity::types::Data, + }, + #[codec(index = 13)] + remove_sub { + sub: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 14)] + quit_sub, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooManySubAccounts, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + NotNamed, + #[codec(index = 3)] + EmptyIndex, + #[codec(index = 4)] + FeeChanged, + #[codec(index = 5)] + NoIdentity, + #[codec(index = 6)] + StickyJudgement, + #[codec(index = 7)] + JudgementGiven, + #[codec(index = 8)] + InvalidJudgement, + #[codec(index = 9)] + InvalidIndex, + #[codec(index = 10)] + InvalidTarget, + #[codec(index = 11)] + TooManyFields, + #[codec(index = 12)] + TooManyRegistrars, + #[codec(index = 13)] + AlreadyClaimed, + #[codec(index = 14)] + NotSub, + #[codec(index = 15)] + NotOwned, + #[codec(index = 16)] + JudgementForDifferentIdentity, + #[codec(index = 17)] + JudgementPaymentFailed, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + IdentitySet { who: ::sp_core::crypto::AccountId32 }, + #[codec(index = 1)] + IdentityCleared { + who: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 2)] + IdentityKilled { + who: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 3)] + JudgementRequested { + who: ::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 4)] + JudgementUnrequested { + who: ::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 5)] + JudgementGiven { + target: ::sp_core::crypto::AccountId32, + registrar_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + RegistrarAdded { registrar_index: ::core::primitive::u32 }, + #[codec(index = 7)] + SubIdentityAdded { + sub: ::sp_core::crypto::AccountId32, + main: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 8)] + SubIdentityRemoved { + sub: ::sp_core::crypto::AccountId32, + main: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + #[codec(index = 9)] + SubIdentityRevoked { + sub: ::sp_core::crypto::AccountId32, + main: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + }, + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct BitFlags<_0>( + pub ::core::primitive::u64, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Data { + #[codec(index = 0)] + None, + #[codec(index = 1)] + Raw0([::core::primitive::u8; 0usize]), + #[codec(index = 2)] + Raw1([::core::primitive::u8; 1usize]), + #[codec(index = 3)] + Raw2([::core::primitive::u8; 2usize]), + #[codec(index = 4)] + Raw3([::core::primitive::u8; 3usize]), + #[codec(index = 5)] + Raw4([::core::primitive::u8; 4usize]), + #[codec(index = 6)] + Raw5([::core::primitive::u8; 5usize]), + #[codec(index = 7)] + Raw6([::core::primitive::u8; 6usize]), + #[codec(index = 8)] + Raw7([::core::primitive::u8; 7usize]), + #[codec(index = 9)] + Raw8([::core::primitive::u8; 8usize]), + #[codec(index = 10)] + Raw9([::core::primitive::u8; 9usize]), + #[codec(index = 11)] + Raw10([::core::primitive::u8; 10usize]), + #[codec(index = 12)] + Raw11([::core::primitive::u8; 11usize]), + #[codec(index = 13)] + Raw12([::core::primitive::u8; 12usize]), + #[codec(index = 14)] + Raw13([::core::primitive::u8; 13usize]), + #[codec(index = 15)] + Raw14([::core::primitive::u8; 14usize]), + #[codec(index = 16)] + Raw15([::core::primitive::u8; 15usize]), + #[codec(index = 17)] + Raw16([::core::primitive::u8; 16usize]), + #[codec(index = 18)] + Raw17([::core::primitive::u8; 17usize]), + #[codec(index = 19)] + Raw18([::core::primitive::u8; 18usize]), + #[codec(index = 20)] + Raw19([::core::primitive::u8; 19usize]), + #[codec(index = 21)] + Raw20([::core::primitive::u8; 20usize]), + #[codec(index = 22)] + Raw21([::core::primitive::u8; 21usize]), + #[codec(index = 23)] + Raw22([::core::primitive::u8; 22usize]), + #[codec(index = 24)] + Raw23([::core::primitive::u8; 23usize]), + #[codec(index = 25)] + Raw24([::core::primitive::u8; 24usize]), + #[codec(index = 26)] + Raw25([::core::primitive::u8; 25usize]), + #[codec(index = 27)] + Raw26([::core::primitive::u8; 26usize]), + #[codec(index = 28)] + Raw27([::core::primitive::u8; 27usize]), + #[codec(index = 29)] + Raw28([::core::primitive::u8; 28usize]), + #[codec(index = 30)] + Raw29([::core::primitive::u8; 29usize]), + #[codec(index = 31)] + Raw30([::core::primitive::u8; 30usize]), + #[codec(index = 32)] + Raw31([::core::primitive::u8; 31usize]), + #[codec(index = 33)] + Raw32([::core::primitive::u8; 32usize]), + #[codec(index = 34)] + BlakeTwo256([::core::primitive::u8; 32usize]), + #[codec(index = 35)] + Sha256([::core::primitive::u8; 32usize]), + #[codec(index = 36)] + Keccak256([::core::primitive::u8; 32usize]), + #[codec(index = 37)] + ShaThree256([::core::primitive::u8; 32usize]), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum IdentityField { + #[codec(index = 1)] + Display, + #[codec(index = 2)] + Legal, + #[codec(index = 4)] + Web, + #[codec(index = 8)] + Riot, + #[codec(index = 16)] + Email, + #[codec(index = 32)] + PgpFingerprint, + #[codec(index = 64)] + Image, + #[codec(index = 128)] + Twitter, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IdentityInfo { + pub additional: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + runtime_types::pallet_identity::types::Data, + runtime_types::pallet_identity::types::Data, + )>, + pub display: runtime_types::pallet_identity::types::Data, + pub legal: runtime_types::pallet_identity::types::Data, + pub web: runtime_types::pallet_identity::types::Data, + pub riot: runtime_types::pallet_identity::types::Data, + pub email: runtime_types::pallet_identity::types::Data, + pub pgp_fingerprint: ::core::option::Option<[::core::primitive::u8; 20usize]>, + pub image: runtime_types::pallet_identity::types::Data, + pub twitter: runtime_types::pallet_identity::types::Data, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Judgement<_0> { + #[codec(index = 0)] + Unknown, + #[codec(index = 1)] + FeePaid(_0), + #[codec(index = 2)] + Reasonable, + #[codec(index = 3)] + KnownGood, + #[codec(index = 4)] + OutOfDate, + #[codec(index = 5)] + LowQuality, + #[codec(index = 6)] + Erroneous, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RegistrarInfo<_0, _1> { + pub account: _1, + pub fee: _0, + pub fields: runtime_types::pallet_identity::types::BitFlags< + runtime_types::pallet_identity::types::IdentityField, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Registration<_0> { + pub judgements: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + ::core::primitive::u32, + runtime_types::pallet_identity::types::Judgement<_0>, + )>, + pub deposit: _0, + pub info: runtime_types::pallet_identity::types::IdentityInfo, + } + } + } + pub mod pallet_im_online { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + heartbeat { + heartbeat: + runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, + signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidKey, + #[codec(index = 1)] + DuplicatedHeartbeat, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + HeartbeatReceived { + authority_id: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + }, + #[codec(index = 1)] + AllGood, + #[codec(index = 2)] + SomeOffline { + offline: ::std::vec::Vec<( + ::sp_core::crypto::AccountId32, + runtime_types::pallet_staking::Exposure< + ::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + )>, + }, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod app_sr25519 { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BoundedOpaqueNetworkState { + pub peer_id: runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + pub external_addresses: + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Heartbeat<_0> { + pub block_number: _0, + pub network_state: runtime_types::sp_core::offchain::OpaqueNetworkState, + pub session_index: _0, + pub authority_index: _0, + pub validators_len: _0, + } + } + pub mod pallet_indices { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + claim { index: ::core::primitive::u32 }, + #[codec(index = 1)] + transfer { + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + index: ::core::primitive::u32, + }, + #[codec(index = 2)] + free { index: ::core::primitive::u32 }, + #[codec(index = 3)] + force_transfer { + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + index: ::core::primitive::u32, + freeze: ::core::primitive::bool, + }, + #[codec(index = 4)] + freeze { index: ::core::primitive::u32 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotAssigned, + #[codec(index = 1)] + NotOwner, + #[codec(index = 2)] + InUse, + #[codec(index = 3)] + NotTransfer, + #[codec(index = 4)] + Permanent, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + IndexAssigned { + who: ::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 1)] + IndexFreed { index: ::core::primitive::u32 }, + #[codec(index = 2)] + IndexFrozen { + index: ::core::primitive::u32, + who: ::sp_core::crypto::AccountId32, + }, + } + } + } + pub mod pallet_message_queue { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] reap_page { message_origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , page_index : :: core :: primitive :: u32 , } , # [codec (index = 1)] execute_overweight { message_origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , page : :: core :: primitive :: u32 , index : :: core :: primitive :: u32 , weight_limit : :: sp_weights :: Weight , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotReapable, + #[codec(index = 1)] + NoPage, + #[codec(index = 2)] + NoMessage, + #[codec(index = 3)] + AlreadyProcessed, + #[codec(index = 4)] + Queued, + #[codec(index = 5)] + InsufficientWeight, + #[codec(index = 6)] + TemporarilyUnprocessable, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + # [codec (index = 0)] ProcessingFailed { id : [:: core :: primitive :: u8 ; 32usize] , origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , error : runtime_types :: frame_support :: traits :: messages :: ProcessMessageError , } , # [codec (index = 1)] Processed { id : [:: core :: primitive :: u8 ; 32usize] , origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , weight_used : :: sp_weights :: Weight , success : :: core :: primitive :: bool , } , # [codec (index = 2)] OverweightEnqueued { id : [:: core :: primitive :: u8 ; 32usize] , origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , page_index : :: core :: primitive :: u32 , message_index : :: core :: primitive :: u32 , } , # [codec (index = 3)] PageReaped { origin : runtime_types :: polkadot_runtime_parachains :: inclusion :: AggregateMessageOrigin , index : :: core :: primitive :: u32 , } , } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BookState<_0> { + pub begin: ::core::primitive::u32, + pub end: ::core::primitive::u32, + pub count: ::core::primitive::u32, + pub ready_neighbours: + ::core::option::Option>, + pub message_count: ::core::primitive::u64, + pub size: ::core::primitive::u64, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Neighbours<_0> { + pub prev: _0, + pub next: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Page<_0> { + pub remaining: _0, + pub remaining_size: _0, + pub first_index: _0, + pub first: _0, + pub last: _0, + pub heap: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + } + } + pub mod pallet_multisig { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + as_multi_threshold_1 { + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call: ::std::boxed::Box, + max_weight: ::sp_weights::Weight, + }, + #[codec(index = 2)] + approve_as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + maybe_timepoint: ::core::option::Option< + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + >, + call_hash: [::core::primitive::u8; 32usize], + max_weight: ::sp_weights::Weight, + }, + #[codec(index = 3)] + cancel_as_multi { + threshold: ::core::primitive::u16, + other_signatories: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + call_hash: [::core::primitive::u8; 32usize], + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + MinimumThreshold, + #[codec(index = 1)] + AlreadyApproved, + #[codec(index = 2)] + NoApprovalsNeeded, + #[codec(index = 3)] + TooFewSignatories, + #[codec(index = 4)] + TooManySignatories, + #[codec(index = 5)] + SignatoriesOutOfOrder, + #[codec(index = 6)] + SenderInSignatories, + #[codec(index = 7)] + NotFound, + #[codec(index = 8)] + NotOwner, + #[codec(index = 9)] + NoTimepoint, + #[codec(index = 10)] + WrongTimepoint, + #[codec(index = 11)] + UnexpectedTimepoint, + #[codec(index = 12)] + MaxWeightTooLow, + #[codec(index = 13)] + AlreadyStored, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewMultisig { + approving: ::sp_core::crypto::AccountId32, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 1)] + MultisigApproval { + approving: ::sp_core::crypto::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + MultisigExecuted { + approving: ::sp_core::crypto::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + MultisigCancelled { + cancelling: ::sp_core::crypto::AccountId32, + timepoint: + runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, + multisig: ::sp_core::crypto::AccountId32, + call_hash: [::core::primitive::u8; 32usize], + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Multisig<_0, _1, _2> { + pub when: runtime_types::pallet_multisig::Timepoint<_0>, + pub deposit: _1, + pub depositor: _2, + pub approvals: runtime_types::bounded_collections::bounded_vec::BoundedVec<_2>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Timepoint<_0> { + pub height: _0, + pub index: _0, + } + } + pub mod pallet_nomination_pools { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + join { + #[codec(compact)] + amount: ::core::primitive::u128, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + bond_extra { + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 2)] + claim_payout, + #[codec(index = 3)] + unbond { + member_account: + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + #[codec(compact)] + unbonding_points: ::core::primitive::u128, + }, + #[codec(index = 4)] + pool_withdraw_unbonded { + pool_id: ::core::primitive::u32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 5)] + withdraw_unbonded { + member_account: + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 6)] + create { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 7)] + create_with_pool_id { + #[codec(compact)] + amount: ::core::primitive::u128, + root: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + nominator: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + bouncer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + nominate { + pool_id: ::core::primitive::u32, + validators: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 9)] + set_state { + pool_id: ::core::primitive::u32, + state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 10)] + set_metadata { + pool_id: ::core::primitive::u32, + metadata: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 11)] + set_configs { + min_join_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + min_create_bond: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u128, + >, + max_pools: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + max_members_per_pool: runtime_types::pallet_nomination_pools::ConfigOp< + ::core::primitive::u32, + >, + global_max_commission: runtime_types::pallet_nomination_pools::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + }, + #[codec(index = 12)] + update_roles { + pool_id: ::core::primitive::u32, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::sp_core::crypto::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::sp_core::crypto::AccountId32, + >, + new_bouncer: runtime_types::pallet_nomination_pools::ConfigOp< + ::sp_core::crypto::AccountId32, + >, + }, + #[codec(index = 13)] + chill { pool_id: ::core::primitive::u32 }, + #[codec(index = 14)] + bond_extra_other { + member: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + extra: runtime_types::pallet_nomination_pools::BondExtra< + ::core::primitive::u128, + >, + }, + #[codec(index = 15)] + set_claim_permission { + permission: runtime_types::pallet_nomination_pools::ClaimPermission, + }, + #[codec(index = 16)] + claim_payout_other { other: ::sp_core::crypto::AccountId32 }, + #[codec(index = 17)] + set_commission { + pool_id: ::core::primitive::u32, + new_commission: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::sp_core::crypto::AccountId32, + )>, + }, + #[codec(index = 18)] + set_commission_max { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 19)] + set_commission_change_rate { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 20)] + claim_commission { pool_id: ::core::primitive::u32 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DefensiveError { + #[codec(index = 0)] + NotEnoughSpaceInUnbondPool, + #[codec(index = 1)] + PoolNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + BondedStashKilledPrematurely, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + PoolNotFound, + #[codec(index = 1)] + PoolMemberNotFound, + #[codec(index = 2)] + RewardPoolNotFound, + #[codec(index = 3)] + SubPoolsNotFound, + #[codec(index = 4)] + AccountBelongsToOtherPool, + #[codec(index = 5)] + FullyUnbonding, + #[codec(index = 6)] + MaxUnbondingLimit, + #[codec(index = 7)] + CannotWithdrawAny, + #[codec(index = 8)] + MinimumBondNotMet, + #[codec(index = 9)] + OverflowRisk, + #[codec(index = 10)] + NotDestroying, + #[codec(index = 11)] + NotNominator, + #[codec(index = 12)] + NotKickerOrDestroying, + #[codec(index = 13)] + NotOpen, + #[codec(index = 14)] + MaxPools, + #[codec(index = 15)] + MaxPoolMembers, + #[codec(index = 16)] + CanNotChangeState, + #[codec(index = 17)] + DoesNotHavePermission, + #[codec(index = 18)] + MetadataExceedsMaxLen, + #[codec(index = 19)] + Defensive(runtime_types::pallet_nomination_pools::pallet::DefensiveError), + #[codec(index = 20)] + PartialUnbondNotAllowedPermissionlessly, + #[codec(index = 21)] + MaxCommissionRestricted, + #[codec(index = 22)] + CommissionExceedsMaximum, + #[codec(index = 23)] + CommissionChangeThrottled, + #[codec(index = 24)] + CommissionChangeRateNotAllowed, + #[codec(index = 25)] + NoPendingCommission, + #[codec(index = 26)] + NoCommissionCurrentSet, + #[codec(index = 27)] + PoolIdInUse, + #[codec(index = 28)] + InvalidPoolId, + #[codec(index = 29)] + BondExtraRestricted, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Created { + depositor: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + }, + #[codec(index = 1)] + Bonded { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + bonded: ::core::primitive::u128, + joined: ::core::primitive::bool, + }, + #[codec(index = 2)] + PaidOut { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + payout: ::core::primitive::u128, + }, + #[codec(index = 3)] + Unbonded { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + era: ::core::primitive::u32, + }, + #[codec(index = 4)] + Withdrawn { + member: ::sp_core::crypto::AccountId32, + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + points: ::core::primitive::u128, + }, + #[codec(index = 5)] + Destroyed { pool_id: ::core::primitive::u32 }, + #[codec(index = 6)] + StateChanged { + pool_id: ::core::primitive::u32, + new_state: runtime_types::pallet_nomination_pools::PoolState, + }, + #[codec(index = 7)] + MemberRemoved { + pool_id: ::core::primitive::u32, + member: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 8)] + RolesUpdated { + root: ::core::option::Option<::sp_core::crypto::AccountId32>, + bouncer: ::core::option::Option<::sp_core::crypto::AccountId32>, + nominator: ::core::option::Option<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 9)] + PoolSlashed { + pool_id: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 10)] + UnbondingPoolSlashed { + pool_id: ::core::primitive::u32, + era: ::core::primitive::u32, + balance: ::core::primitive::u128, + }, + #[codec(index = 11)] + PoolCommissionUpdated { + pool_id: ::core::primitive::u32, + current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::sp_core::crypto::AccountId32, + )>, + }, + #[codec(index = 12)] + PoolMaxCommissionUpdated { + pool_id: ::core::primitive::u32, + max_commission: runtime_types::sp_arithmetic::per_things::Perbill, + }, + #[codec(index = 13)] + PoolCommissionChangeRateUpdated { + pool_id: ::core::primitive::u32, + change_rate: runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + }, + #[codec(index = 14)] + PoolCommissionClaimed { + pool_id: ::core::primitive::u32, + commission: ::core::primitive::u128, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BondExtra<_0> { + #[codec(index = 0)] + FreeBalance(_0), + #[codec(index = 1)] + Rewards, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BondedPoolInner { + pub commission: runtime_types::pallet_nomination_pools::Commission, + pub member_counter: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub roles: runtime_types::pallet_nomination_pools::PoolRoles< + ::sp_core::crypto::AccountId32, + >, + pub state: runtime_types::pallet_nomination_pools::PoolState, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ClaimPermission { + #[codec(index = 0)] + Permissioned, + #[codec(index = 1)] + PermissionlessCompound, + #[codec(index = 2)] + PermissionlessWithdraw, + #[codec(index = 3)] + PermissionlessAll, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Commission { + pub current: ::core::option::Option<( + runtime_types::sp_arithmetic::per_things::Perbill, + ::sp_core::crypto::AccountId32, + )>, + pub max: ::core::option::Option, + pub change_rate: ::core::option::Option< + runtime_types::pallet_nomination_pools::CommissionChangeRate< + ::core::primitive::u32, + >, + >, + pub throttle_from: ::core::option::Option<::core::primitive::u32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CommissionChangeRate<_0> { + pub max_increase: runtime_types::sp_arithmetic::per_things::Perbill, + pub min_delay: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PoolMember { + pub pool_id: ::core::primitive::u32, + pub points: ::core::primitive::u128, + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub unbonding_eras: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + ::core::primitive::u128, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PoolRoles<_0> { + pub depositor: _0, + pub root: ::core::option::Option<_0>, + pub nominator: ::core::option::Option<_0>, + pub bouncer: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PoolState { + #[codec(index = 0)] + Open, + #[codec(index = 1)] + Blocked, + #[codec(index = 2)] + Destroying, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RewardPool { + pub last_recorded_reward_counter: + runtime_types::sp_arithmetic::fixed_point::FixedU128, + pub last_recorded_total_payouts: ::core::primitive::u128, + pub total_rewards_claimed: ::core::primitive::u128, + pub total_commission_pending: ::core::primitive::u128, + pub total_commission_claimed: ::core::primitive::u128, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SubPools { + pub no_era: runtime_types::pallet_nomination_pools::UnbondPool, + pub with_era: + runtime_types::bounded_collections::bounded_btree_map::BoundedBTreeMap< + ::core::primitive::u32, + runtime_types::pallet_nomination_pools::UnbondPool, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnbondPool { + pub points: ::core::primitive::u128, + pub balance: ::core::primitive::u128, + } + } + pub mod pallet_offences { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Offence { + kind: [::core::primitive::u8; 16usize], + timeslot: ::std::vec::Vec<::core::primitive::u8>, + }, + } + } + } + pub mod pallet_preimage { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + note_preimage { bytes: ::std::vec::Vec<::core::primitive::u8> }, + #[codec(index = 1)] + unnote_preimage { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + request_preimage { hash: ::subxt::utils::H256 }, + #[codec(index = 3)] + unrequest_preimage { hash: ::subxt::utils::H256 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooBig, + #[codec(index = 1)] + AlreadyNoted, + #[codec(index = 2)] + NotAuthorized, + #[codec(index = 3)] + NotNoted, + #[codec(index = 4)] + Requested, + #[codec(index = 5)] + NotRequested, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Noted { hash: ::subxt::utils::H256 }, + #[codec(index = 1)] + Requested { hash: ::subxt::utils::H256 }, + #[codec(index = 2)] + Cleared { hash: ::subxt::utils::H256 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RequestStatus<_0, _1> { + #[codec(index = 0)] + Unrequested { deposit: (_0, _1), len: ::core::primitive::u32 }, + #[codec(index = 1)] + Requested { + deposit: ::core::option::Option<(_0, _1)>, + count: ::core::primitive::u32, + len: ::core::option::Option<::core::primitive::u32>, + }, + } + } + pub mod pallet_proxy { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + proxy { + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + force_proxy_type: + ::core::option::Option, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + add_proxy { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 2)] + remove_proxy { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 3)] + remove_proxies, + #[codec(index = 4)] + create_pure { + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + index: ::core::primitive::u16, + }, + #[codec(index = 5)] + kill_pure { + spawner: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + proxy_type: runtime_types::westend_runtime::ProxyType, + index: ::core::primitive::u16, + #[codec(compact)] + height: ::core::primitive::u32, + #[codec(compact)] + ext_index: ::core::primitive::u32, + }, + #[codec(index = 6)] + announce { + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 7)] + remove_announcement { + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 8)] + reject_announcement { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 9)] + proxy_announced { + delegate: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + real: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + force_proxy_type: + ::core::option::Option, + call: ::std::boxed::Box, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooMany, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + NotProxy, + #[codec(index = 3)] + Unproxyable, + #[codec(index = 4)] + Duplicate, + #[codec(index = 5)] + NoPermission, + #[codec(index = 6)] + Unannounced, + #[codec(index = 7)] + NoSelfProxy, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + ProxyExecuted { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + PureCreated { + pure: ::sp_core::crypto::AccountId32, + who: ::sp_core::crypto::AccountId32, + proxy_type: runtime_types::westend_runtime::ProxyType, + disambiguation_index: ::core::primitive::u16, + }, + #[codec(index = 2)] + Announced { + real: ::sp_core::crypto::AccountId32, + proxy: ::sp_core::crypto::AccountId32, + call_hash: ::subxt::utils::H256, + }, + #[codec(index = 3)] + ProxyAdded { + delegator: ::sp_core::crypto::AccountId32, + delegatee: ::sp_core::crypto::AccountId32, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + #[codec(index = 4)] + ProxyRemoved { + delegator: ::sp_core::crypto::AccountId32, + delegatee: ::sp_core::crypto::AccountId32, + proxy_type: runtime_types::westend_runtime::ProxyType, + delay: ::core::primitive::u32, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Announcement<_0, _1, _2> { + pub real: _0, + pub call_hash: _1, + pub height: _2, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ProxyDefinition<_0, _1, _2> { + pub delegate: _0, + pub proxy_type: _1, + pub delay: _2, + } + } + pub mod pallet_recovery { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + as_recovered { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + set_recovered { + lost: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + rescuer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 2)] + create_recovery { + friends: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + threshold: ::core::primitive::u16, + delay_period: ::core::primitive::u32, + }, + #[codec(index = 3)] + initiate_recovery { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 4)] + vouch_recovery { + lost: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + rescuer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 5)] + claim_recovery { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 6)] + close_recovery { + rescuer: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 7)] + remove_recovery, + #[codec(index = 8)] + cancel_recovered { + account: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotAllowed, + #[codec(index = 1)] + ZeroThreshold, + #[codec(index = 2)] + NotEnoughFriends, + #[codec(index = 3)] + MaxFriends, + #[codec(index = 4)] + NotSorted, + #[codec(index = 5)] + NotRecoverable, + #[codec(index = 6)] + AlreadyRecoverable, + #[codec(index = 7)] + AlreadyStarted, + #[codec(index = 8)] + NotStarted, + #[codec(index = 9)] + NotFriend, + #[codec(index = 10)] + DelayPeriod, + #[codec(index = 11)] + AlreadyVouched, + #[codec(index = 12)] + Threshold, + #[codec(index = 13)] + StillActive, + #[codec(index = 14)] + AlreadyProxy, + #[codec(index = 15)] + BadState, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + RecoveryCreated { account: ::sp_core::crypto::AccountId32 }, + #[codec(index = 1)] + RecoveryInitiated { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 2)] + RecoveryVouched { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + sender: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 3)] + RecoveryClosed { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 4)] + AccountRecovered { + lost_account: ::sp_core::crypto::AccountId32, + rescuer_account: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 5)] + RecoveryRemoved { lost_account: ::sp_core::crypto::AccountId32 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ActiveRecovery<_0, _1, _2> { + pub created: _0, + pub deposit: _1, + pub friends: _2, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RecoveryConfig<_0, _1, _2> { + pub delay_period: _0, + pub deposit: _1, + pub friends: _2, + pub threshold: ::core::primitive::u16, + } + } + pub mod pallet_scheduler { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + schedule { + when: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 1)] + cancel { when: ::core::primitive::u32, index: ::core::primitive::u32 }, + #[codec(index = 2)] + schedule_named { + 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: ::std::boxed::Box, + }, + #[codec(index = 3)] + cancel_named { id: [::core::primitive::u8; 32usize] }, + #[codec(index = 4)] + schedule_after { + after: ::core::primitive::u32, + maybe_periodic: ::core::option::Option<( + ::core::primitive::u32, + ::core::primitive::u32, + )>, + priority: ::core::primitive::u8, + call: ::std::boxed::Box, + }, + #[codec(index = 5)] + schedule_named_after { + 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: ::std::boxed::Box, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + FailedToSchedule, + #[codec(index = 1)] + NotFound, + #[codec(index = 2)] + TargetBlockNumberInPast, + #[codec(index = 3)] + RescheduleNoChange, + #[codec(index = 4)] + Named, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Scheduled { when: ::core::primitive::u32, index: ::core::primitive::u32 }, + #[codec(index = 1)] + Canceled { when: ::core::primitive::u32, index: ::core::primitive::u32 }, + #[codec(index = 2)] + Dispatched { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 3)] + CallUnavailable { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 4)] + PeriodicFailed { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + #[codec(index = 5)] + PermanentlyOverweight { + task: (::core::primitive::u32, ::core::primitive::u32), + id: ::core::option::Option<[::core::primitive::u8; 32usize]>, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Scheduled<_0, _1, _2, _3, _4> { + pub maybe_id: ::core::option::Option<_0>, + pub priority: ::core::primitive::u8, + pub call: _1, + pub maybe_periodic: ::core::option::Option<(_2, _2)>, + pub origin: _3, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_4>, + } + } + pub mod pallet_session { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + set_keys { + keys: runtime_types::westend_runtime::SessionKeys, + proof: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + purge_keys, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidProof, + #[codec(index = 1)] + NoAssociatedValidatorId, + #[codec(index = 2)] + DuplicatedKey, + #[codec(index = 3)] + NoKeys, + #[codec(index = 4)] + NoAccount, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewSession { session_index: ::core::primitive::u32 }, + } + } + } + pub mod pallet_staking { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + bond { + #[codec(compact)] + value: ::core::primitive::u128, + payee: runtime_types::pallet_staking::RewardDestination< + ::sp_core::crypto::AccountId32, + >, + }, + #[codec(index = 1)] + bond_extra { + #[codec(compact)] + max_additional: ::core::primitive::u128, + }, + #[codec(index = 2)] + unbond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 3)] + withdraw_unbonded { num_slashing_spans: ::core::primitive::u32 }, + #[codec(index = 4)] + validate { prefs: runtime_types::pallet_staking::ValidatorPrefs }, + #[codec(index = 5)] + nominate { + targets: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + >, + }, + #[codec(index = 6)] + chill, + #[codec(index = 7)] + set_payee { + payee: runtime_types::pallet_staking::RewardDestination< + ::sp_core::crypto::AccountId32, + >, + }, + #[codec(index = 8)] + set_controller, + #[codec(index = 9)] + set_validator_count { + #[codec(compact)] + new: ::core::primitive::u32, + }, + #[codec(index = 10)] + increase_validator_count { + #[codec(compact)] + additional: ::core::primitive::u32, + }, + #[codec(index = 11)] + scale_validator_count { + factor: runtime_types::sp_arithmetic::per_things::Percent, + }, + #[codec(index = 12)] + force_no_eras, + #[codec(index = 13)] + force_new_era, + #[codec(index = 14)] + set_invulnerables { + invulnerables: ::std::vec::Vec<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 15)] + force_unstake { + stash: ::sp_core::crypto::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 16)] + force_new_era_always, + #[codec(index = 17)] + cancel_deferred_slash { + era: ::core::primitive::u32, + slash_indices: ::std::vec::Vec<::core::primitive::u32>, + }, + #[codec(index = 18)] + payout_stakers { + validator_stash: ::sp_core::crypto::AccountId32, + era: ::core::primitive::u32, + }, + #[codec(index = 19)] + rebond { + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 20)] + reap_stash { + stash: ::sp_core::crypto::AccountId32, + num_slashing_spans: ::core::primitive::u32, + }, + #[codec(index = 21)] + kick { + who: ::std::vec::Vec< + ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + >, + }, + #[codec(index = 22)] + set_staking_configs { + min_nominator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + min_validator_bond: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u128, + >, + max_nominator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + max_validator_count: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + ::core::primitive::u32, + >, + chill_threshold: + runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Percent, + >, + min_commission: runtime_types::pallet_staking::pallet::pallet::ConfigOp< + runtime_types::sp_arithmetic::per_things::Perbill, + >, + }, + #[codec(index = 23)] + chill_other { controller: ::sp_core::crypto::AccountId32 }, + #[codec(index = 24)] + force_apply_min_commission { + validator_stash: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 25)] + set_min_commission { + new: runtime_types::sp_arithmetic::per_things::Perbill, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ConfigOp<_0> { + #[codec(index = 0)] + Noop, + #[codec(index = 1)] + Set(_0), + #[codec(index = 2)] + Remove, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotController, + #[codec(index = 1)] + NotStash, + #[codec(index = 2)] + AlreadyBonded, + #[codec(index = 3)] + AlreadyPaired, + #[codec(index = 4)] + EmptyTargets, + #[codec(index = 5)] + DuplicateIndex, + #[codec(index = 6)] + InvalidSlashIndex, + #[codec(index = 7)] + InsufficientBond, + #[codec(index = 8)] + NoMoreChunks, + #[codec(index = 9)] + NoUnlockChunk, + #[codec(index = 10)] + FundedTarget, + #[codec(index = 11)] + InvalidEraToReward, + #[codec(index = 12)] + InvalidNumberOfNominations, + #[codec(index = 13)] + NotSortedAndUnique, + #[codec(index = 14)] + AlreadyClaimed, + #[codec(index = 15)] + IncorrectHistoryDepth, + #[codec(index = 16)] + IncorrectSlashingSpans, + #[codec(index = 17)] + BadState, + #[codec(index = 18)] + TooManyTargets, + #[codec(index = 19)] + BadTarget, + #[codec(index = 20)] + CannotChillOther, + #[codec(index = 21)] + TooManyNominators, + #[codec(index = 22)] + TooManyValidators, + #[codec(index = 23)] + CommissionTooLow, + #[codec(index = 24)] + BoundNotMet, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + EraPaid { + era_index: ::core::primitive::u32, + validator_payout: ::core::primitive::u128, + remainder: ::core::primitive::u128, + }, + #[codec(index = 1)] + Rewarded { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Slashed { + staker: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + SlashReported { + validator: ::sp_core::crypto::AccountId32, + fraction: runtime_types::sp_arithmetic::per_things::Perbill, + slash_era: ::core::primitive::u32, + }, + #[codec(index = 4)] + OldSlashingReportDiscarded { session_index: ::core::primitive::u32 }, + #[codec(index = 5)] + StakersElected, + #[codec(index = 6)] + Bonded { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 7)] + Unbonded { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 8)] + Withdrawn { + stash: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 9)] + Kicked { + nominator: ::sp_core::crypto::AccountId32, + stash: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 10)] + StakingElectionFailed, + #[codec(index = 11)] + Chilled { stash: ::sp_core::crypto::AccountId32 }, + #[codec(index = 12)] + PayoutStarted { + era_index: ::core::primitive::u32, + validator_stash: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 13)] + ValidatorPrefsSet { + stash: ::sp_core::crypto::AccountId32, + prefs: runtime_types::pallet_staking::ValidatorPrefs, + }, + #[codec(index = 14)] + ForceEra { mode: runtime_types::pallet_staking::Forcing }, + } + } + } + pub mod slashing { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SlashingSpans { + pub span_index: ::core::primitive::u32, + pub last_start: ::core::primitive::u32, + pub last_nonzero_slash: ::core::primitive::u32, + pub prior: ::std::vec::Vec<::core::primitive::u32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SpanRecord<_0> { + pub slashed: _0, + pub paid_out: _0, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ActiveEraInfo { + pub index: ::core::primitive::u32, + pub start: ::core::option::Option<::core::primitive::u64>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct EraRewardPoints<_0> { + pub total: ::core::primitive::u32, + pub individual: ::subxt::utils::KeyedVec<_0, ::core::primitive::u32>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Exposure<_0, _1> { + #[codec(compact)] + pub total: _1, + #[codec(compact)] + pub own: _1, + pub others: + ::std::vec::Vec>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Forcing { + #[codec(index = 0)] + NotForcing, + #[codec(index = 1)] + ForceNew, + #[codec(index = 2)] + ForceNone, + #[codec(index = 3)] + ForceAlways, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IndividualExposure<_0, _1> { + pub who: _0, + #[codec(compact)] + pub value: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Nominations { + pub targets: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::sp_core::crypto::AccountId32, + >, + pub submitted_in: ::core::primitive::u32, + pub suppressed: ::core::primitive::bool, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RewardDestination<_0> { + #[codec(index = 0)] + Staked, + #[codec(index = 1)] + Stash, + #[codec(index = 2)] + Controller, + #[codec(index = 3)] + Account(_0), + #[codec(index = 4)] + None, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct StakingLedger { + pub stash: ::sp_core::crypto::AccountId32, + #[codec(compact)] + pub total: ::core::primitive::u128, + #[codec(compact)] + pub active: ::core::primitive::u128, + pub unlocking: runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::pallet_staking::UnlockChunk<::core::primitive::u128>, + >, + pub claimed_rewards: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u32, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnappliedSlash<_0, _1> { + pub validator: _0, + pub own: _1, + pub others: ::std::vec::Vec<(_0, _1)>, + pub reporters: ::std::vec::Vec<_0>, + pub payout: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UnlockChunk<_0> { + #[codec(compact)] + pub value: _0, + #[codec(compact)] + pub era: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidatorPrefs { + #[codec(compact)] + pub commission: runtime_types::sp_arithmetic::per_things::Perbill, + pub blocked: ::core::primitive::bool, + } + } + pub mod pallet_sudo { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + sudo { call: ::std::boxed::Box }, + #[codec(index = 1)] + sudo_unchecked_weight { + call: ::std::boxed::Box, + weight: ::sp_weights::Weight, + }, + #[codec(index = 2)] + set_key { + new: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 3)] + sudo_as { + who: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + call: ::std::boxed::Box, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + RequireSudo, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Sudid { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + #[codec(index = 1)] + KeyChanged { + old_sudoer: ::core::option::Option<::sp_core::crypto::AccountId32>, + }, + #[codec(index = 2)] + SudoAsDone { + sudo_result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } + } + pub mod pallet_timestamp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + set { + #[codec(compact)] + now: ::core::primitive::u64, + }, + } + } + } + pub mod pallet_transaction_payment { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + TransactionFeePaid { + who: ::sp_core::crypto::AccountId32, + actual_fee: ::core::primitive::u128, + tip: ::core::primitive::u128, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ChargeTransactionPayment(#[codec(compact)] pub ::core::primitive::u128); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Releases { + #[codec(index = 0)] + V1Ancient, + #[codec(index = 1)] + V2, + } + } + pub mod pallet_utility { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + batch { calls: ::std::vec::Vec }, + #[codec(index = 1)] + as_derivative { + index: ::core::primitive::u16, + call: ::std::boxed::Box, + }, + #[codec(index = 2)] + batch_all { + calls: ::std::vec::Vec, + }, + #[codec(index = 3)] + dispatch_as { + as_origin: ::std::boxed::Box, + call: ::std::boxed::Box, + }, + #[codec(index = 4)] + force_batch { + calls: ::std::vec::Vec, + }, + #[codec(index = 5)] + with_weight { + call: ::std::boxed::Box, + weight: ::sp_weights::Weight, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooManyCalls, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + BatchInterrupted { + index: ::core::primitive::u32, + error: runtime_types::sp_runtime::DispatchError, + }, + #[codec(index = 1)] + BatchCompleted, + #[codec(index = 2)] + BatchCompletedWithErrors, + #[codec(index = 3)] + ItemCompleted, + #[codec(index = 4)] + ItemFailed { error: runtime_types::sp_runtime::DispatchError }, + #[codec(index = 5)] + DispatchedAs { + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, + } + } + } + pub mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + vest, + #[codec(index = 1)] + vest_other { + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + }, + #[codec(index = 2)] + vested_transfer { + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + force_vested_transfer { + source: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + target: ::subxt::utils::MultiAddress<::sp_core::crypto::AccountId32, ()>, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotVesting, + #[codec(index = 1)] + AtMaxVestingSchedules, + #[codec(index = 2)] + AmountLow, + #[codec(index = 3)] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + InvalidScheduleParams, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + VestingUpdated { + account: ::sp_core::crypto::AccountId32, + unvested: ::core::primitive::u128, + }, + #[codec(index = 1)] + VestingCompleted { account: ::sp_core::crypto::AccountId32 }, + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } + pub mod pallet_xcm { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + send { + dest: ::std::boxed::Box, + message: ::std::boxed::Box, + }, + #[codec(index = 1)] + teleport_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 2)] + reserve_transfer_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + }, + #[codec(index = 3)] + execute { + message: ::std::boxed::Box, + max_weight: ::sp_weights::Weight, + }, + #[codec(index = 4)] + force_xcm_version { + location: + ::std::boxed::Box, + xcm_version: ::core::primitive::u32, + }, + #[codec(index = 5)] + force_default_xcm_version { + maybe_xcm_version: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 6)] + force_subscribe_version_notify { + location: ::std::boxed::Box, + }, + #[codec(index = 7)] + force_unsubscribe_version_notify { + location: ::std::boxed::Box, + }, + #[codec(index = 8)] + limited_reserve_transfer_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 9)] + limited_teleport_assets { + dest: ::std::boxed::Box, + beneficiary: ::std::boxed::Box, + assets: ::std::boxed::Box, + fee_asset_item: ::core::primitive::u32, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 10)] + force_suspension { suspended: ::core::primitive::bool }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Unreachable, + #[codec(index = 1)] + SendFailure, + #[codec(index = 2)] + Filtered, + #[codec(index = 3)] + UnweighableMessage, + #[codec(index = 4)] + DestinationNotInvertible, + #[codec(index = 5)] + Empty, + #[codec(index = 6)] + CannotReanchor, + #[codec(index = 7)] + TooManyAssets, + #[codec(index = 8)] + InvalidOrigin, + #[codec(index = 9)] + BadVersion, + #[codec(index = 10)] + BadLocation, + #[codec(index = 11)] + NoSubscription, + #[codec(index = 12)] + AlreadySubscribed, + #[codec(index = 13)] + InvalidAsset, + #[codec(index = 14)] + LowBalance, + #[codec(index = 15)] + TooManyLocks, + #[codec(index = 16)] + AccountNotSovereign, + #[codec(index = 17)] + FeesNotMet, + #[codec(index = 18)] + LockNotFound, + #[codec(index = 19)] + InUse, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Attempted(runtime_types::xcm::v3::traits::Outcome), + #[codec(index = 1)] + Sent( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::Xcm, + ), + #[codec(index = 2)] + UnexpectedResponse( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 3)] + ResponseReady(::core::primitive::u64, runtime_types::xcm::v3::Response), + #[codec(index = 4)] + Notified(::core::primitive::u64, ::core::primitive::u8, ::core::primitive::u8), + #[codec(index = 5)] + NotifyOverweight( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ::sp_weights::Weight, + ::sp_weights::Weight, + ), + #[codec(index = 6)] + NotifyDispatchError( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 7)] + NotifyDecodeFailed( + ::core::primitive::u64, + ::core::primitive::u8, + ::core::primitive::u8, + ), + #[codec(index = 8)] + InvalidResponder( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 9)] + InvalidResponderVersion( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 10)] + ResponseTaken(::core::primitive::u64), + #[codec(index = 11)] + AssetsTrapped( + ::subxt::utils::H256, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + #[codec(index = 12)] + VersionChangeNotified( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u32, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 13)] + SupportedVersionChanged( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u32, + ), + #[codec(index = 14)] + NotifyTargetSendFail( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v3::traits::Error, + ), + #[codec(index = 15)] + NotifyTargetMigrationFail( + runtime_types::xcm::VersionedMultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 16)] + InvalidQuerierVersion( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + ), + #[codec(index = 17)] + InvalidQuerier( + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::primitive::u64, + runtime_types::xcm::v3::multilocation::MultiLocation, + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 18)] + VersionNotifyStarted( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 19)] + VersionNotifyRequested( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 20)] + VersionNotifyUnrequested( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 21)] + FeesPaid( + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::v3::multiasset::MultiAssets, + ), + #[codec(index = 22)] + AssetsClaimed( + ::subxt::utils::H256, + runtime_types::xcm::v3::multilocation::MultiLocation, + runtime_types::xcm::VersionedMultiAssets, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Origin { + #[codec(index = 0)] + Xcm(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 1)] + Response(runtime_types::xcm::v3::multilocation::MultiLocation), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum QueryStatus<_0> { + #[codec(index = 0)] + Pending { + responder: runtime_types::xcm::VersionedMultiLocation, + maybe_match_querier: + ::core::option::Option, + maybe_notify: + ::core::option::Option<(::core::primitive::u8, ::core::primitive::u8)>, + timeout: _0, + }, + #[codec(index = 1)] + VersionNotifier { + origin: runtime_types::xcm::VersionedMultiLocation, + is_active: ::core::primitive::bool, + }, + #[codec(index = 2)] + Ready { response: runtime_types::xcm::VersionedResponse, at: _0 }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RemoteLockedFungibleRecord<_0> { + pub amount: ::core::primitive::u128, + pub owner: runtime_types::xcm::VersionedMultiLocation, + pub locker: runtime_types::xcm::VersionedMultiLocation, + pub consumers: runtime_types::bounded_collections::bounded_vec::BoundedVec<( + _0, + ::core::primitive::u128, + )>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionMigrationStage { + #[codec(index = 0)] + MigrateSupportedVersion, + #[codec(index = 1)] + MigrateVersionNotifiers, + #[codec(index = 2)] + NotifyCurrentTargets( + ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, + ), + #[codec(index = 3)] + MigrateAndNotifyOldTargets, + } + } + } + pub mod polkadot_core_primitives { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateHash(pub ::subxt::utils::H256); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InboundDownwardMessage<_0> { + pub sent_at: _0, + pub msg: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InboundHrmpMessage<_0> { + pub sent_at: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OutboundHrmpMessage<_0> { + pub recipient: _0, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod polkadot_parachain { + use super::runtime_types; + pub mod primitives { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HeadData(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpChannelId { + pub sender: runtime_types::polkadot_parachain::primitives::Id, + pub recipient: runtime_types::polkadot_parachain::primitives::Id, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Id(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidationCode(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ValidationCodeHash(pub ::subxt::utils::H256); + } + } + pub mod polkadot_primitives { + use super::runtime_types; + pub mod v4 { + use super::runtime_types; + pub mod assignment_app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + pub mod collator_app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + pub mod executor_params { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ExecutorParam { + #[codec(index = 1)] + MaxMemoryPages(::core::primitive::u32), + #[codec(index = 2)] + StackLogicalMax(::core::primitive::u32), + #[codec(index = 3)] + StackNativeMax(::core::primitive::u32), + #[codec(index = 4)] + PrecheckingMaxMemory(::core::primitive::u64), + #[codec(index = 5)] + PvfPrepTimeout( + runtime_types::polkadot_primitives::v4::PvfPrepTimeoutKind, + ::core::primitive::u64, + ), + #[codec(index = 6)] + PvfExecTimeout( + runtime_types::polkadot_primitives::v4::PvfExecTimeoutKind, + ::core::primitive::u64, + ), + #[codec(index = 7)] + WasmExtBulkMemory, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ExecutorParams( + pub ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParam, + >, + ); + } + pub mod signed { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UncheckedSigned<_0, _1> { + pub payload: _0, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, + pub signature: + runtime_types::polkadot_primitives::v4::validator_app::Signature, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, + } + } + pub mod validator_app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AvailabilityBitfield( + pub ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BackedCandidate<_0> { + pub candidate: + runtime_types::polkadot_primitives::v4::CommittedCandidateReceipt<_0>, + pub validity_votes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::ValidityAttestation, + >, + pub validator_indices: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateCommitments<_0> { + pub upward_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::std::vec::Vec<::core::primitive::u8>, + >, + pub horizontal_messages: + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::polkadot_core_primitives::OutboundHrmpMessage< + runtime_types::polkadot_parachain::primitives::Id, + >, + >, + pub new_validation_code: ::core::option::Option< + runtime_types::polkadot_parachain::primitives::ValidationCode, + >, + pub head_data: runtime_types::polkadot_parachain::primitives::HeadData, + pub processed_downward_messages: _0, + pub hrmp_watermark: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateDescriptor<_0> { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub relay_parent: _0, + pub collator: runtime_types::polkadot_primitives::v4::collator_app::Public, + pub persisted_validation_data_hash: _0, + pub pov_hash: _0, + pub erasure_root: _0, + pub signature: runtime_types::polkadot_primitives::v4::collator_app::Signature, + pub para_head: _0, + pub validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidateReceipt<_0> { + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub commitments_hash: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CommittedCandidateReceipt<_0> { + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub commitments: runtime_types::polkadot_primitives::v4::CandidateCommitments< + ::core::primitive::u32, + >, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct CoreIndex(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum CoreOccupied { + #[codec(index = 0)] + Parathread(runtime_types::polkadot_primitives::v4::ParathreadEntry), + #[codec(index = 1)] + Parachain, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputeState<_0> { + pub validators_for: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub validators_against: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub start: _0, + pub concluded_at: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DisputeStatement { + #[codec(index = 0)] + Valid(runtime_types::polkadot_primitives::v4::ValidDisputeStatementKind), + #[codec(index = 1)] + Invalid(runtime_types::polkadot_primitives::v4::InvalidDisputeStatementKind), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputeStatementSet { + pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, + pub session: ::core::primitive::u32, + pub statements: ::std::vec::Vec<( + runtime_types::polkadot_primitives::v4::DisputeStatement, + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Signature, + )>, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct GroupIndex(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct IndexedVec<_0, _1>( + pub ::std::vec::Vec<_1>, + #[codec(skip)] pub ::core::marker::PhantomData<_0>, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct InherentData<_0> { + pub bitfields: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::signed::UncheckedSigned< + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + >, + >, + pub backed_candidates: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::BackedCandidate< + ::subxt::utils::H256, + >, + >, + pub disputes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::DisputeStatementSet, + >, + pub parent_header: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum InvalidDisputeStatementKind { + #[codec(index = 0)] + Explicit, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParathreadClaim( + pub runtime_types::polkadot_parachain::primitives::Id, + pub runtime_types::polkadot_primitives::v4::collator_app::Public, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParathreadEntry { + pub claim: runtime_types::polkadot_primitives::v4::ParathreadClaim, + pub retries: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PvfCheckStatement { + pub accept: ::core::primitive::bool, + pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub session_index: ::core::primitive::u32, + pub validator_index: runtime_types::polkadot_primitives::v4::ValidatorIndex, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PvfExecTimeoutKind { + #[codec(index = 0)] + Backing, + #[codec(index = 1)] + Approval, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PvfPrepTimeoutKind { + #[codec(index = 0)] + Precheck, + #[codec(index = 1)] + Lenient, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ScrapedOnChainVotes<_0> { + pub session: ::core::primitive::u32, + pub backing_validators_per_candidate: ::std::vec::Vec<( + runtime_types::polkadot_primitives::v4::CandidateReceipt<_0>, + ::std::vec::Vec<( + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::ValidityAttestation, + )>, + )>, + pub disputes: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::DisputeStatementSet, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SessionInfo { + pub active_validator_indices: + ::std::vec::Vec, + pub random_seed: [::core::primitive::u8; 32usize], + pub dispute_period: ::core::primitive::u32, + pub validators: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::ValidatorIndex, + runtime_types::polkadot_primitives::v4::validator_app::Public, + >, + pub discovery_keys: + ::std::vec::Vec, + pub assignment_keys: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::assignment_app::Public, + >, + pub validator_groups: runtime_types::polkadot_primitives::v4::IndexedVec< + runtime_types::polkadot_primitives::v4::GroupIndex, + ::std::vec::Vec, + >, + pub n_cores: ::core::primitive::u32, + pub zeroth_delay_tranche_width: ::core::primitive::u32, + pub relay_vrf_modulo_samples: ::core::primitive::u32, + pub n_delay_tranches: ::core::primitive::u32, + pub no_show_slots: ::core::primitive::u32, + pub needed_approvals: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UpgradeGoAhead { + #[codec(index = 0)] + Abort, + #[codec(index = 1)] + GoAhead, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UpgradeRestriction { + #[codec(index = 0)] + Present, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ValidDisputeStatementKind { + #[codec(index = 0)] + Explicit, + #[codec(index = 1)] + BackingSeconded(::subxt::utils::H256), + #[codec(index = 2)] + BackingValid(::subxt::utils::H256), + #[codec(index = 3)] + ApprovalChecking, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct ValidatorIndex(pub ::core::primitive::u32); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ValidityAttestation { + #[codec(index = 1)] + Implicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), + #[codec(index = 2)] + Explicit(runtime_types::polkadot_primitives::v4::validator_app::Signature), + } + } + pub mod vstaging { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AsyncBackingParams { + pub max_candidate_depth: ::core::primitive::u32, + pub allowed_ancestry_len: ::core::primitive::u32, + } + } + } + pub mod polkadot_runtime_common { + use super::runtime_types; + pub mod assigned_slots { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] assign_perm_parachain_slot { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , # [codec (index = 1)] assign_temp_parachain_slot { id : runtime_types :: polkadot_parachain :: primitives :: Id , lease_period_start : runtime_types :: polkadot_runtime_common :: assigned_slots :: SlotLeasePeriodStart , } , # [codec (index = 2)] unassign_parachain_slot { id : runtime_types :: polkadot_parachain :: primitives :: Id , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + ParaDoesntExist, + #[codec(index = 1)] + NotParathread, + #[codec(index = 2)] + CannotUpgrade, + #[codec(index = 3)] + CannotDowngrade, + #[codec(index = 4)] + SlotAlreadyAssigned, + #[codec(index = 5)] + SlotNotAssigned, + #[codec(index = 6)] + OngoingLeaseExists, + #[codec(index = 7)] + MaxPermanentSlotsExceeded, + #[codec(index = 8)] + MaxTemporarySlotsExceeded, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + PermanentSlotAssigned(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 1)] + TemporarySlotAssigned(runtime_types::polkadot_parachain::primitives::Id), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParachainTemporarySlot<_0, _1> { + pub manager: _0, + pub period_begin: _1, + pub period_count: _1, + pub last_lease: ::core::option::Option<_1>, + pub lease_count: _1, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum SlotLeasePeriodStart { + #[codec(index = 0)] + Current, + #[codec(index = 1)] + Next, + } + } + pub mod auctions { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + new_auction { + #[codec(compact)] + duration: ::core::primitive::u32, + #[codec(compact)] + lease_period_index: ::core::primitive::u32, + }, + #[codec(index = 1)] + bid { + #[codec(compact)] + para: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + auction_index: ::core::primitive::u32, + #[codec(compact)] + first_slot: ::core::primitive::u32, + #[codec(compact)] + last_slot: ::core::primitive::u32, + #[codec(compact)] + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + cancel_auction, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + AuctionInProgress, + #[codec(index = 1)] + LeasePeriodInPast, + #[codec(index = 2)] + ParaNotRegistered, + #[codec(index = 3)] + NotCurrentAuction, + #[codec(index = 4)] + NotAuction, + #[codec(index = 5)] + AuctionEnded, + #[codec(index = 6)] + AlreadyLeasedOut, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + AuctionStarted { + auction_index: ::core::primitive::u32, + lease_period: ::core::primitive::u32, + ending: ::core::primitive::u32, + }, + #[codec(index = 1)] + AuctionClosed { auction_index: ::core::primitive::u32 }, + #[codec(index = 2)] + Reserved { + bidder: ::sp_core::crypto::AccountId32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + Unreserved { + bidder: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 4)] + ReserveConfiscated { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, + #[codec(index = 5)] + BidAccepted { + bidder: ::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + first_slot: ::core::primitive::u32, + last_slot: ::core::primitive::u32, + }, + #[codec(index = 6)] + WinningOffset { + auction_index: ::core::primitive::u32, + block_number: ::core::primitive::u32, + }, + } + } + } + pub mod crowdloan { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + create { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + cap: ::core::primitive::u128, + #[codec(compact)] + first_period: ::core::primitive::u32, + #[codec(compact)] + last_period: ::core::primitive::u32, + #[codec(compact)] + end: ::core::primitive::u32, + verifier: + ::core::option::Option, + }, + #[codec(index = 1)] + contribute { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + value: ::core::primitive::u128, + signature: + ::core::option::Option, + }, + #[codec(index = 2)] + withdraw { + who: ::sp_core::crypto::AccountId32, + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 3)] + refund { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + dissolve { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 5)] + edit { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + #[codec(compact)] + cap: ::core::primitive::u128, + #[codec(compact)] + first_period: ::core::primitive::u32, + #[codec(compact)] + last_period: ::core::primitive::u32, + #[codec(compact)] + end: ::core::primitive::u32, + verifier: + ::core::option::Option, + }, + #[codec(index = 6)] + add_memo { + index: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 7)] + poke { index: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 8)] + contribute_all { + #[codec(compact)] + index: runtime_types::polkadot_parachain::primitives::Id, + signature: + ::core::option::Option, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + FirstPeriodInPast, + #[codec(index = 1)] + FirstPeriodTooFarInFuture, + #[codec(index = 2)] + LastPeriodBeforeFirstPeriod, + #[codec(index = 3)] + LastPeriodTooFarInFuture, + #[codec(index = 4)] + CannotEndInPast, + #[codec(index = 5)] + EndTooFarInFuture, + #[codec(index = 6)] + Overflow, + #[codec(index = 7)] + ContributionTooSmall, + #[codec(index = 8)] + InvalidParaId, + #[codec(index = 9)] + CapExceeded, + #[codec(index = 10)] + ContributionPeriodOver, + #[codec(index = 11)] + InvalidOrigin, + #[codec(index = 12)] + NotParachain, + #[codec(index = 13)] + LeaseActive, + #[codec(index = 14)] + BidOrLeaseActive, + #[codec(index = 15)] + FundNotEnded, + #[codec(index = 16)] + NoContributions, + #[codec(index = 17)] + NotReadyToDissolve, + #[codec(index = 18)] + InvalidSignature, + #[codec(index = 19)] + MemoTooLarge, + #[codec(index = 20)] + AlreadyInNewRaise, + #[codec(index = 21)] + VrfDelayInProgress, + #[codec(index = 22)] + NoLeasePeriod, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Created { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 1)] + Contributed { + who: ::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, + #[codec(index = 2)] + Withdrew { + who: ::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, + #[codec(index = 3)] + PartiallyRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + AllRefunded { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 5)] + Dissolved { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 6)] + HandleBidResult { + para_id: runtime_types::polkadot_parachain::primitives::Id, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 7)] + Edited { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 8)] + MemoUpdated { + who: ::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 9)] + AddedToNewRaise { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct FundInfo<_0, _1, _2, _3> { + pub depositor: _0, + pub verifier: ::core::option::Option, + pub deposit: _1, + pub raised: _1, + pub end: _2, + pub cap: _1, + pub last_contribution: + runtime_types::polkadot_runtime_common::crowdloan::LastContribution<_2>, + pub first_period: _2, + pub last_period: _2, + pub fund_index: _2, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_3>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum LastContribution<_0> { + #[codec(index = 0)] + Never, + #[codec(index = 1)] + PreEnding(_0), + #[codec(index = 2)] + Ending(_0), + } + } + pub mod paras_registrar { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + register { + id: runtime_types::polkadot_parachain::primitives::Id, + genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 1)] + force_register { + who: ::sp_core::crypto::AccountId32, + deposit: ::core::primitive::u128, + id: runtime_types::polkadot_parachain::primitives::Id, + genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 2)] + deregister { id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 3)] + swap { + id: runtime_types::polkadot_parachain::primitives::Id, + other: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + remove_lock { para: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 5)] + reserve, + #[codec(index = 6)] + add_lock { para: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 7)] + schedule_code_upgrade { + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 8)] + set_current_head { + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotRegistered, + #[codec(index = 1)] + AlreadyRegistered, + #[codec(index = 2)] + NotOwner, + #[codec(index = 3)] + CodeTooLarge, + #[codec(index = 4)] + HeadDataTooLarge, + #[codec(index = 5)] + NotParachain, + #[codec(index = 6)] + NotParathread, + #[codec(index = 7)] + CannotDeregister, + #[codec(index = 8)] + CannotDowngrade, + #[codec(index = 9)] + CannotUpgrade, + #[codec(index = 10)] + ParaLocked, + #[codec(index = 11)] + NotReserved, + #[codec(index = 12)] + EmptyCode, + #[codec(index = 13)] + CannotSwap, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + Registered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + manager: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 1)] + Deregistered { para_id: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 2)] + Reserved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + who: ::sp_core::crypto::AccountId32, + }, + #[codec(index = 3)] + Swapped { + para_id: runtime_types::polkadot_parachain::primitives::Id, + other_id: runtime_types::polkadot_parachain::primitives::Id, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParaInfo<_0, _1> { + pub manager: _0, + pub deposit: _1, + pub locked: ::core::primitive::bool, + } + } + pub mod paras_sudo_wrapper { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + sudo_schedule_para_initialize { + id: runtime_types::polkadot_parachain::primitives::Id, + genesis: + runtime_types::polkadot_runtime_parachains::paras::ParaGenesisArgs, + }, + #[codec(index = 1)] + sudo_schedule_para_cleanup { + id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 2)] + sudo_schedule_parathread_upgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 3)] + sudo_schedule_parachain_downgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 4)] + sudo_queue_downward_xcm { + id: runtime_types::polkadot_parachain::primitives::Id, + xcm: ::std::boxed::Box, + }, + #[codec(index = 5)] + sudo_establish_hrmp_channel { + sender: runtime_types::polkadot_parachain::primitives::Id, + recipient: runtime_types::polkadot_parachain::primitives::Id, + max_capacity: ::core::primitive::u32, + max_message_size: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + ParaDoesntExist, + #[codec(index = 1)] + ParaAlreadyExists, + #[codec(index = 2)] + ExceedsMaxMessageSize, + #[codec(index = 3)] + CouldntCleanup, + #[codec(index = 4)] + NotParathread, + #[codec(index = 5)] + NotParachain, + #[codec(index = 6)] + CannotUpgrade, + #[codec(index = 7)] + CannotDowngrade, + } + } + } + pub mod slots { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_lease { + para: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + clear_all_leases { para: runtime_types::polkadot_parachain::primitives::Id }, + #[codec(index = 2)] + trigger_onboard { para: runtime_types::polkadot_parachain::primitives::Id }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + ParaNotOnboarding, + #[codec(index = 1)] + LeaseError, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + NewLeasePeriod { lease_period: ::core::primitive::u32 }, + #[codec(index = 1)] + Leased { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::sp_core::crypto::AccountId32, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, + } + } + } + } + pub mod polkadot_runtime_parachains { + use super::runtime_types; + pub mod configuration { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + # [codec (index = 0)] set_validation_upgrade_cooldown { new : :: core :: primitive :: u32 , } , # [codec (index = 1)] set_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 2)] set_code_retention_period { new : :: core :: primitive :: u32 , } , # [codec (index = 3)] set_max_code_size { new : :: core :: primitive :: u32 , } , # [codec (index = 4)] set_max_pov_size { new : :: core :: primitive :: u32 , } , # [codec (index = 5)] set_max_head_data_size { new : :: core :: primitive :: u32 , } , # [codec (index = 6)] set_parathread_cores { new : :: core :: primitive :: u32 , } , # [codec (index = 7)] set_parathread_retries { new : :: core :: primitive :: u32 , } , # [codec (index = 8)] set_group_rotation_frequency { new : :: core :: primitive :: u32 , } , # [codec (index = 9)] set_chain_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 10)] set_thread_availability_period { new : :: core :: primitive :: u32 , } , # [codec (index = 11)] set_scheduling_lookahead { new : :: core :: primitive :: u32 , } , # [codec (index = 12)] set_max_validators_per_core { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 13)] set_max_validators { new : :: core :: option :: Option < :: core :: primitive :: u32 > , } , # [codec (index = 14)] set_dispute_period { new : :: core :: primitive :: u32 , } , # [codec (index = 15)] set_dispute_post_conclusion_acceptance_period { new : :: core :: primitive :: u32 , } , # [codec (index = 18)] set_no_show_slots { new : :: core :: primitive :: u32 , } , # [codec (index = 19)] set_n_delay_tranches { new : :: core :: primitive :: u32 , } , # [codec (index = 20)] set_zeroth_delay_tranche_width { new : :: core :: primitive :: u32 , } , # [codec (index = 21)] set_needed_approvals { new : :: core :: primitive :: u32 , } , # [codec (index = 22)] set_relay_vrf_modulo_samples { new : :: core :: primitive :: u32 , } , # [codec (index = 23)] set_max_upward_queue_count { new : :: core :: primitive :: u32 , } , # [codec (index = 24)] set_max_upward_queue_size { new : :: core :: primitive :: u32 , } , # [codec (index = 25)] set_max_downward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 27)] set_max_upward_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 28)] set_max_upward_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 29)] set_hrmp_open_request_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 30)] set_hrmp_sender_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 31)] set_hrmp_recipient_deposit { new : :: core :: primitive :: u128 , } , # [codec (index = 32)] set_hrmp_channel_max_capacity { new : :: core :: primitive :: u32 , } , # [codec (index = 33)] set_hrmp_channel_max_total_size { new : :: core :: primitive :: u32 , } , # [codec (index = 34)] set_hrmp_max_parachain_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 35)] set_hrmp_max_parathread_inbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 36)] set_hrmp_channel_max_message_size { new : :: core :: primitive :: u32 , } , # [codec (index = 37)] set_hrmp_max_parachain_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 38)] set_hrmp_max_parathread_outbound_channels { new : :: core :: primitive :: u32 , } , # [codec (index = 39)] set_hrmp_max_message_num_per_candidate { new : :: core :: primitive :: u32 , } , # [codec (index = 41)] set_pvf_checking_enabled { new : :: core :: primitive :: bool , } , # [codec (index = 42)] set_pvf_voting_ttl { new : :: core :: primitive :: u32 , } , # [codec (index = 43)] set_minimum_validation_upgrade_delay { new : :: core :: primitive :: u32 , } , # [codec (index = 44)] set_bypass_consistency_check { new : :: core :: primitive :: bool , } , # [codec (index = 45)] set_async_backing_params { new : runtime_types :: polkadot_primitives :: vstaging :: AsyncBackingParams , } , # [codec (index = 46)] set_executor_params { new : runtime_types :: polkadot_primitives :: v4 :: executor_params :: ExecutorParams , } , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + InvalidNewValue, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HostConfiguration<_0> { + pub max_code_size: _0, + pub max_head_data_size: _0, + pub max_upward_queue_count: _0, + pub max_upward_queue_size: _0, + pub max_upward_message_size: _0, + pub max_upward_message_num_per_candidate: _0, + pub hrmp_max_message_num_per_candidate: _0, + pub validation_upgrade_cooldown: _0, + pub validation_upgrade_delay: _0, + pub async_backing_params: + runtime_types::polkadot_primitives::vstaging::AsyncBackingParams, + pub max_pov_size: _0, + pub max_downward_message_size: _0, + pub hrmp_max_parachain_outbound_channels: _0, + pub hrmp_max_parathread_outbound_channels: _0, + pub hrmp_sender_deposit: ::core::primitive::u128, + pub hrmp_recipient_deposit: ::core::primitive::u128, + pub hrmp_channel_max_capacity: _0, + pub hrmp_channel_max_total_size: _0, + pub hrmp_max_parachain_inbound_channels: _0, + pub hrmp_max_parathread_inbound_channels: _0, + pub hrmp_channel_max_message_size: _0, + pub executor_params: + runtime_types::polkadot_primitives::v4::executor_params::ExecutorParams, + pub code_retention_period: _0, + pub parathread_cores: _0, + pub parathread_retries: _0, + pub group_rotation_frequency: _0, + pub chain_availability_period: _0, + pub thread_availability_period: _0, + pub scheduling_lookahead: _0, + pub max_validators_per_core: ::core::option::Option<_0>, + pub max_validators: ::core::option::Option<_0>, + pub dispute_period: _0, + pub dispute_post_conclusion_acceptance_period: _0, + pub no_show_slots: _0, + pub n_delay_tranches: _0, + pub zeroth_delay_tranche_width: _0, + pub needed_approvals: _0, + pub relay_vrf_modulo_samples: _0, + pub pvf_checking_enabled: ::core::primitive::bool, + pub pvf_voting_ttl: _0, + pub minimum_validation_upgrade_delay: _0, + } + } + pub mod disputes { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_unfreeze, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + DuplicateDisputeStatementSets, + #[codec(index = 1)] + AncientDisputeStatement, + #[codec(index = 2)] + ValidatorIndexOutOfBounds, + #[codec(index = 3)] + InvalidSignature, + #[codec(index = 4)] + DuplicateStatement, + #[codec(index = 5)] + SingleSidedDispute, + #[codec(index = 6)] + MaliciousBacker, + #[codec(index = 7)] + MissingBackingVotes, + #[codec(index = 8)] + UnconfirmedDispute, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + DisputeInitiated( + runtime_types::polkadot_core_primitives::CandidateHash, + runtime_types::polkadot_runtime_parachains::disputes::DisputeLocation, + ), + #[codec(index = 1)] + DisputeConcluded( + runtime_types::polkadot_core_primitives::CandidateHash, + runtime_types::polkadot_runtime_parachains::disputes::DisputeResult, + ), + #[codec(index = 2)] + Revert(::core::primitive::u32), + } + } + pub mod slashing { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, + )] + pub enum Call { + # [codec (index = 0)] report_dispute_lost_unsigned { dispute_proof : :: std :: boxed :: Box < runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputeProof > , key_owner_proof : :: sp_session :: MembershipProof , } , } + #[derive( + :: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq, + )] + pub enum Error { + #[codec(index = 0)] + InvalidKeyOwnershipProof, + #[codec(index = 1)] + InvalidSessionIndex, + #[codec(index = 2)] + InvalidCandidateHash, + #[codec(index = 3)] + InvalidValidatorIndex, + #[codec(index = 4)] + ValidatorIndexIdMismatch, + #[codec(index = 5)] + DuplicateSlashingReport, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputeProof { pub time_slot : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: DisputesTimeSlot , pub kind : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: SlashingOffenceKind , pub validator_index : runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex , pub validator_id : runtime_types :: polkadot_primitives :: v4 :: validator_app :: Public , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DisputesTimeSlot { + pub session_index: ::core::primitive::u32, + pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PendingSlashes { pub keys : :: subxt :: utils :: KeyedVec < runtime_types :: polkadot_primitives :: v4 :: ValidatorIndex , runtime_types :: polkadot_primitives :: v4 :: validator_app :: Public > , pub kind : runtime_types :: polkadot_runtime_parachains :: disputes :: slashing :: SlashingOffenceKind , } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum SlashingOffenceKind { + #[codec(index = 0)] + ForInvalid, + #[codec(index = 1)] + AgainstValid, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DisputeLocation { + #[codec(index = 0)] + Local, + #[codec(index = 1)] + Remote, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DisputeResult { + #[codec(index = 0)] + Valid, + #[codec(index = 1)] + Invalid, + } + } + pub mod hrmp { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + hrmp_init_open_channel { + recipient: runtime_types::polkadot_parachain::primitives::Id, + proposed_max_capacity: ::core::primitive::u32, + proposed_max_message_size: ::core::primitive::u32, + }, + #[codec(index = 1)] + hrmp_accept_open_channel { + sender: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 2)] + hrmp_close_channel { + channel_id: + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + }, + #[codec(index = 3)] + force_clean_hrmp { + para: runtime_types::polkadot_parachain::primitives::Id, + inbound: ::core::primitive::u32, + outbound: ::core::primitive::u32, + }, + #[codec(index = 4)] + force_process_hrmp_open { channels: ::core::primitive::u32 }, + #[codec(index = 5)] + force_process_hrmp_close { channels: ::core::primitive::u32 }, + #[codec(index = 6)] + hrmp_cancel_open_request { + channel_id: + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + open_requests: ::core::primitive::u32, + }, + #[codec(index = 7)] + force_open_hrmp_channel { + sender: runtime_types::polkadot_parachain::primitives::Id, + recipient: runtime_types::polkadot_parachain::primitives::Id, + max_capacity: ::core::primitive::u32, + max_message_size: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + OpenHrmpChannelToSelf, + #[codec(index = 1)] + OpenHrmpChannelInvalidRecipient, + #[codec(index = 2)] + OpenHrmpChannelZeroCapacity, + #[codec(index = 3)] + OpenHrmpChannelCapacityExceedsLimit, + #[codec(index = 4)] + OpenHrmpChannelZeroMessageSize, + #[codec(index = 5)] + OpenHrmpChannelMessageSizeExceedsLimit, + #[codec(index = 6)] + OpenHrmpChannelAlreadyExists, + #[codec(index = 7)] + OpenHrmpChannelAlreadyRequested, + #[codec(index = 8)] + OpenHrmpChannelLimitExceeded, + #[codec(index = 9)] + AcceptHrmpChannelDoesntExist, + #[codec(index = 10)] + AcceptHrmpChannelAlreadyConfirmed, + #[codec(index = 11)] + AcceptHrmpChannelLimitExceeded, + #[codec(index = 12)] + CloseHrmpChannelUnauthorized, + #[codec(index = 13)] + CloseHrmpChannelDoesntExist, + #[codec(index = 14)] + CloseHrmpChannelAlreadyUnderway, + #[codec(index = 15)] + CancelHrmpOpenChannelUnauthorized, + #[codec(index = 16)] + OpenHrmpChannelDoesntExist, + #[codec(index = 17)] + OpenHrmpChannelAlreadyConfirmed, + #[codec(index = 18)] + WrongWitness, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + OpenChannelRequested( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + #[codec(index = 1)] + OpenChannelCanceled( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ), + #[codec(index = 2)] + OpenChannelAccepted( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 3)] + ChannelClosed( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::HrmpChannelId, + ), + #[codec(index = 4)] + HrmpChannelForceOpened( + runtime_types::polkadot_parachain::primitives::Id, + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ::core::primitive::u32, + ), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpChannel { + pub max_capacity: ::core::primitive::u32, + pub max_total_size: ::core::primitive::u32, + pub max_message_size: ::core::primitive::u32, + pub msg_count: ::core::primitive::u32, + pub total_size: ::core::primitive::u32, + pub mqc_head: ::core::option::Option<::subxt::utils::H256>, + pub sender_deposit: ::core::primitive::u128, + pub recipient_deposit: ::core::primitive::u128, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct HrmpOpenChannelRequest { + pub confirmed: ::core::primitive::bool, + pub _age: ::core::primitive::u32, + pub sender_deposit: ::core::primitive::u128, + pub max_message_size: ::core::primitive::u32, + pub max_capacity: ::core::primitive::u32, + pub max_total_size: ::core::primitive::u32, + } + } + pub mod inclusion { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call {} + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + UnsortedOrDuplicateValidatorIndices, + #[codec(index = 1)] + UnsortedOrDuplicateDisputeStatementSet, + #[codec(index = 2)] + UnsortedOrDuplicateBackedCandidates, + #[codec(index = 3)] + UnexpectedRelayParent, + #[codec(index = 4)] + WrongBitfieldSize, + #[codec(index = 5)] + BitfieldAllZeros, + #[codec(index = 6)] + BitfieldDuplicateOrUnordered, + #[codec(index = 7)] + ValidatorIndexOutOfBounds, + #[codec(index = 8)] + InvalidBitfieldSignature, + #[codec(index = 9)] + UnscheduledCandidate, + #[codec(index = 10)] + CandidateScheduledBeforeParaFree, + #[codec(index = 11)] + WrongCollator, + #[codec(index = 12)] + ScheduledOutOfOrder, + #[codec(index = 13)] + HeadDataTooLarge, + #[codec(index = 14)] + PrematureCodeUpgrade, + #[codec(index = 15)] + NewCodeTooLarge, + #[codec(index = 16)] + CandidateNotInParentContext, + #[codec(index = 17)] + InvalidGroupIndex, + #[codec(index = 18)] + InsufficientBacking, + #[codec(index = 19)] + InvalidBacking, + #[codec(index = 20)] + NotCollatorSigned, + #[codec(index = 21)] + ValidationDataHashMismatch, + #[codec(index = 22)] + IncorrectDownwardMessageHandling, + #[codec(index = 23)] + InvalidUpwardMessages, + #[codec(index = 24)] + HrmpWatermarkMishandling, + #[codec(index = 25)] + InvalidOutboundHrmp, + #[codec(index = 26)] + InvalidValidationCodeHash, + #[codec(index = 27)] + ParaHeadMismatch, + #[codec(index = 28)] + BitfieldReferencesFreedCore, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + CandidateBacked( + runtime_types::polkadot_primitives::v4::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, + ), + #[codec(index = 1)] + CandidateIncluded( + runtime_types::polkadot_primitives::v4::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + runtime_types::polkadot_primitives::v4::GroupIndex, + ), + #[codec(index = 2)] + CandidateTimedOut( + runtime_types::polkadot_primitives::v4::CandidateReceipt< + ::subxt::utils::H256, + >, + runtime_types::polkadot_parachain::primitives::HeadData, + runtime_types::polkadot_primitives::v4::CoreIndex, + ), + #[codec(index = 3)] + UpwardMessagesReceived { + from: runtime_types::polkadot_parachain::primitives::Id, + count: ::core::primitive::u32, + }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AggregateMessageOrigin { + #[codec(index = 0)] + Ump(runtime_types::polkadot_runtime_parachains::inclusion::UmpQueueId), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct AvailabilityBitfieldRecord<_0> { + pub bitfield: runtime_types::polkadot_primitives::v4::AvailabilityBitfield, + pub submitted_at: _0, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CandidatePendingAvailability<_0, _1> { + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, + pub hash: runtime_types::polkadot_core_primitives::CandidateHash, + pub descriptor: runtime_types::polkadot_primitives::v4::CandidateDescriptor<_0>, + pub availability_votes: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub backers: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub relay_parent_number: _1, + pub backed_in_number: _1, + pub backing_group: runtime_types::polkadot_primitives::v4::GroupIndex, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum UmpQueueId { + #[codec(index = 0)] + Para(runtime_types::polkadot_parachain::primitives::Id), + } + } + pub mod initializer { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_approve { up_to: ::core::primitive::u32 }, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BufferedSessionChange { + pub validators: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::validator_app::Public, + >, + pub queued: ::std::vec::Vec< + runtime_types::polkadot_primitives::v4::validator_app::Public, + >, + pub session_index: ::core::primitive::u32, + } + } + pub mod origin { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Origin { + #[codec(index = 0)] + Parachain(runtime_types::polkadot_parachain::primitives::Id), + } + } + } + pub mod paras { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + force_set_current_code { + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 1)] + force_set_current_head { + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + }, + #[codec(index = 2)] + force_schedule_code_upgrade { + para: runtime_types::polkadot_parachain::primitives::Id, + new_code: runtime_types::polkadot_parachain::primitives::ValidationCode, + relay_parent_number: ::core::primitive::u32, + }, + #[codec(index = 3)] + force_note_new_head { + para: runtime_types::polkadot_parachain::primitives::Id, + new_head: runtime_types::polkadot_parachain::primitives::HeadData, + }, + #[codec(index = 4)] + force_queue_action { + para: runtime_types::polkadot_parachain::primitives::Id, + }, + #[codec(index = 5)] + add_trusted_validation_code { + validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + }, + #[codec(index = 6)] + poke_unused_validation_code { + validation_code_hash: + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + }, + #[codec(index = 7)] + include_pvf_check_statement { + stmt: runtime_types::polkadot_primitives::v4::PvfCheckStatement, + signature: + runtime_types::polkadot_primitives::v4::validator_app::Signature, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + NotRegistered, + #[codec(index = 1)] + CannotOnboard, + #[codec(index = 2)] + CannotOffboard, + #[codec(index = 3)] + CannotUpgrade, + #[codec(index = 4)] + CannotDowngrade, + #[codec(index = 5)] + PvfCheckStatementStale, + #[codec(index = 6)] + PvfCheckStatementFuture, + #[codec(index = 7)] + PvfCheckValidatorIndexOutOfBounds, + #[codec(index = 8)] + PvfCheckInvalidSignature, + #[codec(index = 9)] + PvfCheckDoubleVote, + #[codec(index = 10)] + PvfCheckSubjectInvalid, + #[codec(index = 11)] + CannotUpgradeCode, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Event { + #[codec(index = 0)] + CurrentCodeUpdated(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 1)] + CurrentHeadUpdated(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 2)] + CodeUpgradeScheduled(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 3)] + NewHeadNoted(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 4)] + ActionQueued( + runtime_types::polkadot_parachain::primitives::Id, + ::core::primitive::u32, + ), + #[codec(index = 5)] + PvfCheckStarted( + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 6)] + PvfCheckAccepted( + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::polkadot_parachain::primitives::Id, + ), + #[codec(index = 7)] + PvfCheckRejected( + runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + runtime_types::polkadot_parachain::primitives::Id, + ), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParaGenesisArgs { + pub genesis_head: runtime_types::polkadot_parachain::primitives::HeadData, + pub validation_code: + runtime_types::polkadot_parachain::primitives::ValidationCode, + pub para_kind: ::core::primitive::bool, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ParaLifecycle { + #[codec(index = 0)] + Onboarding, + #[codec(index = 1)] + Parathread, + #[codec(index = 2)] + Parachain, + #[codec(index = 3)] + UpgradingParathread, + #[codec(index = 4)] + DowngradingParachain, + #[codec(index = 5)] + OffboardingParathread, + #[codec(index = 6)] + OffboardingParachain, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParaPastCodeMeta<_0> { + pub upgrade_times: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::paras::ReplacementTimes<_0>, + >, + pub last_pruned: ::core::option::Option<_0>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PvfCheckActiveVoteState<_0> { + pub votes_accept: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub votes_reject: ::subxt::utils::bits::DecodedBits< + ::core::primitive::u8, + ::subxt::utils::bits::Lsb0, + >, + pub age: _0, + pub created_at: _0, + pub causes: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::paras::PvfCheckCause<_0>, + >, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PvfCheckCause<_0> { + #[codec(index = 0)] + Onboarding(runtime_types::polkadot_parachain::primitives::Id), + #[codec(index = 1)] + Upgrade { + id: runtime_types::polkadot_parachain::primitives::Id, + relay_parent_number: _0, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ReplacementTimes<_0> { + pub expected_at: _0, + pub activated_at: _0, + } + } + pub mod paras_inherent { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call { + #[codec(index = 0)] + enter { + data: runtime_types::polkadot_primitives::v4::InherentData< + ::sp_runtime::generic::Header< + ::core::primitive::u32, + ::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + TooManyInclusionInherents, + #[codec(index = 1)] + InvalidParentHeader, + #[codec(index = 2)] + CandidateConcludedInvalid, + #[codec(index = 3)] + InherentOverweight, + #[codec(index = 4)] + DisputeStatementsUnsortedOrDuplicates, + #[codec(index = 5)] + DisputeInvalid, + } + } + } + pub mod scheduler { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssignmentKind { + #[codec(index = 0)] + Parachain, + #[codec(index = 1)] + Parathread( + runtime_types::polkadot_primitives::v4::collator_app::Public, + ::core::primitive::u32, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct CoreAssignment { + pub core: runtime_types::polkadot_primitives::v4::CoreIndex, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub kind: runtime_types::polkadot_runtime_parachains::scheduler::AssignmentKind, + pub group_idx: runtime_types::polkadot_primitives::v4::GroupIndex, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ParathreadClaimQueue { + pub queue: ::std::vec::Vec< + runtime_types::polkadot_runtime_parachains::scheduler::QueuedParathread, + >, + pub next_core_offset: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct QueuedParathread { + pub claim: runtime_types::polkadot_primitives::v4::ParathreadEntry, + pub core_offset: ::core::primitive::u32, + } + } + pub mod shared { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Call {} + } + } + } + pub mod sp_arithmetic { + use super::runtime_types; + pub mod fixed_point { + use super::runtime_types; + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct FixedU128(pub ::core::primitive::u128); + } + pub mod per_things { + use super::runtime_types; + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct PerU16(pub ::core::primitive::u16); + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Perbill(pub ::core::primitive::u32); + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Percent(pub ::core::primitive::u8); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ArithmeticError { + #[codec(index = 0)] + Underflow, + #[codec(index = 1)] + Overflow, + #[codec(index = 2)] + DivisionByZero, + } + } + pub mod sp_authority_discovery { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + } + pub mod sp_consensus_babe { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + } + pub mod digests { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NextConfigDescriptor { + #[codec(index = 1)] + V1 { + c: (::core::primitive::u64, ::core::primitive::u64), + allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum PreDigest { + #[codec(index = 1)] + Primary(runtime_types::sp_consensus_babe::digests::PrimaryPreDigest), + #[codec(index = 2)] + SecondaryPlain( + runtime_types::sp_consensus_babe::digests::SecondaryPlainPreDigest, + ), + #[codec(index = 3)] + SecondaryVRF(runtime_types::sp_consensus_babe::digests::SecondaryVRFPreDigest), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PrimaryPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SecondaryPlainPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SecondaryVRFPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_signature: runtime_types::sp_core::sr25519::vrf::VrfSignature, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AllowedSlots { + #[codec(index = 0)] + PrimarySlots, + #[codec(index = 1)] + PrimaryAndSecondaryPlainSlots, + #[codec(index = 2)] + PrimaryAndSecondaryVRFSlots, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct BabeEpochConfiguration { + pub c: (::core::primitive::u64, ::core::primitive::u64), + pub allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, + } + } + pub mod sp_consensus_grandpa { + use super::runtime_types; + pub mod app { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub runtime_types::sp_core::ed25519::Public); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub runtime_types::sp_core::ed25519::Signature); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Equivocation<_0, _1> { + #[codec(index = 0)] + Prevote( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Prevote<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + #[codec(index = 1)] + Precommit( + runtime_types::finality_grandpa::Equivocation< + runtime_types::sp_consensus_grandpa::app::Public, + runtime_types::finality_grandpa::Precommit<_0, _1>, + runtime_types::sp_consensus_grandpa::app::Signature, + >, + ), + } + } + pub mod sp_consensus_slots { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct EquivocationProof<_0, _1> { + pub offender: _1, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub first_header: _0, + pub second_header: _0, + } + #[derive( + :: codec :: Decode, + :: codec :: Encode, + :: subxt :: ext :: codec :: CompactAs, + Clone, + Debug, + PartialEq, + )] + pub struct Slot(pub ::core::primitive::u64); + } + pub mod sp_core { + use super::runtime_types; + pub mod crypto { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct KeyTypeId(pub [::core::primitive::u8; 4usize]); + } + pub mod ecdsa { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub [::core::primitive::u8; 33usize]); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub [::core::primitive::u8; 65usize]); + } + pub mod ed25519 { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + pub mod offchain { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueMultiaddr(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaqueNetworkState { + pub peer_id: runtime_types::sp_core::OpaquePeerId, + pub external_addresses: + ::std::vec::Vec, + } + } + pub mod sr25519 { + use super::runtime_types; + pub mod vrf { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct VrfSignature { + pub output: [::core::primitive::u8; 32usize], + pub proof: [::core::primitive::u8; 64usize], + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Public(pub [::core::primitive::u8; 32usize]); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Signature(pub [::core::primitive::u8; 64usize]); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OpaquePeerId(pub ::std::vec::Vec<::core::primitive::u8>); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Void {} + } + pub mod sp_npos_elections { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ElectionScore { + pub minimal_stake: ::core::primitive::u128, + pub sum_stake: ::core::primitive::u128, + pub sum_stake_squared: ::core::primitive::u128, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Support<_0> { + pub total: ::core::primitive::u128, + pub voters: ::std::vec::Vec<(_0, ::core::primitive::u128)>, + } + } + pub mod sp_runtime { + use super::runtime_types; + pub mod generic { + use super::runtime_types; + pub mod digest { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DigestItem { + #[codec(index = 6)] + PreRuntime( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 4)] + Consensus( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 5)] + Seal( + [::core::primitive::u8; 4usize], + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 0)] + Other(::std::vec::Vec<::core::primitive::u8>), + #[codec(index = 8)] + RuntimeEnvironmentUpdated, + } + } + pub mod unchecked_extrinsic { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + pub ::std::vec::Vec<::core::primitive::u8>, + #[codec(skip)] pub ::core::marker::PhantomData<(_0, _1, _2, _3)>, + ); + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum DispatchError { + #[codec(index = 0)] + Other, + #[codec(index = 1)] + CannotLookup, + #[codec(index = 2)] + BadOrigin, + #[codec(index = 3)] + Module(runtime_types::sp_runtime::ModuleError), + #[codec(index = 4)] + ConsumerRemaining, + #[codec(index = 5)] + NoProviders, + #[codec(index = 6)] + TooManyConsumers, + #[codec(index = 7)] + Token(runtime_types::sp_runtime::TokenError), + #[codec(index = 8)] + Arithmetic(runtime_types::sp_arithmetic::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + #[codec(index = 10)] + Exhausted, + #[codec(index = 11)] + Corruption, + #[codec(index = 12)] + Unavailable, + #[codec(index = 13)] + RootNotAllowed, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiSignature { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Signature), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Signature), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Signature), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiSigner { + #[codec(index = 0)] + Ed25519(runtime_types::sp_core::ed25519::Public), + #[codec(index = 1)] + Sr25519(runtime_types::sp_core::sr25519::Public), + #[codec(index = 2)] + Ecdsa(runtime_types::sp_core::ecdsa::Public), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum TokenError { + #[codec(index = 0)] + FundsUnavailable, + #[codec(index = 1)] + OnlyProvider, + #[codec(index = 2)] + BelowMinimum, + #[codec(index = 3)] + CannotCreate, + #[codec(index = 4)] + UnknownAsset, + #[codec(index = 5)] + Frozen, + #[codec(index = 6)] + Unsupported, + #[codec(index = 7)] + CannotCreateHold, + #[codec(index = 8)] + NotExpendable, + #[codec(index = 9)] + Blocked, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } + } + pub mod sp_staking { + use super::runtime_types; + pub mod offence { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct OffenceDetails<_0, _1> { + pub offender: _1, + pub reporters: ::std::vec::Vec<_0>, + } + } + } + pub mod sp_version { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RuntimeVersion { + pub spec_name: ::std::string::String, + pub impl_name: ::std::string::String, + pub authoring_version: ::core::primitive::u32, + pub spec_version: ::core::primitive::u32, + pub impl_version: ::core::primitive::u32, + pub apis: + ::std::vec::Vec<([::core::primitive::u8; 8usize], ::core::primitive::u32)>, + pub transaction_version: ::core::primitive::u32, + pub state_version: ::core::primitive::u8, + } + } + pub mod sp_weights { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + } + pub mod westend_runtime { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct NposCompactSolution16 { + pub votes1: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes2: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + ( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ), + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes3: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 2usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes4: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 3usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes5: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 4usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes6: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 5usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes7: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 6usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes8: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 7usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes9: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 8usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes10: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 9usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes11: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 10usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes12: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 11usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes13: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 12usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes14: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 13usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes15: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 14usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + pub votes16: ::std::vec::Vec<( + ::subxt::ext::codec::Compact<::core::primitive::u32>, + [( + ::subxt::ext::codec::Compact<::core::primitive::u16>, + ::subxt::ext::codec::Compact< + runtime_types::sp_arithmetic::per_things::PerU16, + >, + ); 15usize], + ::subxt::ext::codec::Compact<::core::primitive::u16>, + )>, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum OriginCaller { + #[codec(index = 0)] + system( + runtime_types::frame_support::dispatch::RawOrigin< + ::sp_core::crypto::AccountId32, + >, + ), + #[codec(index = 41)] + ParachainsOrigin( + runtime_types::polkadot_runtime_parachains::origin::pallet::Origin, + ), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Origin), + #[codec(index = 3)] + Void(runtime_types::sp_core::Void), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum ProxyType { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + NonTransfer, + #[codec(index = 2)] + Staking, + #[codec(index = 3)] + SudoBalances, + #[codec(index = 4)] + IdentityJudgement, + #[codec(index = 5)] + CancelProxy, + #[codec(index = 6)] + Auction, + #[codec(index = 7)] + NominationPools, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Runtime; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeCall { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Call), + #[codec(index = 1)] + Babe(runtime_types::pallet_babe::pallet::Call), + #[codec(index = 2)] + Timestamp(runtime_types::pallet_timestamp::pallet::Call), + #[codec(index = 3)] + Indices(runtime_types::pallet_indices::pallet::Call), + #[codec(index = 4)] + Balances(runtime_types::pallet_balances::pallet::Call), + #[codec(index = 6)] + Staking(runtime_types::pallet_staking::pallet::pallet::Call), + #[codec(index = 8)] + Session(runtime_types::pallet_session::pallet::Call), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Call), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Call), + #[codec(index = 16)] + Utility(runtime_types::pallet_utility::pallet::Call), + #[codec(index = 17)] + Identity(runtime_types::pallet_identity::pallet::Call), + #[codec(index = 18)] + Recovery(runtime_types::pallet_recovery::pallet::Call), + #[codec(index = 19)] + Vesting(runtime_types::pallet_vesting::pallet::Call), + #[codec(index = 20)] + Scheduler(runtime_types::pallet_scheduler::pallet::Call), + #[codec(index = 28)] + Preimage(runtime_types::pallet_preimage::pallet::Call), + #[codec(index = 21)] + Sudo(runtime_types::pallet_sudo::pallet::Call), + #[codec(index = 22)] + Proxy(runtime_types::pallet_proxy::pallet::Call), + #[codec(index = 23)] + Multisig(runtime_types::pallet_multisig::pallet::Call), + #[codec(index = 24)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Call, + ), + #[codec(index = 25)] + VoterList(runtime_types::pallet_bags_list::pallet::Call), + #[codec(index = 29)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), + #[codec(index = 30)] + FastUnstake(runtime_types::pallet_fast_unstake::pallet::Call), + #[codec(index = 42)] + Configuration( + runtime_types::polkadot_runtime_parachains::configuration::pallet::Call, + ), + #[codec(index = 43)] + ParasShared(runtime_types::polkadot_runtime_parachains::shared::pallet::Call), + #[codec(index = 44)] + ParaInclusion(runtime_types::polkadot_runtime_parachains::inclusion::pallet::Call), + #[codec(index = 45)] + ParaInherent( + runtime_types::polkadot_runtime_parachains::paras_inherent::pallet::Call, + ), + #[codec(index = 47)] + Paras(runtime_types::polkadot_runtime_parachains::paras::pallet::Call), + #[codec(index = 48)] + Initializer(runtime_types::polkadot_runtime_parachains::initializer::pallet::Call), + #[codec(index = 51)] + Hrmp(runtime_types::polkadot_runtime_parachains::hrmp::pallet::Call), + #[codec(index = 53)] + ParasDisputes(runtime_types::polkadot_runtime_parachains::disputes::pallet::Call), + #[codec(index = 54)] + ParasSlashing( + runtime_types::polkadot_runtime_parachains::disputes::slashing::pallet::Call, + ), + #[codec(index = 60)] + Registrar(runtime_types::polkadot_runtime_common::paras_registrar::pallet::Call), + #[codec(index = 61)] + Slots(runtime_types::polkadot_runtime_common::slots::pallet::Call), + #[codec(index = 62)] + ParasSudoWrapper( + runtime_types::polkadot_runtime_common::paras_sudo_wrapper::pallet::Call, + ), + #[codec(index = 63)] + Auctions(runtime_types::polkadot_runtime_common::auctions::pallet::Call), + #[codec(index = 64)] + Crowdloan(runtime_types::polkadot_runtime_common::crowdloan::pallet::Call), + #[codec(index = 65)] + AssignedSlots(runtime_types::polkadot_runtime_common::assigned_slots::pallet::Call), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Call), + #[codec(index = 100)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Call), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum RuntimeEvent { + #[codec(index = 0)] + System(runtime_types::frame_system::pallet::Event), + #[codec(index = 3)] + Indices(runtime_types::pallet_indices::pallet::Event), + #[codec(index = 4)] + Balances(runtime_types::pallet_balances::pallet::Event), + #[codec(index = 26)] + TransactionPayment(runtime_types::pallet_transaction_payment::pallet::Event), + #[codec(index = 6)] + Staking(runtime_types::pallet_staking::pallet::pallet::Event), + #[codec(index = 7)] + Offences(runtime_types::pallet_offences::pallet::Event), + #[codec(index = 8)] + Session(runtime_types::pallet_session::pallet::Event), + #[codec(index = 10)] + Grandpa(runtime_types::pallet_grandpa::pallet::Event), + #[codec(index = 11)] + ImOnline(runtime_types::pallet_im_online::pallet::Event), + #[codec(index = 16)] + Utility(runtime_types::pallet_utility::pallet::Event), + #[codec(index = 17)] + Identity(runtime_types::pallet_identity::pallet::Event), + #[codec(index = 18)] + Recovery(runtime_types::pallet_recovery::pallet::Event), + #[codec(index = 19)] + Vesting(runtime_types::pallet_vesting::pallet::Event), + #[codec(index = 20)] + Scheduler(runtime_types::pallet_scheduler::pallet::Event), + #[codec(index = 28)] + Preimage(runtime_types::pallet_preimage::pallet::Event), + #[codec(index = 21)] + Sudo(runtime_types::pallet_sudo::pallet::Event), + #[codec(index = 22)] + Proxy(runtime_types::pallet_proxy::pallet::Event), + #[codec(index = 23)] + Multisig(runtime_types::pallet_multisig::pallet::Event), + #[codec(index = 24)] + ElectionProviderMultiPhase( + runtime_types::pallet_election_provider_multi_phase::pallet::Event, + ), + #[codec(index = 25)] + VoterList(runtime_types::pallet_bags_list::pallet::Event), + #[codec(index = 29)] + NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), + #[codec(index = 30)] + FastUnstake(runtime_types::pallet_fast_unstake::pallet::Event), + #[codec(index = 44)] + ParaInclusion(runtime_types::polkadot_runtime_parachains::inclusion::pallet::Event), + #[codec(index = 47)] + Paras(runtime_types::polkadot_runtime_parachains::paras::pallet::Event), + #[codec(index = 51)] + Hrmp(runtime_types::polkadot_runtime_parachains::hrmp::pallet::Event), + #[codec(index = 53)] + ParasDisputes(runtime_types::polkadot_runtime_parachains::disputes::pallet::Event), + #[codec(index = 60)] + Registrar(runtime_types::polkadot_runtime_common::paras_registrar::pallet::Event), + #[codec(index = 61)] + Slots(runtime_types::polkadot_runtime_common::slots::pallet::Event), + #[codec(index = 63)] + Auctions(runtime_types::polkadot_runtime_common::auctions::pallet::Event), + #[codec(index = 64)] + Crowdloan(runtime_types::polkadot_runtime_common::crowdloan::pallet::Event), + #[codec(index = 65)] + AssignedSlots( + runtime_types::polkadot_runtime_common::assigned_slots::pallet::Event, + ), + #[codec(index = 99)] + XcmPallet(runtime_types::pallet_xcm::pallet::Event), + #[codec(index = 100)] + MessageQueue(runtime_types::pallet_message_queue::pallet::Event), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct SessionKeys { + pub grandpa: runtime_types::sp_consensus_grandpa::app::Public, + pub babe: runtime_types::sp_consensus_babe::app::Public, + pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, + pub para_validator: runtime_types::polkadot_primitives::v4::validator_app::Public, + pub para_assignment: runtime_types::polkadot_primitives::v4::assignment_app::Public, + pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, + } + } + pub mod xcm { + use super::runtime_types; + pub mod double_encoded { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct DoubleEncoded { + pub encoded: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod v2 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junction { + #[codec(index = 0)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 1)] + AccountId32 { + network: runtime_types::xcm::v2::NetworkId, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + AccountIndex64 { + network: runtime_types::xcm::v2::NetworkId, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 3)] + AccountKey20 { + network: runtime_types::xcm::v2::NetworkId, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 4)] + PalletInstance(::core::primitive::u8), + #[codec(index = 5)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 6)] + GeneralKey( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 7)] + OnlyChild, + #[codec(index = 8)] + Plurality { + id: runtime_types::xcm::v2::BodyId, + part: runtime_types::xcm::v2::BodyPart, + }, + } + } + pub mod multiasset { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract(::std::vec::Vec<::core::primitive::u8>), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetInstance { + #[codec(index = 0)] + Undefined, + #[codec(index = 1)] + Index(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 2)] + Array4([::core::primitive::u8; 4usize]), + #[codec(index = 3)] + Array8([::core::primitive::u8; 8usize]), + #[codec(index = 4)] + Array16([::core::primitive::u8; 16usize]), + #[codec(index = 5)] + Array32([::core::primitive::u8; 32usize]), + #[codec(index = 6)] + Blob(::std::vec::Vec<::core::primitive::u8>), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v2::multiasset::AssetInstance), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAsset { + pub id: runtime_types::xcm::v2::multiasset::AssetId, + pub fun: runtime_types::xcm::v2::multiasset::Fungibility, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v2::multiasset::WildMultiAsset), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAssets( + pub ::std::vec::Vec, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v2::multiasset::AssetId, + fun: runtime_types::xcm::v2::multiasset::WildFungibility, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v2::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + runtime_types::xcm::v2::junction::Junction, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v2::multilocation::Junctions, + } + } + pub mod traits { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Overflow, + #[codec(index = 1)] + Unimplemented, + #[codec(index = 2)] + UntrustedReserveLocation, + #[codec(index = 3)] + UntrustedTeleportLocation, + #[codec(index = 4)] + MultiLocationFull, + #[codec(index = 5)] + MultiLocationNotInvertible, + #[codec(index = 6)] + BadOrigin, + #[codec(index = 7)] + InvalidLocation, + #[codec(index = 8)] + AssetNotFound, + #[codec(index = 9)] + FailedToTransactAsset, + #[codec(index = 10)] + NotWithdrawable, + #[codec(index = 11)] + LocationCannotHold, + #[codec(index = 12)] + ExceedsMaxMessageSize, + #[codec(index = 13)] + DestinationUnsupported, + #[codec(index = 14)] + Transport, + #[codec(index = 15)] + Unroutable, + #[codec(index = 16)] + UnknownClaim, + #[codec(index = 17)] + FailedToDecode, + #[codec(index = 18)] + MaxWeightInvalid, + #[codec(index = 19)] + NotHoldingFees, + #[codec(index = 20)] + TooExpensive, + #[codec(index = 21)] + Trap(::core::primitive::u64), + #[codec(index = 22)] + UnhandledXcmVersion, + #[codec(index = 23)] + WeightLimitReached(::core::primitive::u64), + #[codec(index = 24)] + Barrier, + #[codec(index = 25)] + WeightNotComputable, + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyId { + #[codec(index = 0)] + Unit, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Index(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + Executive, + #[codec(index = 4)] + Technical, + #[codec(index = 5)] + Legislative, + #[codec(index = 6)] + Judicial, + #[codec(index = 7)] + Defense, + #[codec(index = 8)] + Administration, + #[codec(index = 9)] + Treasury, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyPart { + #[codec(index = 0)] + Voice, + #[codec(index = 1)] + Members { + #[codec(compact)] + count: ::core::primitive::u32, + }, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 3)] + AtLeastProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 2)] + ReceiveTeleportedAsset(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v2::Response, + #[codec(compact)] + max_weight: ::core::primitive::u64, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_type: runtime_types::xcm::v2::OriginKind, + #[codec(compact)] + require_weight_at_most: ::core::primitive::u64, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v2::multilocation::Junctions), + #[codec(index = 12)] + ReportError { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + beneficiary: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_assets: ::core::primitive::u32, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + receive: runtime_types::xcm::v2::multiasset::MultiAssets, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + xcm: runtime_types::xcm::v2::Xcm, + }, + #[codec(index = 18)] + QueryHolding { + #[codec(compact)] + query_id: ::core::primitive::u64, + dest: runtime_types::xcm::v2::multilocation::MultiLocation, + assets: runtime_types::xcm::v2::multiasset::MultiAssetFilter, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v2::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v2::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v2::Xcm), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v2::Xcm), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v2::multiasset::MultiAssets, + ticket: runtime_types::xcm::v2::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + #[codec(compact)] + max_response_weight: ::core::primitive::u64, + }, + #[codec(index = 27)] + UnsubscribeVersion, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NetworkId { + #[codec(index = 0)] + Any, + #[codec(index = 1)] + Named( + runtime_types::bounded_collections::weak_bounded_vec::WeakBoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum OriginKind { + #[codec(index = 0)] + Native, + #[codec(index = 1)] + SovereignAccount, + #[codec(index = 2)] + Superuser, + #[codec(index = 3)] + Xcm, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v2::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(#[codec(compact)] ::core::primitive::u64), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Xcm(pub ::std::vec::Vec); + } + pub mod v3 { + use super::runtime_types; + pub mod junction { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyId { + #[codec(index = 0)] + Unit, + #[codec(index = 1)] + Moniker([::core::primitive::u8; 4usize]), + #[codec(index = 2)] + Index(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + Executive, + #[codec(index = 4)] + Technical, + #[codec(index = 5)] + Legislative, + #[codec(index = 6)] + Judicial, + #[codec(index = 7)] + Defense, + #[codec(index = 8)] + Administration, + #[codec(index = 9)] + Treasury, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum BodyPart { + #[codec(index = 0)] + Voice, + #[codec(index = 1)] + Members { + #[codec(compact)] + count: ::core::primitive::u32, + }, + #[codec(index = 2)] + Fraction { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 3)] + AtLeastProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + #[codec(index = 4)] + MoreThanProportion { + #[codec(compact)] + nom: ::core::primitive::u32, + #[codec(compact)] + denom: ::core::primitive::u32, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junction { + #[codec(index = 0)] + Parachain(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 1)] + AccountId32 { + network: + ::core::option::Option, + id: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + AccountIndex64 { + network: + ::core::option::Option, + #[codec(compact)] + index: ::core::primitive::u64, + }, + #[codec(index = 3)] + AccountKey20 { + network: + ::core::option::Option, + key: [::core::primitive::u8; 20usize], + }, + #[codec(index = 4)] + PalletInstance(::core::primitive::u8), + #[codec(index = 5)] + GeneralIndex(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 6)] + GeneralKey { + length: ::core::primitive::u8, + data: [::core::primitive::u8; 32usize], + }, + #[codec(index = 7)] + OnlyChild, + #[codec(index = 8)] + Plurality { + id: runtime_types::xcm::v3::junction::BodyId, + part: runtime_types::xcm::v3::junction::BodyPart, + }, + #[codec(index = 9)] + GlobalConsensus(runtime_types::xcm::v3::junction::NetworkId), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum NetworkId { + #[codec(index = 0)] + ByGenesis([::core::primitive::u8; 32usize]), + #[codec(index = 1)] + ByFork { + block_number: ::core::primitive::u64, + block_hash: [::core::primitive::u8; 32usize], + }, + #[codec(index = 2)] + Polkadot, + #[codec(index = 3)] + Kusama, + #[codec(index = 4)] + Westend, + #[codec(index = 5)] + Rococo, + #[codec(index = 6)] + Wococo, + #[codec(index = 7)] + Ethereum { + #[codec(compact)] + chain_id: ::core::primitive::u64, + }, + #[codec(index = 8)] + BitcoinCore, + #[codec(index = 9)] + BitcoinCash, + } + } + pub mod junctions { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Junctions { + #[codec(index = 0)] + Here, + #[codec(index = 1)] + X1(runtime_types::xcm::v3::junction::Junction), + #[codec(index = 2)] + X2( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 3)] + X3( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 4)] + X4( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 5)] + X5( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 6)] + X6( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 7)] + X7( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + #[codec(index = 8)] + X8( + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + runtime_types::xcm::v3::junction::Junction, + ), + } + } + pub mod multiasset { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetId { + #[codec(index = 0)] + Concrete(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 1)] + Abstract([::core::primitive::u8; 32usize]), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum AssetInstance { + #[codec(index = 0)] + Undefined, + #[codec(index = 1)] + Index(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 2)] + Array4([::core::primitive::u8; 4usize]), + #[codec(index = 3)] + Array8([::core::primitive::u8; 8usize]), + #[codec(index = 4)] + Array16([::core::primitive::u8; 16usize]), + #[codec(index = 5)] + Array32([::core::primitive::u8; 32usize]), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Fungibility { + #[codec(index = 0)] + Fungible(#[codec(compact)] ::core::primitive::u128), + #[codec(index = 1)] + NonFungible(runtime_types::xcm::v3::multiasset::AssetInstance), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAsset { + pub id: runtime_types::xcm::v3::multiasset::AssetId, + pub fun: runtime_types::xcm::v3::multiasset::Fungibility, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MultiAssetFilter { + #[codec(index = 0)] + Definite(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 1)] + Wild(runtime_types::xcm::v3::multiasset::WildMultiAsset), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiAssets( + pub ::std::vec::Vec, + ); + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildFungibility { + #[codec(index = 0)] + Fungible, + #[codec(index = 1)] + NonFungible, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WildMultiAsset { + #[codec(index = 0)] + All, + #[codec(index = 1)] + AllOf { + id: runtime_types::xcm::v3::multiasset::AssetId, + fun: runtime_types::xcm::v3::multiasset::WildFungibility, + }, + #[codec(index = 2)] + AllCounted(#[codec(compact)] ::core::primitive::u32), + #[codec(index = 3)] + AllOfCounted { + id: runtime_types::xcm::v3::multiasset::AssetId, + fun: runtime_types::xcm::v3::multiasset::WildFungibility, + #[codec(compact)] + count: ::core::primitive::u32, + }, + } + } + pub mod multilocation { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct MultiLocation { + pub parents: ::core::primitive::u8, + pub interior: runtime_types::xcm::v3::junctions::Junctions, + } + } + pub mod traits { + use super::runtime_types; + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Error { + #[codec(index = 0)] + Overflow, + #[codec(index = 1)] + Unimplemented, + #[codec(index = 2)] + UntrustedReserveLocation, + #[codec(index = 3)] + UntrustedTeleportLocation, + #[codec(index = 4)] + LocationFull, + #[codec(index = 5)] + LocationNotInvertible, + #[codec(index = 6)] + BadOrigin, + #[codec(index = 7)] + InvalidLocation, + #[codec(index = 8)] + AssetNotFound, + #[codec(index = 9)] + FailedToTransactAsset, + #[codec(index = 10)] + NotWithdrawable, + #[codec(index = 11)] + LocationCannotHold, + #[codec(index = 12)] + ExceedsMaxMessageSize, + #[codec(index = 13)] + DestinationUnsupported, + #[codec(index = 14)] + Transport, + #[codec(index = 15)] + Unroutable, + #[codec(index = 16)] + UnknownClaim, + #[codec(index = 17)] + FailedToDecode, + #[codec(index = 18)] + MaxWeightInvalid, + #[codec(index = 19)] + NotHoldingFees, + #[codec(index = 20)] + TooExpensive, + #[codec(index = 21)] + Trap(::core::primitive::u64), + #[codec(index = 22)] + ExpectationFalse, + #[codec(index = 23)] + PalletNotFound, + #[codec(index = 24)] + NameMismatch, + #[codec(index = 25)] + VersionIncompatible, + #[codec(index = 26)] + HoldingWouldOverflow, + #[codec(index = 27)] + ExportError, + #[codec(index = 28)] + ReanchorFailed, + #[codec(index = 29)] + NoDeal, + #[codec(index = 30)] + FeesNotMet, + #[codec(index = 31)] + LockError, + #[codec(index = 32)] + NoPermission, + #[codec(index = 33)] + Unanchored, + #[codec(index = 34)] + NotDepositable, + #[codec(index = 35)] + UnhandledXcmVersion, + #[codec(index = 36)] + WeightLimitReached(::sp_weights::Weight), + #[codec(index = 37)] + Barrier, + #[codec(index = 38)] + WeightNotComputable, + #[codec(index = 39)] + ExceedsStackLimit, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Outcome { + #[codec(index = 0)] + Complete(::sp_weights::Weight), + #[codec(index = 1)] + Incomplete(::sp_weights::Weight, runtime_types::xcm::v3::traits::Error), + #[codec(index = 2)] + Error(runtime_types::xcm::v3::traits::Error), + } + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Instruction { + #[codec(index = 0)] + WithdrawAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 1)] + ReserveAssetDeposited(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 2)] + ReceiveTeleportedAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 3)] + QueryResponse { + #[codec(compact)] + query_id: ::core::primitive::u64, + response: runtime_types::xcm::v3::Response, + max_weight: ::sp_weights::Weight, + querier: ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + }, + #[codec(index = 4)] + TransferAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 5)] + TransferReserveAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 6)] + Transact { + origin_kind: runtime_types::xcm::v2::OriginKind, + require_weight_at_most: ::sp_weights::Weight, + call: runtime_types::xcm::double_encoded::DoubleEncoded, + }, + #[codec(index = 7)] + HrmpNewChannelOpenRequest { + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + max_message_size: ::core::primitive::u32, + #[codec(compact)] + max_capacity: ::core::primitive::u32, + }, + #[codec(index = 8)] + HrmpChannelAccepted { + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 9)] + HrmpChannelClosing { + #[codec(compact)] + initiator: ::core::primitive::u32, + #[codec(compact)] + sender: ::core::primitive::u32, + #[codec(compact)] + recipient: ::core::primitive::u32, + }, + #[codec(index = 10)] + ClearOrigin, + #[codec(index = 11)] + DescendOrigin(runtime_types::xcm::v3::junctions::Junctions), + #[codec(index = 12)] + ReportError(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 13)] + DepositAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + beneficiary: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 14)] + DepositReserveAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 15)] + ExchangeAsset { + give: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + want: runtime_types::xcm::v3::multiasset::MultiAssets, + maximal: ::core::primitive::bool, + }, + #[codec(index = 16)] + InitiateReserveWithdraw { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + reserve: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 17)] + InitiateTeleport { + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + dest: runtime_types::xcm::v3::multilocation::MultiLocation, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 18)] + ReportHolding { + response_info: runtime_types::xcm::v3::QueryResponseInfo, + assets: runtime_types::xcm::v3::multiasset::MultiAssetFilter, + }, + #[codec(index = 19)] + BuyExecution { + fees: runtime_types::xcm::v3::multiasset::MultiAsset, + weight_limit: runtime_types::xcm::v3::WeightLimit, + }, + #[codec(index = 20)] + RefundSurplus, + #[codec(index = 21)] + SetErrorHandler(runtime_types::xcm::v3::Xcm), + #[codec(index = 22)] + SetAppendix(runtime_types::xcm::v3::Xcm), + #[codec(index = 23)] + ClearError, + #[codec(index = 24)] + ClaimAsset { + assets: runtime_types::xcm::v3::multiasset::MultiAssets, + ticket: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 25)] + Trap(#[codec(compact)] ::core::primitive::u64), + #[codec(index = 26)] + SubscribeVersion { + #[codec(compact)] + query_id: ::core::primitive::u64, + max_response_weight: ::sp_weights::Weight, + }, + #[codec(index = 27)] + UnsubscribeVersion, + #[codec(index = 28)] + BurnAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 29)] + ExpectAsset(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 30)] + ExpectOrigin( + ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + ), + #[codec(index = 31)] + ExpectError( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v3::traits::Error, + )>, + ), + #[codec(index = 32)] + ExpectTransactStatus(runtime_types::xcm::v3::MaybeErrorCode), + #[codec(index = 33)] + QueryPallet { + module_name: ::std::vec::Vec<::core::primitive::u8>, + response_info: runtime_types::xcm::v3::QueryResponseInfo, + }, + #[codec(index = 34)] + ExpectPallet { + #[codec(compact)] + index: ::core::primitive::u32, + name: ::std::vec::Vec<::core::primitive::u8>, + module_name: ::std::vec::Vec<::core::primitive::u8>, + #[codec(compact)] + crate_major: ::core::primitive::u32, + #[codec(compact)] + min_crate_minor: ::core::primitive::u32, + }, + #[codec(index = 35)] + ReportTransactStatus(runtime_types::xcm::v3::QueryResponseInfo), + #[codec(index = 36)] + ClearTransactStatus, + #[codec(index = 37)] + UniversalOrigin(runtime_types::xcm::v3::junction::Junction), + #[codec(index = 38)] + ExportMessage { + network: runtime_types::xcm::v3::junction::NetworkId, + destination: runtime_types::xcm::v3::junctions::Junctions, + xcm: runtime_types::xcm::v3::Xcm, + }, + #[codec(index = 39)] + LockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + unlocker: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 40)] + UnlockAsset { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + target: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 41)] + NoteUnlockable { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + owner: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 42)] + RequestUnlock { + asset: runtime_types::xcm::v3::multiasset::MultiAsset, + locker: runtime_types::xcm::v3::multilocation::MultiLocation, + }, + #[codec(index = 43)] + SetFeesMode { jit_withdraw: ::core::primitive::bool }, + #[codec(index = 44)] + SetTopic([::core::primitive::u8; 32usize]), + #[codec(index = 45)] + ClearTopic, + #[codec(index = 46)] + AliasOrigin(runtime_types::xcm::v3::multilocation::MultiLocation), + #[codec(index = 47)] + UnpaidExecution { + weight_limit: runtime_types::xcm::v3::WeightLimit, + check_origin: ::core::option::Option< + runtime_types::xcm::v3::multilocation::MultiLocation, + >, + }, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum MaybeErrorCode { + #[codec(index = 0)] + Success, + #[codec(index = 1)] + Error( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + #[codec(index = 2)] + TruncatedError( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + ), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct PalletInfo { + #[codec(compact)] + pub index: ::core::primitive::u32, + pub name: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + pub module_name: runtime_types::bounded_collections::bounded_vec::BoundedVec< + ::core::primitive::u8, + >, + #[codec(compact)] + pub major: ::core::primitive::u32, + #[codec(compact)] + pub minor: ::core::primitive::u32, + #[codec(compact)] + pub patch: ::core::primitive::u32, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct QueryResponseInfo { + pub destination: runtime_types::xcm::v3::multilocation::MultiLocation, + #[codec(compact)] + pub query_id: ::core::primitive::u64, + pub max_weight: ::sp_weights::Weight, + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum Response { + #[codec(index = 0)] + Null, + #[codec(index = 1)] + Assets(runtime_types::xcm::v3::multiasset::MultiAssets), + #[codec(index = 2)] + ExecutionResult( + ::core::option::Option<( + ::core::primitive::u32, + runtime_types::xcm::v3::traits::Error, + )>, + ), + #[codec(index = 3)] + Version(::core::primitive::u32), + #[codec(index = 4)] + PalletsInfo( + runtime_types::bounded_collections::bounded_vec::BoundedVec< + runtime_types::xcm::v3::PalletInfo, + >, + ), + #[codec(index = 5)] + DispatchResult(runtime_types::xcm::v3::MaybeErrorCode), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum WeightLimit { + #[codec(index = 0)] + Unlimited, + #[codec(index = 1)] + Limited(::sp_weights::Weight), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub struct Xcm(pub ::std::vec::Vec); + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedAssetId { + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::AssetId), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedMultiAssets { + #[codec(index = 1)] + V2(runtime_types::xcm::v2::multiasset::MultiAssets), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multiasset::MultiAssets), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedMultiLocation { + #[codec(index = 1)] + V2(runtime_types::xcm::v2::multilocation::MultiLocation), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::multilocation::MultiLocation), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedResponse { + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Response), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Response), + } + #[derive(:: codec :: Decode, :: codec :: Encode, Clone, Debug, PartialEq)] + pub enum VersionedXcm { + #[codec(index = 2)] + V2(runtime_types::xcm::v2::Xcm), + #[codec(index = 3)] + V3(runtime_types::xcm::v3::Xcm), + } + } + } +} diff --git a/relays/client-westend/src/lib.rs b/relays/client-westend/src/lib.rs index 674f4c71e82f8..2f987b688a906 100644 --- a/relays/client-westend/src/lib.rs +++ b/relays/client-westend/src/lib.rs @@ -16,21 +16,36 @@ //! Types used to connect to the Westend chain. +pub mod codegen_runtime; + +use bp_polkadot_core::SuffixedCommonSignedExtensionExt; use bp_runtime::ChainId; use bp_westend::WESTEND_SYNCED_HEADERS_GRANDPA_INFO_METHOD; +use codec::Encode; use relay_substrate_client::{ - Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider, + Chain, ChainWithBalances, ChainWithGrandpa, ChainWithTransactions, Error as SubstrateError, + RelayChain, SignParam, UnderlyingChainProvider, UnsignedTransaction, }; -use sp_core::storage::StorageKey; +use sp_core::{storage::StorageKey, Pair}; +use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount, MultiAddress}; use sp_session::MembershipProof; use std::time::Duration; +pub use codegen_runtime::api::runtime_types; + +pub type RuntimeCall = runtime_types::westend_runtime::RuntimeCall; + +pub type GrandpaCall = runtime_types::pallet_grandpa::pallet::Call; + /// Westend header id. pub type HeaderId = relay_utils::HeaderId; /// Westend header type used in headers sync. pub type SyncHeader = relay_substrate_client::SyncHeader; +/// The address format for describing accounts. +pub type Address = MultiAddress; + /// Westend chain definition #[derive(Debug, Clone, Copy)] pub struct Westend; @@ -47,7 +62,7 @@ impl Chain for Westend { const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); type SignedBlock = bp_westend::SignedBlock; - type Call = (); + type Call = RuntimeCall; } impl ChainWithGrandpa for Westend { @@ -59,8 +74,7 @@ impl ChainWithGrandpa for Westend { impl RelayChain for Westend { const PARAS_PALLET_NAME: &'static str = bp_westend::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = - bp_westend::WITH_WESTEND_BRIDGE_PARAS_PALLET_NAME; + const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeWestendParachains"; } impl ChainWithBalances for Westend { @@ -69,23 +83,53 @@ impl ChainWithBalances for Westend { } } -/// `AssetHubWestend` parachain definition -#[derive(Debug, Clone, Copy)] -pub struct AssetHubWestend; +impl ChainWithTransactions for Westend { + type AccountKeyPair = sp_core::sr25519::Pair; + type SignedTransaction = + bp_polkadot_core::UncheckedExtrinsic; + + fn sign_transaction( + param: SignParam, + unsigned: UnsignedTransaction, + ) -> Result { + let raw_payload = SignedPayload::new( + unsigned.call, + bp_westend::SignedExtension::from_params( + param.spec_version, + param.transaction_version, + unsigned.era, + param.genesis_hash, + unsigned.nonce, + unsigned.tip, + ((), ()), + ), + )?; + + let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload)); + let signer: sp_runtime::MultiSigner = param.signer.public().into(); + let (call, extra, _) = raw_payload.deconstruct(); + + Ok(Self::SignedTransaction::new_signed( + call, + signer.into_account().into(), + signature.into(), + extra, + )) + } -impl UnderlyingChainProvider for AssetHubWestend { - type Chain = bp_westend::AssetHubWestend; -} + fn is_signed(tx: &Self::SignedTransaction) -> bool { + tx.signature.is_some() + } -// Westmint seems to use the same configuration as all Polkadot-like chains, so we'll use Westend -// primitives here. -impl Chain for AssetHubWestend { - const ID: ChainId = bp_runtime::ASSET_HUB_WESTEND_CHAIN_ID; - const NAME: &'static str = "Westmint"; - const BEST_FINALIZED_HEADER_ID_METHOD: &'static str = - bp_westend::BEST_FINALIZED_ASSETHUBWESTEND_HEADER_METHOD; - const AVERAGE_BLOCK_INTERVAL: Duration = Duration::from_secs(6); + fn is_signed_by(signer: &Self::AccountKeyPair, tx: &Self::SignedTransaction) -> bool { + tx.signature + .as_ref() + .map(|(address, _, _)| *address == Address::Id(signer.public().into())) + .unwrap_or(false) + } - type SignedBlock = bp_westend::SignedBlock; - type Call = (); + fn parse_transaction(tx: Self::SignedTransaction) -> Option> { + let extra = &tx.signature.as_ref()?.2; + Some(UnsignedTransaction::new(tx.function, extra.nonce()).tip(extra.tip())) + } } diff --git a/relays/client-wococo/src/lib.rs b/relays/client-wococo/src/lib.rs index fa0d60faba6ec..ddf38a5c19d53 100644 --- a/relays/client-wococo/src/lib.rs +++ b/relays/client-wococo/src/lib.rs @@ -79,7 +79,7 @@ impl ChainWithBalances for Wococo { impl RelayChain for Wococo { const PARAS_PALLET_NAME: &'static str = bp_wococo::PARAS_PALLET_NAME; - const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeWococoParachain"; + const PARACHAINS_FINALITY_PALLET_NAME: &'static str = "BridgeWococoParachains"; } impl ChainWithTransactions for Wococo { diff --git a/scripts/regenerate_runtimes.sh b/scripts/regenerate_runtimes.sh index 60b2878ff08a5..e31761e0d4284 100755 --- a/scripts/regenerate_runtimes.sh +++ b/scripts/regenerate_runtimes.sh @@ -4,13 +4,20 @@ cd tools/runtime-codegen cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-bridge-hub-rpc.polkadot.io:443" > ../../relays/client-bridge-hub-rococo/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "http://localhost:20433" > ../../relays/client-rialto-parachain/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-rpc.polkadot.io:443" > ../../relays/client-rococo/src/codegen_runtime.rs +cargo run --bin runtime-codegen -- --from-node-url "wss://westend-rpc.polkadot.io:443" > ../../relays/client-westend/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "wss://kusama-rpc.polkadot.io:443" > ../../relays/client-kusama/src/codegen_runtime.rs cargo run --bin runtime-codegen -- --from-node-url "wss://rpc.polkadot.io:443" > ../../relays/client-polkadot/src/codegen_runtime.rs -cd - -cargo fmt --all # Uncomment to update other runtimes +# For `polkadot-sdk` testnet runtimes: +# TODO: there is a bug, probably needs to update subxt, generates: `::sp_runtime::generic::Header<::core::primitive::u32>` withtout second `Hash` parameter. +# cargo run --bin runtime-codegen -- --from-wasm-file ../../../polkadot-sdk/target/release/wbuild/bridge-hub-rococo-runtime/bridge_hub_rococo_runtime.compact.compressed.wasm > ../../relays/client-bridge-hub-rococo/src/codegen_runtime.rs +# cargo run --bin runtime-codegen -- --from-wasm-file ../../../polkadot-sdk/target/release/wbuild/bridge-hub-westend-runtime/bridge_hub_westend_runtime.compact.compressed.wasm > ../../relays/client-bridge-hub-westend/src/codegen_runtime.rs + +cd - +cargo fmt --all + # Polkadot Bulletin Chain: # # git clone https://github.com/zdave-parity/polkadot-bulletin-chain.git diff --git a/scripts/verify-pallets-build.sh b/scripts/verify-pallets-build.sh index b8ac09e26b8bc..e797f77d02657 100755 --- a/scripts/verify-pallets-build.sh +++ b/scripts/verify-pallets-build.sh @@ -74,7 +74,6 @@ rm -rf $BRIDGES_FOLDER/primitives/beefy rm -rf $BRIDGES_FOLDER/primitives/chain-millau rm -rf $BRIDGES_FOLDER/primitives/chain-rialto rm -rf $BRIDGES_FOLDER/primitives/chain-rialto-parachain -rm -rf $BRIDGES_FOLDER/primitives/chain-westend rm -rf $BRIDGES_FOLDER/relays rm -rf $BRIDGES_FOLDER/scripts/add_license.sh rm -rf $BRIDGES_FOLDER/scripts/build-containers.sh diff --git a/tools/runtime-codegen/Cargo.lock b/tools/runtime-codegen/Cargo.lock index 9548f54c9883a..af2e8e51421eb 100644 --- a/tools/runtime-codegen/Cargo.lock +++ b/tools/runtime-codegen/Cargo.lock @@ -88,16 +88,15 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6342bd4f5a1205d7f41e94a41a901f5647c938cdfa96036338e8533c9d6c2450" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] @@ -127,9 +126,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -182,7 +181,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -390,46 +389,43 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.4" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.2.4" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", - "once_cell", "strsim", ] [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "codespan-reporting" @@ -751,7 +747,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -768,7 +764,7 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -1140,7 +1136,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -2362,9 +2358,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -2380,9 +2376,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2523,7 +2519,7 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -2605,6 +2601,7 @@ dependencies = [ "color-eyre", "parity-scale-codec", "proc-macro2", + "quote", "subxt-codegen", "syn 1.0.109", "wasm-loader", @@ -2962,7 +2959,7 @@ checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -3632,9 +3629,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -3679,7 +3676,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -3753,7 +3750,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -3876,7 +3873,7 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] @@ -3989,7 +3986,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.6", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -4693,7 +4690,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.38", ] [[package]] diff --git a/tools/runtime-codegen/Cargo.toml b/tools/runtime-codegen/Cargo.toml index b0c1070f80a88..1e4fb6c4d0b4b 100644 --- a/tools/runtime-codegen/Cargo.toml +++ b/tools/runtime-codegen/Cargo.toml @@ -11,10 +11,11 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [workspace] [dependencies] -clap = { version = "4.0.8", features = ["derive", "cargo"] } +clap = { version = "4.4.6", features = ["derive", "cargo"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } color-eyre = "0.6.1" -proc-macro2 = "1.0.51" +proc-macro2 = "1.0.56" +quote = "1.0.28" syn = "1.0" subxt-codegen = { git = "https://github.com/paritytech/subxt", branch = "master", default-features = false, features = [] } wasm-loader = { git = "https://github.com/chevdor/subwasm", branch = "master" } diff --git a/tools/runtime-codegen/README.md b/tools/runtime-codegen/README.md index 52ff3818461c0..7e1aa16f5e026 100644 --- a/tools/runtime-codegen/README.md +++ b/tools/runtime-codegen/README.md @@ -11,5 +11,5 @@ cargo run --bin runtime-codegen -- --from-node-url "wss://rococo-bridge-hub-rpc. ``` ``` -cargo run --bin runtime-codegen -- --from-wasm ~/workplace/bridge-hub-rococo_runtime-v9360.compact.compressed.wasm > /tmp/rococo_bridge_hub_codegen.rs +cargo run --bin runtime-codegen -- --from-wasm-file ~/workplace/bridge-hub-rococo_runtime-v9360.compact.compressed.wasm > /tmp/rococo_bridge_hub_codegen.rs ``` \ No newline at end of file