Skip to content

Commit

Permalink
Fixed BridgeDeposit TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Nov 20, 2024
1 parent 7ab9cec commit 7fda7b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use bp_messages::{
use bp_parachains::SingleParaStoredHeaderDataBuilder;
use bp_runtime::Chain;
use bridge_hub_common::xcm_version::XcmVersionOfDestAndRemoteBridge;
use frame_support::{parameter_types, traits::PalletInfoAccess};
use frame_support::{parameter_types, traits::{ConstU128, PalletInfoAccess}};
use frame_system::{EnsureNever, EnsureRoot};
use kusama_runtime_constants as constants;
use pallet_bridge_messages::LaneIdOf;
Expand Down Expand Up @@ -140,8 +140,6 @@ parameter_types! {
pub PriorityBoostPerParachainHeader: u64 = 920_224_664_224_664;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub PriorityBoostPerMessage: u64 = 182_044_444_444_444;
// TODO: What's the correct value? - FAIL-CI
pub storage BridgeDeposit: Balance = constants::currency::UNITS;
}

/// Proof of messages, coming from Polkadot.
Expand Down Expand Up @@ -246,7 +244,8 @@ impl pallet_xcm_bridge_hub::Config<XcmOverBridgeHubPolkadotInstance> for Runtime
type BridgeOriginAccountIdConverter =
(ParentIsPreset<AccountId>, SiblingParachainConvertsVia<Sibling, AccountId>);

type BridgeDeposit = BridgeDeposit;
// We do not allow creating bridges here (see `T::OpenBridgeOrigin` above), so there is no need to set a deposit.
type BridgeDeposit = ConstU128<0>;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
// Do not require deposit from system parachains or relay chain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use bp_messages::{
use bp_parachains::SingleParaStoredHeaderDataBuilder;
use bp_runtime::Chain;
use bridge_hub_common::xcm_version::XcmVersionOfDestAndRemoteBridge;
use frame_support::{parameter_types, traits::PalletInfoAccess};
use frame_support::{parameter_types, traits::{ConstU128, PalletInfoAccess}};
use frame_system::{EnsureNever, EnsureRoot};
use pallet_bridge_messages::LaneIdOf;
use pallet_bridge_relayers::extension::{
Expand Down Expand Up @@ -141,8 +141,6 @@ parameter_types! {
pub PriorityBoostPerParachainHeader: u64 = 9_182_241_758_241;
// see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value
pub PriorityBoostPerMessage: u64 = 1_820_444_444_444;
// TODO: @acatangiu, is there any specs about the deposit cost?
pub storage BridgeDeposit: Balance = 10 * constants::currency::UNITS;
}

/// Proof of messages, coming from Kusama.
Expand Down Expand Up @@ -247,7 +245,8 @@ impl pallet_xcm_bridge_hub::Config<XcmOverBridgeHubKusamaInstance> for Runtime {
type BridgeOriginAccountIdConverter =
(ParentIsPreset<AccountId>, SiblingParachainConvertsVia<Sibling, AccountId>);

type BridgeDeposit = BridgeDeposit;
// We do not allow creating bridges here (see `T::OpenBridgeOrigin` above), so there is no need to set a deposit.
type BridgeDeposit = ConstU128<0>;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
type AllowWithoutBridgeDeposit =
Expand Down

0 comments on commit 7fda7b5

Please sign in to comment.