Bump dependencies (#1180)

* substrate: d0f6c1c60da22e04dd25c2eca46ebfe6f1571af0
polkadot: dd4b2e6a34a08a01b876d14641e99e7011be3463
cumulus: 9379cd6c18

* fmt

* fixed lost refs

* spelling

* benckhmarks

* fmt
This commit is contained in:
Svyatoslav Nikolsky
2021-10-25 13:24:36 +03:00
committed by Bastian Köcher
parent 6396239e18
commit e23266c7e6
78 changed files with 510 additions and 376 deletions
+16 -16
View File
@@ -50,8 +50,8 @@ pub struct RialtoPoA;
impl BridgeInstance for RialtoPoA {
fn build_signed_header_call(&self, headers: Vec<QueuedEthereumHeader>) -> Call {
let pallet_call = rialto_runtime::BridgeEthPoACall::import_signed_headers(
headers
let pallet_call = rialto_runtime::BridgeEthPoACall::import_signed_headers {
headers_with_receipts: headers
.into_iter()
.map(|header| {
(
@@ -60,23 +60,23 @@ impl BridgeInstance for RialtoPoA {
)
})
.collect(),
);
};
rialto_runtime::Call::BridgeRialtoPoa(pallet_call)
}
fn build_unsigned_header_call(&self, header: QueuedEthereumHeader) -> Call {
let pallet_call = rialto_runtime::BridgeEthPoACall::import_unsigned_header(
Box::new(into_substrate_ethereum_header(header.header())),
into_substrate_ethereum_receipts(header.extra()),
);
let pallet_call = rialto_runtime::BridgeEthPoACall::import_unsigned_header {
header: Box::new(into_substrate_ethereum_header(header.header())),
receipts: into_substrate_ethereum_receipts(header.extra()),
};
rialto_runtime::Call::BridgeRialtoPoa(pallet_call)
}
fn build_currency_exchange_call(&self, proof: Proof) -> Call {
let pallet_call =
rialto_runtime::BridgeCurrencyExchangeCall::import_peer_transaction(proof);
rialto_runtime::BridgeCurrencyExchangeCall::import_peer_transaction { proof };
rialto_runtime::Call::BridgeRialtoCurrencyExchange(pallet_call)
}
}
@@ -87,8 +87,8 @@ pub struct Kovan;
impl BridgeInstance for Kovan {
fn build_signed_header_call(&self, headers: Vec<QueuedEthereumHeader>) -> Call {
let pallet_call = rialto_runtime::BridgeEthPoACall::import_signed_headers(
headers
let pallet_call = rialto_runtime::BridgeEthPoACall::import_signed_headers {
headers_with_receipts: headers
.into_iter()
.map(|header| {
(
@@ -97,23 +97,23 @@ impl BridgeInstance for Kovan {
)
})
.collect(),
);
};
rialto_runtime::Call::BridgeKovan(pallet_call)
}
fn build_unsigned_header_call(&self, header: QueuedEthereumHeader) -> Call {
let pallet_call = rialto_runtime::BridgeEthPoACall::import_unsigned_header(
Box::new(into_substrate_ethereum_header(header.header())),
into_substrate_ethereum_receipts(header.extra()),
);
let pallet_call = rialto_runtime::BridgeEthPoACall::import_unsigned_header {
header: Box::new(into_substrate_ethereum_header(header.header())),
receipts: into_substrate_ethereum_receipts(header.extra()),
};
rialto_runtime::Call::BridgeKovan(pallet_call)
}
fn build_currency_exchange_call(&self, proof: Proof) -> Call {
let pallet_call =
rialto_runtime::BridgeCurrencyExchangeCall::import_peer_transaction(proof);
rialto_runtime::BridgeCurrencyExchangeCall::import_peer_transaction { proof };
rialto_runtime::Call::BridgeKovanCurrencyExchange(pallet_call)
}
}
@@ -39,18 +39,24 @@ impl CliEncodeCall for Millau {
Ok(match call {
Call::Raw { data } => Decode::decode(&mut &*data.0)?,
Call::Remark { remark_payload, .. } =>
millau_runtime::Call::System(millau_runtime::SystemCall::remark(
remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
)),
Call::Transfer { recipient, amount } => millau_runtime::Call::Balances(
millau_runtime::BalancesCall::transfer(recipient.raw_id(), amount.cast()),
),
millau_runtime::Call::System(millau_runtime::SystemCall::remark {
remark: remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
}),
Call::Transfer { recipient, amount } =>
millau_runtime::Call::Balances(millau_runtime::BalancesCall::transfer {
dest: recipient.raw_id(),
value: amount.cast(),
}),
Call::BridgeSendMessage { lane, payload, fee, bridge_instance_index } =>
match *bridge_instance_index {
bridge::MILLAU_TO_RIALTO_INDEX => {
let payload = Decode::decode(&mut &*payload.0)?;
millau_runtime::Call::BridgeRialtoMessages(
millau_runtime::MessagesCall::send_message(lane.0, payload, fee.cast()),
millau_runtime::MessagesCall::send_message {
lane_id: lane.0,
payload,
delivery_and_dispatch_fee: fee.cast(),
},
)
},
_ => anyhow::bail!(
@@ -61,10 +61,10 @@ impl SubstrateFinalitySyncPipeline for MillauFinalityToRialto {
header: MillauSyncHeader,
proof: GrandpaJustification<bp_millau::Header>,
) -> Bytes {
let call = rialto_runtime::BridgeGrandpaMillauCall::submit_finality_proof(
Box::new(header.into_inner()),
proof,
)
let call = rialto_runtime::BridgeGrandpaMillauCall::submit_finality_proof {
finality_target: Box::new(header.into_inner()),
justification: proof,
}
.into();
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
@@ -95,7 +95,7 @@ impl SubstrateMessageLane for MillauMessagesToRialto {
) -> Bytes {
let (relayers_state, proof) = proof;
let call: millau_runtime::Call =
millau_runtime::MessagesCall::receive_messages_delivery_proof(proof, relayers_state)
millau_runtime::MessagesCall::receive_messages_delivery_proof { proof, relayers_state }
.into();
let call_weight = call.get_dispatch_info().weight;
let genesis_hash = *self.message_lane.source_client.genesis_hash();
@@ -130,12 +130,12 @@ impl SubstrateMessageLane for MillauMessagesToRialto {
let (dispatch_weight, proof) = proof;
let FromBridgedChainMessagesProof { ref nonces_start, ref nonces_end, .. } = proof;
let messages_count = nonces_end - nonces_start + 1;
let call: rialto_runtime::Call = rialto_runtime::MessagesCall::receive_messages_proof(
self.message_lane.relayer_id_at_source.clone(),
let call: rialto_runtime::Call = rialto_runtime::MessagesCall::receive_messages_proof {
relayer_id_at_bridged_chain: self.message_lane.relayer_id_at_source.clone(),
proof,
messages_count as _,
messages_count: messages_count as _,
dispatch_weight,
)
}
.into();
let call_weight = call.get_dispatch_info().weight;
let genesis_hash = *self.message_lane.target_client.genesis_hash();
@@ -290,11 +290,11 @@ pub(crate) async fn update_rialto_to_millau_conversion_rate(
&signer,
relay_substrate_client::TransactionEra::immortal(),
UnsignedTransaction::new(
millau_runtime::MessagesCall::update_pallet_parameter(
millau_runtime::rialto_messages::MillauToRialtoMessagesParameter::RialtoToMillauConversionRate(
millau_runtime::MessagesCall::update_pallet_parameter {
parameter: millau_runtime::rialto_messages::MillauToRialtoMessagesParameter::RialtoToMillauConversionRate(
sp_runtime::FixedU128::from_float(updated_rate),
),
)
}
.into(),
transaction_nonce,
),
+24 -16
View File
@@ -82,7 +82,8 @@ mod tests {
fn millau_signature_is_valid_on_rialto() {
let millau_sign = relay_millau_client::SigningParams::from_string("//Dave", None).unwrap();
let call = rialto_runtime::Call::System(rialto_runtime::SystemCall::remark(vec![]));
let call =
rialto_runtime::Call::System(rialto_runtime::SystemCall::remark { remark: vec![] });
let millau_public: bp_millau::AccountSigner = millau_sign.public().into();
let millau_account_id: bp_millau::AccountId = millau_public.into_account();
@@ -104,7 +105,8 @@ mod tests {
fn rialto_signature_is_valid_on_millau() {
let rialto_sign = relay_rialto_client::SigningParams::from_string("//Dave", None).unwrap();
let call = millau_runtime::Call::System(millau_runtime::SystemCall::remark(vec![]));
let call =
millau_runtime::Call::System(millau_runtime::SystemCall::remark { remark: vec![] });
let rialto_public: bp_rialto::AccountSigner = rialto_sign.public().into();
let rialto_account_id: bp_rialto::AccountId = rialto_public.into_account();
@@ -132,7 +134,8 @@ mod tests {
);
let call: millau_runtime::Call =
millau_runtime::SystemCall::remark(vec![42; maximal_remark_size as _]).into();
millau_runtime::SystemCall::remark { remark: vec![42; maximal_remark_size as _] }
.into();
let payload = send_message::message_payload(
Default::default(),
call.get_dispatch_info().weight,
@@ -143,7 +146,8 @@ mod tests {
assert_eq!(Millau::verify_message(&payload), Ok(()));
let call: millau_runtime::Call =
millau_runtime::SystemCall::remark(vec![42; (maximal_remark_size + 1) as _]).into();
millau_runtime::SystemCall::remark { remark: vec![42; (maximal_remark_size + 1) as _] }
.into();
let payload = send_message::message_payload(
Default::default(),
call.get_dispatch_info().weight,
@@ -171,7 +175,8 @@ mod tests {
let maximal_dispatch_weight = send_message::compute_maximal_message_dispatch_weight(
bp_millau::max_extrinsic_weight(),
);
let call: millau_runtime::Call = rialto_runtime::SystemCall::remark(vec![]).into();
let call: millau_runtime::Call =
rialto_runtime::SystemCall::remark { remark: vec![] }.into();
let payload = send_message::message_payload(
Default::default(),
@@ -199,7 +204,8 @@ mod tests {
let maximal_dispatch_weight = send_message::compute_maximal_message_dispatch_weight(
bp_rialto::max_extrinsic_weight(),
);
let call: rialto_runtime::Call = millau_runtime::SystemCall::remark(vec![]).into();
let call: rialto_runtime::Call =
millau_runtime::SystemCall::remark { remark: vec![] }.into();
let payload = send_message::message_payload(
Default::default(),
@@ -222,7 +228,8 @@ mod tests {
#[test]
fn rialto_tx_extra_bytes_constant_is_correct() {
let rialto_call = rialto_runtime::Call::System(rialto_runtime::SystemCall::remark(vec![]));
let rialto_call =
rialto_runtime::Call::System(rialto_runtime::SystemCall::remark { remark: vec![] });
let rialto_tx = Rialto::sign_transaction(
Default::default(),
&sp_keyring::AccountKeyring::Alice.pair(),
@@ -240,7 +247,8 @@ mod tests {
#[test]
fn millau_tx_extra_bytes_constant_is_correct() {
let millau_call = millau_runtime::Call::System(millau_runtime::SystemCall::remark(vec![]));
let millau_call =
millau_runtime::Call::System(millau_runtime::SystemCall::remark { remark: vec![] });
let millau_tx = Millau::sign_transaction(
Default::default(),
&sp_keyring::AccountKeyring::Alice.pair(),
@@ -288,10 +296,10 @@ mod rococo_tests {
justification.clone(),
);
let expected =
millau_runtime::BridgeGrandpaCall::<millau_runtime::Runtime>::submit_finality_proof(
Box::new(header),
millau_runtime::BridgeGrandpaCall::<millau_runtime::Runtime>::submit_finality_proof {
finality_target: Box::new(header),
justification,
);
};
// when
let actual_encoded = actual.encode();
@@ -332,15 +340,15 @@ mod westend_tests {
votes_ancestries: vec![],
};
let actual = bp_westend::BridgeGrandpaRococoCall::submit_finality_proof(
header.clone(),
let actual = relay_kusama_client::runtime::BridgePolkadotGrandpaCall::submit_finality_proof(
Box::new(header.clone()),
justification.clone(),
);
let expected =
millau_runtime::BridgeGrandpaCall::<millau_runtime::Runtime>::submit_finality_proof(
Box::new(header),
millau_runtime::BridgeGrandpaCall::<millau_runtime::Runtime>::submit_finality_proof {
finality_target: Box::new(header),
justification,
);
};
// when
let actual_encoded = actual.encode();
@@ -39,18 +39,24 @@ impl CliEncodeCall for Rialto {
Ok(match call {
Call::Raw { data } => Decode::decode(&mut &*data.0)?,
Call::Remark { remark_payload, .. } =>
rialto_runtime::Call::System(rialto_runtime::SystemCall::remark(
remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
)),
Call::Transfer { recipient, amount } => rialto_runtime::Call::Balances(
rialto_runtime::BalancesCall::transfer(recipient.raw_id().into(), amount.0),
),
rialto_runtime::Call::System(rialto_runtime::SystemCall::remark {
remark: remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
}),
Call::Transfer { recipient, amount } =>
rialto_runtime::Call::Balances(rialto_runtime::BalancesCall::transfer {
dest: recipient.raw_id().into(),
value: amount.0,
}),
Call::BridgeSendMessage { lane, payload, fee, bridge_instance_index } =>
match *bridge_instance_index {
bridge::RIALTO_TO_MILLAU_INDEX => {
let payload = Decode::decode(&mut &*payload.0)?;
rialto_runtime::Call::BridgeMillauMessages(
rialto_runtime::MessagesCall::send_message(lane.0, payload, fee.0),
rialto_runtime::MessagesCall::send_message {
lane_id: lane.0,
payload,
delivery_and_dispatch_fee: fee.0,
},
)
},
_ => anyhow::bail!(
@@ -69,7 +69,10 @@ impl SubstrateFinalitySyncPipeline for RialtoFinalityToMillau {
let call = millau_runtime::BridgeGrandpaCall::<
millau_runtime::Runtime,
millau_runtime::RialtoGrandpaInstance,
>::submit_finality_proof(Box::new(header.into_inner()), proof)
>::submit_finality_proof {
finality_target: Box::new(header.into_inner()),
justification: proof,
}
.into();
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
@@ -95,7 +95,7 @@ impl SubstrateMessageLane for RialtoMessagesToMillau {
) -> Bytes {
let (relayers_state, proof) = proof;
let call: rialto_runtime::Call =
rialto_runtime::MessagesCall::receive_messages_delivery_proof(proof, relayers_state)
rialto_runtime::MessagesCall::receive_messages_delivery_proof { proof, relayers_state }
.into();
let call_weight = call.get_dispatch_info().weight;
let genesis_hash = *self.message_lane.source_client.genesis_hash();
@@ -130,12 +130,12 @@ impl SubstrateMessageLane for RialtoMessagesToMillau {
let (dispatch_weight, proof) = proof;
let FromBridgedChainMessagesProof { ref nonces_start, ref nonces_end, .. } = proof;
let messages_count = nonces_end - nonces_start + 1;
let call: millau_runtime::Call = millau_runtime::MessagesCall::receive_messages_proof(
self.message_lane.relayer_id_at_source.clone(),
let call: millau_runtime::Call = millau_runtime::MessagesCall::receive_messages_proof {
relayer_id_at_bridged_chain: self.message_lane.relayer_id_at_source.clone(),
proof,
messages_count as _,
messages_count: messages_count as _,
dispatch_weight,
)
}
.into();
let call_weight = call.get_dispatch_info().weight;
let genesis_hash = *self.message_lane.target_client.genesis_hash();
@@ -289,11 +289,11 @@ pub(crate) async fn update_millau_to_rialto_conversion_rate(
&signer,
relay_substrate_client::TransactionEra::immortal(),
UnsignedTransaction::new(
rialto_runtime::MessagesCall::update_pallet_parameter(
rialto_runtime::millau_messages::RialtoToMillauMessagesParameter::MillauToRialtoConversionRate(
rialto_runtime::MessagesCall::update_pallet_parameter {
parameter: rialto_runtime::millau_messages::RialtoToMillauMessagesParameter::MillauToRialtoConversionRate(
sp_runtime::FixedU128::from_float(updated_rate),
),
)
}
.into(),
transaction_nonce,
),
@@ -35,15 +35,15 @@ impl CliEncodeCall for RialtoParachain {
Ok(match call {
Call::Raw { data } => Decode::decode(&mut &*data.0)?,
Call::Remark { remark_payload, .. } => rialto_parachain_runtime::Call::System(
rialto_parachain_runtime::SystemCall::remark(
remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
),
rialto_parachain_runtime::SystemCall::remark {
remark: remark_payload.as_ref().map(|x| x.0.clone()).unwrap_or_default(),
},
),
Call::Transfer { recipient, amount } => rialto_parachain_runtime::Call::Balances(
rialto_parachain_runtime::BalancesCall::transfer(
recipient.raw_id().into(),
amount.0,
),
rialto_parachain_runtime::BalancesCall::transfer {
dest: recipient.raw_id().into(),
value: amount.0,
},
),
Call::BridgeSendMessage { .. } =>
anyhow::bail!("Bridge messages are not (yet) supported here",),
@@ -77,7 +77,10 @@ impl SubstrateFinalitySyncPipeline for WestendFinalityToMillau {
let call = millau_runtime::BridgeGrandpaCall::<
millau_runtime::Runtime,
millau_runtime::WestendGrandpaInstance,
>::submit_finality_proof(Box::new(header.into_inner()), proof)
>::submit_finality_proof {
finality_target: Box::new(header.into_inner()),
justification: proof,
}
.into();
let genesis_hash = *self.finality_pipeline.target_client.genesis_hash();
@@ -60,9 +60,12 @@ macro_rules! select_bridge {
fn encode_init_bridge(
init_data: InitializationData<<Source as ChainBase>::Header>,
) -> <Target as Chain>::Call {
rialto_runtime::SudoCall::sudo(Box::new(
rialto_runtime::BridgeGrandpaMillauCall::initialize(init_data).into(),
))
rialto_runtime::SudoCall::sudo {
call: Box::new(
rialto_runtime::BridgeGrandpaMillauCall::initialize { init_data }
.into(),
),
}
.into()
}
@@ -78,8 +81,10 @@ macro_rules! select_bridge {
let initialize_call = millau_runtime::BridgeGrandpaCall::<
millau_runtime::Runtime,
millau_runtime::RialtoGrandpaInstance,
>::initialize(init_data);
millau_runtime::SudoCall::sudo(Box::new(initialize_call.into())).into()
>::initialize {
init_data,
};
millau_runtime::SudoCall::sudo { call: Box::new(initialize_call.into()) }.into()
}
$generic
@@ -98,7 +103,9 @@ macro_rules! select_bridge {
millau_runtime::BridgeGrandpaCall::<
millau_runtime::Runtime,
millau_runtime::WestendGrandpaInstance,
>::initialize(init_data)
>::initialize {
init_data,
}
.into()
}
@@ -113,7 +113,8 @@ impl RegisterParachain {
// step 1: reserve a parachain id
let relay_genesis_hash = *relay_client.genesis_hash();
let relay_sudo_account: AccountIdOf<Relaychain> = relay_sign.public().into();
let reserve_parachain_id_call: CallOf<Relaychain> = ParaRegistrarCall::reserve().into();
let reserve_parachain_id_call: CallOf<Relaychain> =
ParaRegistrarCall::reserve {}.into();
let reserve_parachain_signer = relay_sign.clone();
wait_until_transaction_is_finalized::<Relaychain>(
relay_client
@@ -155,11 +156,11 @@ impl RegisterParachain {
para_genesis_header.encode().len(),
para_code.len(),
);
let register_parathread_call: CallOf<Relaychain> = ParaRegistrarCall::register(
para_id,
ParaHeadData(para_genesis_header.encode()),
ParaValidationCode(para_code),
)
let register_parathread_call: CallOf<Relaychain> = ParaRegistrarCall::register {
id: para_id,
genesis_head: ParaHeadData(para_genesis_header.encode()),
validation_code: ParaValidationCode(para_code),
}
.into();
let register_parathread_signer = relay_sign.clone();
wait_until_transaction_is_finalized::<Relaychain>(
@@ -211,16 +212,18 @@ impl RegisterParachain {
lease_begin,
lease_end,
);
let force_lease_call: CallOf<Relaychain> = SudoCall::sudo(Box::new(
ParaSlotsCall::force_lease(
para_id,
relay_sudo_account.clone(),
para_deposit,
lease_begin,
lease_end,
)
.into(),
))
let force_lease_call: CallOf<Relaychain> = SudoCall::sudo {
call: Box::new(
ParaSlotsCall::force_lease {
para: para_id,
leaser: relay_sudo_account.clone(),
amount: para_deposit,
period_begin: lease_begin,
period_count: lease_end.saturating_sub(lease_begin).saturating_add(1),
}
.into(),
),
}
.into();
let force_lease_signer = relay_sign.clone();
relay_client
@@ -176,10 +176,10 @@ impl SwapTokens {
//
// prepare `Currency::transfer` call that will happen at the target chain
let bridged_currency_transfer: CallOf<Target> = pallet_balances::Call::transfer(
accounts.source_account_at_bridged_chain.clone().into(),
token_swap.target_balance_at_bridged_chain,
)
let bridged_currency_transfer: CallOf<Target> = pallet_balances::Call::transfer {
dest: accounts.source_account_at_bridged_chain.clone().into(),
value: token_swap.target_balance_at_bridged_chain,
}
.into();
let bridged_currency_transfer_weight =
bridged_currency_transfer.get_dispatch_info().weight;
@@ -218,9 +218,9 @@ impl SwapTokens {
},
)
.await?;
let create_swap_call: CallOf<Source> = pallet_bridge_token_swap::Call::create_swap(
token_swap.clone(),
Box::new(bp_token_swap::TokenSwapCreation {
let create_swap_call: CallOf<Source> = pallet_bridge_token_swap::Call::create_swap {
swap: token_swap.clone(),
swap_creation_params: Box::new(bp_token_swap::TokenSwapCreation {
target_public_at_bridged_chain,
swap_delivery_and_dispatch_fee,
bridged_chain_spec_version,
@@ -228,7 +228,7 @@ impl SwapTokens {
bridged_currency_transfer_weight,
bridged_currency_transfer_signature,
}),
)
}
.into();
// start tokens swap
@@ -341,7 +341,7 @@ impl SwapTokens {
// prepare `claim_swap` message that will be sent over the bridge
let claim_swap_call: CallOf<Source> =
pallet_bridge_token_swap::Call::claim_swap(token_swap).into();
pallet_bridge_token_swap::Call::claim_swap { swap: token_swap }.into();
let claim_swap_message = bp_message_dispatch::MessagePayload {
spec_version: SOURCE_SPEC_VERSION,
weight: claim_swap_call.get_dispatch_info().weight,
@@ -359,12 +359,13 @@ impl SwapTokens {
claim_swap_message.clone(),
)
.await?;
let send_message_call: CallOf<Target> = pallet_bridge_messages::Call::send_message(
TARGET_TO_SOURCE_LANE_ID,
claim_swap_message,
claim_swap_delivery_and_dispatch_fee,
)
.into();
let send_message_call: CallOf<Target> =
pallet_bridge_messages::Call::send_message {
lane_id: TARGET_TO_SOURCE_LANE_ID,
payload: claim_swap_message,
delivery_and_dispatch_fee: claim_swap_delivery_and_dispatch_fee,
}
.into();
// send `claim_swap` message
let target_genesis_hash = *target_client.genesis_hash();
@@ -406,7 +407,7 @@ impl SwapTokens {
} else {
log::info!(target: "bridge", "Cancelling the swap");
let cancel_swap_call: CallOf<Source> =
pallet_bridge_token_swap::Call::cancel_swap(token_swap.clone()).into();
pallet_bridge_token_swap::Call::cancel_swap { swap: token_swap.clone() }.into();
let _ = wait_until_transaction_is_finalized::<Source>(
source_client
.submit_and_watch_signed_extrinsic(
+1
View File
@@ -9,6 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
codec = { package = "parity-scale-codec", version = "2.2.0" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }
scale-info = { version = "1.0", features = ["derive"] }
# Bridge dependencies
+7 -6
View File
@@ -21,6 +21,7 @@ use bp_polkadot_core::{AccountAddress, Balance, PolkadotLike};
use bp_runtime::Chain;
use codec::{Compact, Decode, Encode};
use frame_support::weights::Weight;
use scale_info::TypeInfo;
use sp_runtime::FixedU128;
/// Unchecked Kusama extrinsic.
@@ -61,7 +62,7 @@ where
///
/// See: [link](https://github.com/paritytech/polkadot/blob/master/runtime/kusama/src/lib.rs)
#[allow(clippy::large_enum_variant)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub enum Call {
/// System pallet.
#[codec(index = 0)]
@@ -77,21 +78,21 @@ pub enum Call {
BridgePolkadotMessages(BridgePolkadotMessagesCall),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum SystemCall {
#[codec(index = 1)]
remark(Vec<u8>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BalancesCall {
#[codec(index = 0)]
transfer(AccountAddress, Compact<Balance>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgePolkadotGrandpaCall {
#[codec(index = 0)]
@@ -103,7 +104,7 @@ pub enum BridgePolkadotGrandpaCall {
initialize(bp_header_chain::InitializationData<<PolkadotLike as Chain>::Header>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgePolkadotMessagesCall {
#[codec(index = 2)]
@@ -135,7 +136,7 @@ pub enum BridgePolkadotMessagesCall {
),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub enum BridgePolkadotMessagesParameter {
#[codec(index = 0)]
PolkadotToKusamaConversionRate(FixedU128),
@@ -9,6 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
codec = { package = "parity-scale-codec", version = "2.2.0" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }
scale-info = { version = "1.0", features = ["derive"] }
# Bridge dependencies
@@ -21,6 +21,7 @@ use bp_polkadot_core::{AccountAddress, Balance, PolkadotLike};
use bp_runtime::Chain;
use codec::{Compact, Decode, Encode};
use frame_support::weights::Weight;
use scale_info::TypeInfo;
use sp_runtime::FixedU128;
/// Unchecked Polkadot extrinsic.
@@ -61,7 +62,7 @@ where
///
/// See: [link](https://github.com/paritytech/kusama/blob/master/runtime/kusam/src/lib.rs)
#[allow(clippy::large_enum_variant)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub enum Call {
/// System pallet.
#[codec(index = 0)]
@@ -77,21 +78,21 @@ pub enum Call {
BridgeKusamaMessages(BridgeKusamaMessagesCall),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum SystemCall {
#[codec(index = 1)]
remark(Vec<u8>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BalancesCall {
#[codec(index = 0)]
transfer(AccountAddress, Compact<Balance>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeKusamaGrandpaCall {
#[codec(index = 0)]
@@ -103,7 +104,7 @@ pub enum BridgeKusamaGrandpaCall {
initialize(bp_header_chain::InitializationData<<PolkadotLike as Chain>::Header>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeKusamaMessagesCall {
#[codec(index = 2)]
@@ -135,7 +136,7 @@ pub enum BridgeKusamaMessagesCall {
),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub enum BridgeKusamaMessagesParameter {
#[codec(index = 0)]
KusamaToPolkadotConversionRate(FixedU128),
+1
View File
@@ -9,6 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
codec = { package = "parity-scale-codec", version = "2.2.0" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }
scale-info = { version = "1.0", features = ["derive"] }
# Bridge dependencies
+5 -4
View File
@@ -21,6 +21,7 @@ use bp_polkadot_core::PolkadotLike;
use bp_runtime::Chain;
use codec::{Decode, Encode};
use frame_support::weights::Weight;
use scale_info::TypeInfo;
/// Unchecked Rococo extrinsic.
pub type UncheckedExtrinsic = bp_polkadot_core::UncheckedExtrinsic<Call>;
@@ -60,7 +61,7 @@ where
///
/// See: [link](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs)
#[allow(clippy::large_enum_variant)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub enum Call {
/// System pallet.
#[codec(index = 0)]
@@ -73,14 +74,14 @@ pub enum Call {
BridgeMessagesWococo(BridgeMessagesWococoCall),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum SystemCall {
#[codec(index = 1)]
remark(Vec<u8>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeGrandpaWococoCall {
#[codec(index = 0)]
@@ -92,7 +93,7 @@ pub enum BridgeGrandpaWococoCall {
initialize(bp_header_chain::InitializationData<<PolkadotLike as Chain>::Header>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeMessagesWococoCall {
#[codec(index = 3)]
+1
View File
@@ -9,6 +9,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
codec = { package = "parity-scale-codec", version = "2.2.0" }
relay-substrate-client = { path = "../client-substrate" }
relay-utils = { path = "../utils" }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
# Bridge dependencies
bridge-runtime-common = { path = "../../bin/runtime-common" }
+5 -4
View File
@@ -21,6 +21,7 @@ use bp_polkadot_core::PolkadotLike;
use bp_runtime::Chain;
use codec::{Decode, Encode};
use frame_support::weights::Weight;
use scale_info::TypeInfo;
/// Unchecked Wococo extrinsic.
pub type UncheckedExtrinsic = bp_polkadot_core::UncheckedExtrinsic<Call>;
@@ -60,7 +61,7 @@ where
///
/// See: [link](https://github.com/paritytech/polkadot/blob/master/runtime/rococo/src/lib.rs)
#[allow(clippy::large_enum_variant)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
pub enum Call {
/// System pallet.
#[codec(index = 0)]
@@ -73,14 +74,14 @@ pub enum Call {
BridgeMessagesRococo(BridgeMessagesRococoCall),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum SystemCall {
#[codec(index = 1)]
remark(Vec<u8>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeGrandpaRococoCall {
#[codec(index = 0)]
@@ -92,7 +93,7 @@ pub enum BridgeGrandpaRococoCall {
initialize(bp_header_chain::InitializationData<<PolkadotLike as Chain>::Header>),
}
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)]
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeMessagesRococoCall {
#[codec(index = 3)]