From 2d8a3e30b8a018be56f12e1152a59574e38348d8 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 2 Nov 2023 10:24:02 +0200 Subject: [PATCH] starts with adding snowbridge conf --- bridges/primitives/chain-asset-hub-rococo/src/lib.rs | 4 ---- cumulus/parachains/common/src/lib.rs | 1 + cumulus/parachains/common/src/snowbridge_config.rs | 6 ++++++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 cumulus/parachains/common/src/snowbridge_config.rs diff --git a/bridges/primitives/chain-asset-hub-rococo/src/lib.rs b/bridges/primitives/chain-asset-hub-rococo/src/lib.rs index 2b011ae55b1f..f1ea1e9c88c9 100644 --- a/bridges/primitives/chain-asset-hub-rococo/src/lib.rs +++ b/bridges/primitives/chain-asset-hub-rococo/src/lib.rs @@ -46,10 +46,6 @@ frame_support::parameter_types! { /// Base delivery fee to `BridgeHubRococo`. /// (initially was calculated by test `BridgeHubRococo::can_calculate_weight_for_paid_export_message_with_reserve_transfer`) pub const BridgeHubRococoBaseFeeInRocs: u128 = 1214739988; - - /// User fee for ERC20 token transfer back to Ethereum. - /// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/411 and fee_per_gas 15 GWEI = 18679250000 + *25%) - pub const TransferERC20TokenBaseFeeInRocs: u128 = 23349062500; } /// Identifier of AssetHubRococo in the Rococo relay chain. diff --git a/cumulus/parachains/common/src/lib.rs b/cumulus/parachains/common/src/lib.rs index 4ebc2cc6e1e2..77d45fd0a3b7 100644 --- a/cumulus/parachains/common/src/lib.rs +++ b/cumulus/parachains/common/src/lib.rs @@ -22,6 +22,7 @@ pub mod rococo; pub mod westend; pub mod wococo; pub mod xcm_config; +pub mod snowbridge_config; pub use constants::*; pub use opaque::*; pub use types::*; diff --git a/cumulus/parachains/common/src/snowbridge_config.rs b/cumulus/parachains/common/src/snowbridge_config.rs new file mode 100644 index 000000000000..84635380d949 --- /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/411 and fee_per_gas 15 GWEI = 18679250000 + *25%) + /// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs + pub const BridgeHubEthereumBaseFeeInRocs: u128 = 23349062500; +}