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

Adds transfer token user fee #7

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cumulus/parachains/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions cumulus/parachains/common/src/snowbridge_config.rs
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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())
),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ impl Contains<RuntimeCall> 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 { .. },
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt

) | RuntimeCall::EthereumOutboundQueue(
snowbridge_outbound_queue::Call::set_operating_mode { .. },
snowbridge_outbound_queue::Call::set_operating_mode { .. },
) | RuntimeCall::EthereumControl(..)
)
}
Expand Down
Loading