Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jiguantong committed Sep 30, 2022
1 parent 922e084 commit 66d07fc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
23 changes: 0 additions & 23 deletions runtime/crab-parachain/src/bridges_message/crab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ impl MessageBridge for WithCrabMessageBridge {
bp_crab_parachain::WITH_CRAB_PARACHAIN_MESSAGES_PALLET_NAME;
const RELAYER_FEE_PERCENT: u32 = 10;
const THIS_CHAIN_ID: ChainId = CRAB_PARACHAIN_CHAIN_ID;

fn bridged_balance_to_this_balance(
bridged_balance: BalanceOf<Self::BridgedChain>,
_bridged_to_this_conversion_rate_override: Option<FixedU128>,
) -> BalanceOf<Self::ThisChain> {
CrabToCrabParachainConversionRate::get().saturating_mul_int(bridged_balance)
}
}

#[derive(Clone, Copy, RuntimeDebug)]
Expand All @@ -107,22 +100,6 @@ impl ThisChainWithMessages for CrabParachain {
MessageNonce::MAX
}

fn estimate_delivery_confirmation_transaction() -> MessageTransaction<Weight> {
let inbound_data_size = InboundLaneData::<Self::AccountId>::encoded_size_hint(
bp_crab_parachain::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE,
1,
1,
)
.unwrap_or(u32::MAX);

MessageTransaction {
dispatch_weight: bp_crab_parachain::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT,
size: inbound_data_size
.saturating_add(bp_crab_parachain::EXTRA_STORAGE_PROOF_SIZE)
.saturating_add(bp_crab_parachain::TX_EXTRA_BYTES),
}
}

fn transaction_payment(transaction: MessageTransaction<Weight>) -> Balance {
// in our testnets, both per-byte fee and weight-to-fee are 1:1
messages::transaction_payment(
Expand Down
24 changes: 0 additions & 24 deletions runtime/pangolin-parachain/src/bridges_message/pangolin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ impl MessageBridge for WithPangolinMessageBridge {
bp_pangolin_parachain::WITH_PANGOLIN_PARACHAIN_MESSAGES_PALLET_NAME;
const RELAYER_FEE_PERCENT: u32 = 10;
const THIS_CHAIN_ID: ChainId = PANGOLIN_PARACHAIN_CHAIN_ID;

fn bridged_balance_to_this_balance(
bridged_balance: BalanceOf<Self::BridgedChain>,
_bridged_to_this_conversion_rate: Option<FixedU128>,
) -> BalanceOf<Self::ThisChain> {
PangolinToPangolinParachainConversionRate::get().saturating_mul_int(bridged_balance)
}
}

#[derive(Clone, Copy, RuntimeDebug)]
Expand All @@ -107,23 +100,6 @@ impl ThisChainWithMessages for PangolinParachain {
MessageNonce::MAX
}

fn estimate_delivery_confirmation_transaction() -> MessageTransaction<Weight> {
let inbound_data_size = InboundLaneData::<Self::AccountId>::encoded_size_hint(
bp_pangolin_parachain::MAXIMAL_ENCODED_ACCOUNT_ID_SIZE,
1,
1,
)
.unwrap_or(u32::MAX);

MessageTransaction {
dispatch_weight:
bp_pangolin_parachain::MAX_SINGLE_MESSAGE_DELIVERY_CONFIRMATION_TX_WEIGHT,
size: inbound_data_size
.saturating_add(bp_pangolin_parachain::EXTRA_STORAGE_PROOF_SIZE)
.saturating_add(bp_pangolin_parachain::TX_EXTRA_BYTES),
}
}

fn transaction_payment(transaction: MessageTransaction<Weight>) -> Balance {
// in our testnets, both per-byte fee and weight-to-fee are 1:1
messages::transaction_payment(
Expand Down

0 comments on commit 66d07fc

Please sign in to comment.