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

Make base fee configurable from storage #68

Merged
merged 3 commits into from
Dec 16, 2023

Conversation

alistair-singh
Copy link

@@ -857,7 +860,8 @@ pub mod bridging {
/// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%)
/// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs
/// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals.
pub const BridgeHubEthereumBaseFeeInROC: u128 = 2_750_872_500_000;
pub const DefaultBridgeHubEthereumBaseFeeInROC: u128 = 2_750_872_500_000;
Copy link
Author

Choose a reason for hiding this comment

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

Need the non-storage const for the tests as the storage modifier causes tests to panic as there is no underlyiing storage provider.

Copy link

@vgeddes vgeddes left a comment

Choose a reason for hiding this comment

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

+1

@@ -857,7 +860,8 @@ pub mod bridging {
/// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%)
/// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs
/// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals.
pub const BridgeHubEthereumBaseFeeInROC: u128 = 2_750_872_500_000;
pub const DefaultBridgeHubEthereumBaseFeeInROC: u128 = 2_750_872_500_000;
pub storage BridgeHubEthereumBaseFeeInROC: u128 = DefaultBridgeHubEthereumBaseFeeInROC::get();
Copy link

Choose a reason for hiding this comment

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

Can we remove the ROC from the name, so that in production the storage key will be the same for all runtimes?

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in 0043e6a.

@@ -857,7 +860,8 @@ pub mod bridging {
/// (initially was calculated by test `OutboundQueue::calculate_fees` - ETH/ROC 1/400 and fee_per_gas 20 GWEI = 2200698000000 + *25%)
/// Needs to be more than fee calculated from DefaultFeeConfig FeeConfigRecord in snowbridge:parachain/pallets/outbound-queue/src/lib.rs
/// Polkadot uses 10 decimals, Kusama and Rococo 12 decimals.
pub const BridgeHubEthereumBaseFeeInROC: u128 = 2_750_872_500_000;
pub const DefaultBridgeHubEthereumBaseFeeInROC: u128 = 2_750_872_500_000;
Copy link

Choose a reason for hiding this comment

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

Ditto, I think we should remove ROC from the name.

Copy link
Author

Choose a reason for hiding this comment

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

Resolved in 0043e6a.

@alistair-singh alistair-singh merged commit 85470f8 into snowbridge Dec 16, 2023
5 of 10 checks passed
@alistair-singh alistair-singh deleted the alistair/make-base-fee-storage branch December 16, 2023 13:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants