From 2d0aa10fa42855959bdcf3409c1017a05307846f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Pa=C4=8Dandi?= <3002868+Dinonard@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:43:34 +0200 Subject: [PATCH] Return custom local chain genesis account (#1346) --- runtime/local/src/genesis_config.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/local/src/genesis_config.rs b/runtime/local/src/genesis_config.rs index 621efc7e51..c6dc2c2e61 100644 --- a/runtime/local/src/genesis_config.rs +++ b/runtime/local/src/genesis_config.rs @@ -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> { @@ -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]