mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 11:01:01 +00:00
use complex transactions on RBH/WBH bridge hubs (#1893)
This commit is contained in:
committed by
Bastian Köcher
parent
976e96608c
commit
bb078b8226
@@ -21,8 +21,9 @@ use bp_bridge_hub_wococo::PolkadotSignedExtension;
|
||||
use bp_messages::MessageNonce;
|
||||
use codec::Encode;
|
||||
use relay_substrate_client::{
|
||||
Chain, ChainWithBalances, ChainWithMessages, ChainWithTransactions, Error as SubstrateError,
|
||||
SignParam, UnderlyingChainProvider, UnsignedTransaction,
|
||||
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};
|
||||
@@ -57,6 +58,10 @@ impl ChainWithBalances for BridgeHubRococo {
|
||||
}
|
||||
}
|
||||
|
||||
impl ChainWithUtilityPallet for BridgeHubRococo {
|
||||
type UtilityPallet = MockedRuntimeUtilityPallet<runtime::Call>;
|
||||
}
|
||||
|
||||
impl ChainWithTransactions for BridgeHubRococo {
|
||||
type AccountKeyPair = sp_core::sr25519::Pair;
|
||||
type SignedTransaction = runtime::UncheckedExtrinsic;
|
||||
|
||||
@@ -25,7 +25,7 @@ use bp_bridge_hub_rococo::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;
|
||||
pub use relay_substrate_client::calls::{SystemCall, UtilityCall};
|
||||
|
||||
/// Unchecked BridgeHubRococo extrinsic.
|
||||
pub type UncheckedExtrinsic = bp_bridge_hub_rococo::UncheckedExtrinsic<Call, SignedExtension>;
|
||||
@@ -49,6 +49,9 @@ pub enum Call {
|
||||
#[cfg(test)]
|
||||
#[codec(index = 0)]
|
||||
System(SystemCall),
|
||||
/// Utility pallet.
|
||||
#[codec(index = 40)]
|
||||
Utility(UtilityCall<Call>),
|
||||
|
||||
/// Wococo bridge pallet.
|
||||
#[codec(index = 41)]
|
||||
@@ -60,3 +63,9 @@ pub enum Call {
|
||||
#[codec(index = 46)]
|
||||
BridgeWococoMessages(BridgeWococoMessagesCall),
|
||||
}
|
||||
|
||||
impl From<UtilityCall<Call>> for Call {
|
||||
fn from(call: UtilityCall<Call>) -> Call {
|
||||
Call::Utility(call)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user