diff --git a/cumulus/parachains/common/src/lib.rs b/cumulus/parachains/common/src/lib.rs index 4ebc2cc6e1e2..caea757e0d60 100644 --- a/cumulus/parachains/common/src/lib.rs +++ b/cumulus/parachains/common/src/lib.rs @@ -19,6 +19,7 @@ pub mod impls; pub mod kusama; pub mod polkadot; pub mod rococo; +pub mod snowbridge_config; pub mod westend; pub mod wococo; pub mod xcm_config; diff --git a/cumulus/parachains/common/src/snowbridge_config.rs b/cumulus/parachains/common/src/snowbridge_config.rs new file mode 100644 index 000000000000..8edc52c1b014 --- /dev/null +++ b/cumulus/parachains/common/src/snowbridge_config.rs @@ -0,0 +1,6 @@ +frame_support::parameter_types! { + /// User fee for ERC20 token transfer back to Ethereum. + /// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 15 GWEI = 22698000000 + *25%) + /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs + pub const BridgeHubEthereumBaseFeeInRocs: u128 = 28372500000; +} diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 4fcebe9be1bd..4983a82b8158 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -32,6 +32,7 @@ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, + snowbridge_config::BridgeHubEthereumBaseFeeInRocs, xcm_config::{ AssetFeeAsExistentialDepositMultiplier, ConcreteAssetFromSystem, RelayOrOtherSystemParachains, @@ -928,8 +929,8 @@ pub mod bridging { SiblingBridgeHub::get(), Some(( XcmBridgeHubRouterFeeAssetId::get(), - bp_asset_hub_rococo::BridgeHubRococoBaseFeeInRocs::get(), - ).into()) // TODO calculate fee factor + BridgeHubEthereumBaseFeeInRocs::get(), + ).into()) ), ]; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 5c8160da3ccb..7967e00120bb 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -226,9 +226,9 @@ impl Contains for SafeCallFilter { snowbridge_ethereum_beacon_client::Call::force_checkpoint { .. } | snowbridge_ethereum_beacon_client::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumInboundQueue( - snowbridge_inbound_queue::Call::set_operating_mode { .. }, + snowbridge_inbound_queue::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumOutboundQueue( - snowbridge_outbound_queue::Call::set_operating_mode { .. }, + snowbridge_outbound_queue::Call::set_operating_mode { .. }, ) | RuntimeCall::EthereumControl(..) ) }