bp_asset_hub_wococo/
lib.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Parity Bridges Common.
3
4// Parity Bridges Common is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Parity Bridges Common is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Parity Bridges Common.  If not, see <http://www.gnu.org/licenses/>.
16
17//! Module with configuration which reflects AssetHubWococo runtime setup.
18
19#![cfg_attr(not(feature = "std"), no_std)]
20
21use codec::{Decode, Encode};
22use scale_info::TypeInfo;
23
24pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall;
25
26/// `AssetHubWococo` Runtime `Call` enum.
27///
28/// The enum represents a subset of possible `Call`s we can send to `AssetHubWococo` chain.
29/// Ideally this code would be auto-generated from metadata, because we want to
30/// avoid depending directly on the ENTIRE runtime just to get the encoding of `Dispatchable`s.
31///
32/// All entries here (like pretty much in the entire file) must be kept in sync with
33/// `AssetHubWococo` `construct_runtime`, so that we maintain SCALE-compatibility.
34#[allow(clippy::large_enum_variant)]
35#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
36pub enum Call {
37	/// `ToRococoXcmRouter` bridge pallet.
38	#[codec(index = 44)]
39	ToRococoXcmRouter(XcmBridgeHubRouterCall),
40}
41
42frame_support::parameter_types! {
43	/// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`.
44	pub const XcmBridgeHubRouterTransactCallMaxWeight: frame_support::weights::Weight = frame_support::weights::Weight::from_parts(200_000_000, 6144);
45
46	/// Base delivery fee to `BridgeHubWococo`.
47	/// (initially was calculated by test `BridgeHubWococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer`)
48	pub const BridgeHubWococoBaseFeeInWocs: u128 = 1214739988;
49}
50
51/// Identifier of AssetHubWococo in the Wococo relay chain.
52pub const ASSET_HUB_WOCOCO_PARACHAIN_ID: u32 = 1000;