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/local custom genesis account #1346

Merged
merged 1 commit into from
Aug 30, 2024
Merged
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
7 changes: 7 additions & 0 deletions runtime/local/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use astar_primitives::{
evm::EVM_REVERT_CODE,
genesis::{get_from_seed, GenesisAccount},
};
use sp_core::crypto::Ss58Codec;

/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option<Vec<u8>> {
Expand Down Expand Up @@ -54,6 +55,12 @@ pub fn default_config() -> serde_json::Value {
CommunityTreasuryPalletId::get().into_account_truncating(),
1_000_000_000 * AST,
),
(
// Private key: 0x01ab6e801c06e59ca97a14fc0a1978b27fa366fc87450e0b65459dd3515b7391
// H160 public address: 0xaaafB3972B05630fCceE866eC69CdADd9baC2771
AccountId::from_ss58check("5FQedkNQcF2fJPwkB6Z1ZcMgGti4vcJQNs6x85YPv3VhjBBT").unwrap(),
1_000_000_000 * AST,
),
];

let accounts = vec![&alice, &bob, &charlie, &dave, &eve]
Expand Down
Loading