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

fix prefunded accounts for proper development experience on PolkadotJS Apps #1053

Merged
merged 8 commits into from
May 21, 2023

Conversation

bernardoaraujor
Copy link
Contributor

After some investigation I realized that my work on #1019 was incomplete.

This PR allows for a proper development experience on PolkadotJS Apps

Comment on lines +55 to 63
#[allow(dead_code)]
type AccountPublic = <Signature as Verify>::Signer;

/// Generate an account ID from seed.
/// For use with `AccountId32`, `dead_code` if `AccountId20`.
#[allow(dead_code)]
pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId
where
AccountPublic: From<<TPublic::Pair as Pair>::Public>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not remove these dead code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The template is usually the main reference newcomers use to figure out how to use the Frontier crates.

I didn't want to get rid of the code that could potentially be used when someone wants to use AccountId32, and that's why I left this get_account_id_from_seed there.

Maybe the ideal solution would be to have two templates? One showcasing the usage of AccountId20 and the other AccountId32. Downside is double effort for maintaing two runtimes.

wdyt @sorpaas ?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah but we probably should add some docs explaining this.

@sorpaas sorpaas merged commit 7374fec into master May 21, 2023
@sorpaas sorpaas deleted the bar/template-eth-prefunded-accounts branch May 21, 2023 15:42
ashutoshvarma pushed a commit to AstarNetwork/frontier that referenced this pull request May 29, 2023
…S Apps (polkadot-evm#1053)

* add eth prefunded accounts to template

* fix Account Lookup

* rm unnecessary mut

* fix prefunded accounts + sudo

* taplo format

* clippy

* lint hex_literal import
ashutoshvarma pushed a commit to AstarNetwork/frontier that referenced this pull request Jun 8, 2023
…S Apps (polkadot-evm#1053)

* add eth prefunded accounts to template

* fix Account Lookup

* rm unnecessary mut

* fix prefunded accounts + sudo

* taplo format

* clippy

* lint hex_literal import
girazoki pushed a commit to moondance-labs/frontier that referenced this pull request Jun 19, 2023
…S Apps (polkadot-evm#1053)

* add eth prefunded accounts to template

* fix Account Lookup

* rm unnecessary mut

* fix prefunded accounts + sudo

* taplo format

* clippy

* lint hex_literal import
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.

3 participants