Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Make fee market instantiable #1171

Merged
merged 14 commits into from
Apr 12, 2022
Merged

Make fee market instantiable #1171

merged 14 commits into from
Apr 12, 2022

Conversation

boundless-forest
Copy link
Member

@boundless-forest boundless-forest commented Apr 11, 2022

As I didn't change the locked_id or pallet_id of the original pangolin<> pangoro fee market config, so no migration needs.

Note: The original fee market runtime API has broken changes, add an extra instance: u8 param.

@AurevoirXavier AurevoirXavier mentioned this pull request Apr 12, 2022
2 tasks
@boundless-forest boundless-forest marked this pull request as ready for review April 12, 2022 07:40
@boundless-forest
Copy link
Member Author

@hackfisher @AurevoirXavier Please take a review! This is a top priority!

Comment on lines +569 to +570
0 => FeeMarket::market_fee().and_then(|fee| Some(darwinia_fee_market_rpc_runtime_api::Fee { amount: fee })),
1 => WithParachainFeeMarket::market_fee().and_then(|fee| Some(darwinia_fee_market_rpc_runtime_api::Fee { amount: fee })),
Copy link
Contributor

@hackfisher hackfisher Apr 12, 2022

Choose a reason for hiding this comment

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

Acceptable but maybe better to match against the pallet's index instead of Instance index?

Instance index is part the implementation instead of interface, and should not be exposed?

FeeMarket is Instance1 (0 =>...), WithParachainFeeMarket is Instance2 (1 =>...), as a result the instance concept is also changed here, working as another concept for rpc interface.

Copy link
Contributor

@hackfisher hackfisher Apr 12, 2022

Choose a reason for hiding this comment

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

Same issue also applies to usable_balance rpc interface, especially do internal implementation refactor changing from "Instance0 and Instannce1" to "Instance1 and Instannce2".

But since apps has already been use it, we just keep it as it is for now considering compatibility.

@github-actions
Copy link

Commit ecc88c3

Pangolin

Check Runtime Version

Check Storage Prefix

+ Pallet: "WithParachainFeeMarket"​

Pangoro

Check Runtime Version

Check Storage Prefix

@AurevoirXavier AurevoirXavier merged commit 97915bd into main Apr 12, 2022
@AurevoirXavier AurevoirXavier deleted the bear-mul-instance branch April 12, 2022 10:34
@AurevoirXavier AurevoirXavier added this to the Darwinia v0.12.2 milestone Apr 13, 2022
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.

3 participants