Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pallet-base-fee storage utility functions #585

Conversation

tgmichel
Copy link
Contributor

No description provided.

@@ -239,6 +242,21 @@ pub mod pallet {
}
}

impl<T: Config> Pallet<T> {
pub fn set_base_fee_per_gas_inner(value: U256) -> Weight {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain the reason for doing this, it doesn't seem necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are just some convenience functions to set the storage i.e. to update the storage values on runtime upgrade from outside the pallet or write integration tests.

@@ -239,6 +242,21 @@ pub mod pallet {
}
}

impl<T: Config> Pallet<T> {
pub fn set_base_fee_per_gas_inner(value: U256) -> Weight {
Copy link
Member

Choose a reason for hiding this comment

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

Can you rename the name to without inner? I believe this won't conflict with Call as they are stored in a separate enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I also believed that was the case and previously tried, but the compiler throws duplicate definitions error.

@sorpaas sorpaas merged commit 9a15700 into polkadot-evm:master Feb 24, 2022
@tgmichel tgmichel deleted the tgm-base-fee-utility-fns-upstream branch June 24, 2022 07:39
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* `pallet-base-fee` storage utility functions

* fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants