mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Remove Substrate Pallet (#866)
* Remove `pallet-substrate-bridge` * Fix transfer call encoding test Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
cb90ea0979
commit
2f1c4c23fc
@@ -16,8 +16,8 @@
|
||||
|
||||
use bp_rialto::derive_account_from_millau_id;
|
||||
use rialto_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeKovanConfig, BridgeMillauConfig, BridgeRialtoPoAConfig, GenesisConfig,
|
||||
GrandpaConfig, SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeKovanConfig, BridgeRialtoPoAConfig, GenesisConfig, GrandpaConfig,
|
||||
SessionConfig, SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
};
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_core::{sr25519, Pair, Public};
|
||||
@@ -169,11 +169,6 @@ fn testnet_genesis(
|
||||
pallet_grandpa: Some(GrandpaConfig {
|
||||
authorities: Vec::new(),
|
||||
}),
|
||||
pallet_substrate_bridge: Some(BridgeMillauConfig {
|
||||
// We'll initialize the pallet with a dispatchable instead.
|
||||
init_data: None,
|
||||
owner: Some(root_key.clone()),
|
||||
}),
|
||||
pallet_sudo: Some(SudoConfig { key: root_key }),
|
||||
pallet_session: Some(SessionConfig {
|
||||
keys: initial_authorities
|
||||
|
||||
@@ -31,7 +31,6 @@ pallet-bridge-eth-poa = { path = "../../../modules/ethereum", default-features =
|
||||
pallet-bridge-grandpa = { path = "../../../modules/grandpa", default-features = false }
|
||||
pallet-bridge-messages = { path = "../../../modules/messages", default-features = false }
|
||||
pallet-shift-session-manager = { path = "../../../modules/shift-session-manager", default-features = false }
|
||||
pallet-substrate-bridge = { path = "../../../modules/substrate", default-features = false }
|
||||
|
||||
# Substrate Dependencies
|
||||
|
||||
@@ -100,7 +99,6 @@ std = [
|
||||
"pallet-grandpa/std",
|
||||
"pallet-randomness-collective-flip/std",
|
||||
"pallet-shift-session-manager/std",
|
||||
"pallet-substrate-bridge/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
|
||||
@@ -72,7 +72,6 @@ pub use pallet_bridge_currency_exchange::Call as BridgeCurrencyExchangeCall;
|
||||
pub use pallet_bridge_eth_poa::Call as BridgeEthPoACall;
|
||||
pub use pallet_bridge_grandpa::Call as BridgeGrandpaMillauCall;
|
||||
pub use pallet_bridge_messages::Call as MessagesCall;
|
||||
pub use pallet_substrate_bridge::Call as BridgeMillauCall;
|
||||
pub use pallet_sudo::Call as SudoCall;
|
||||
pub use pallet_timestamp::Call as TimestampCall;
|
||||
|
||||
@@ -407,10 +406,6 @@ impl pallet_session::Config for Runtime {
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
impl pallet_substrate_bridge::Config for Runtime {
|
||||
type BridgedChain = bp_millau::Millau;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
// This is a pretty unscientific cap.
|
||||
//
|
||||
@@ -480,7 +475,6 @@ construct_runtime!(
|
||||
BridgeKovan: pallet_bridge_eth_poa::<Instance2>::{Module, Call, Config, Storage, ValidateUnsigned},
|
||||
BridgeRialtoCurrencyExchange: pallet_bridge_currency_exchange::<Instance1>::{Module, Call},
|
||||
BridgeKovanCurrencyExchange: pallet_bridge_currency_exchange::<Instance2>::{Module, Call},
|
||||
BridgeMillau: pallet_substrate_bridge::{Module, Call, Storage, Config<T>},
|
||||
BridgeMillauGrandpa: pallet_bridge_grandpa::{Module, Call, Storage},
|
||||
BridgeDispatch: pallet_bridge_dispatch::{Module, Event<T>},
|
||||
BridgeMillauMessages: pallet_bridge_messages::{Module, Call, Storage, Event<T>},
|
||||
@@ -619,29 +613,6 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl bp_millau::MillauHeaderApi<Block> for Runtime {
|
||||
fn best_blocks() -> Vec<(bp_millau::BlockNumber, bp_millau::Hash)> {
|
||||
BridgeMillau::best_headers()
|
||||
}
|
||||
|
||||
fn finalized_block() -> (bp_millau::BlockNumber, bp_millau::Hash) {
|
||||
let header = BridgeMillau::best_finalized();
|
||||
(header.number, header.hash())
|
||||
}
|
||||
|
||||
fn incomplete_headers() -> Vec<(bp_millau::BlockNumber, bp_millau::Hash)> {
|
||||
BridgeMillau::require_justifications()
|
||||
}
|
||||
|
||||
fn is_known_block(hash: bp_millau::Hash) -> bool {
|
||||
BridgeMillau::is_known_header(hash)
|
||||
}
|
||||
|
||||
fn is_finalized_block(hash: bp_millau::Hash) -> bool {
|
||||
BridgeMillau::is_finalized_header(hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl bp_millau::MillauFinalityApi<Block> for Runtime {
|
||||
fn best_finalized() -> (bp_millau::BlockNumber, bp_millau::Hash) {
|
||||
let header = BridgeMillauGrandpa::best_finalized();
|
||||
|
||||
Reference in New Issue
Block a user