From 75042360381d8877c7b849565bd557302376aa15 Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Fri, 30 Aug 2024 09:30:09 +0200 Subject: [PATCH] Return custom local chain genesis account --- 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 621efc7e5..c6dc2c2e6 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]