referrerpolicy=no-referrer-when-downgrade

bp_xcm_bridge_hub/
call_info.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//! Defines structures related to calls of the `pallet-xcm-bridge-hub` pallet.
18
19use bp_messages::MessageNonce;
20use codec::{Decode, Encode};
21use scale_info::TypeInfo;
22use sp_std::boxed::Box;
23use xcm::prelude::VersionedInteriorLocation;
24
25/// A minimized version of `pallet_xcm_bridge_hub::Call` that can be used without a runtime.
26#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
27#[allow(non_camel_case_types)]
28pub enum XcmBridgeHubCall {
29	/// `pallet_xcm_bridge_hub::Call::open_bridge`
30	#[codec(index = 0)]
31	open_bridge {
32		/// Universal `InteriorLocation` from the bridged consensus.
33		bridge_destination_universal_location: Box<VersionedInteriorLocation>,
34	},
35	/// `pallet_xcm_bridge_hub::Call::close_bridge`
36	#[codec(index = 1)]
37	close_bridge {
38		/// Universal `InteriorLocation` from the bridged consensus.
39		bridge_destination_universal_location: Box<VersionedInteriorLocation>,
40		/// The number of messages that we may prune in a single call.
41		may_prune_messages: MessageNonce,
42	},
43}