From fa9c9ceed3bf2fd82bedc4850f068e4d67d214b2 Mon Sep 17 00:00:00 2001 From: Maddiaa <47148561+Maddiaa0@users.noreply.github.com> Date: Sat, 18 Jan 2025 03:27:47 +0800 Subject: [PATCH] fix: spartan accounts (#11321) --- spartan/aztec-network/templates/reth.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spartan/aztec-network/templates/reth.yaml b/spartan/aztec-network/templates/reth.yaml index 5a3b26f4cc0..323b5846874 100644 --- a/spartan/aztec-network/templates/reth.yaml +++ b/spartan/aztec-network/templates/reth.yaml @@ -39,14 +39,23 @@ spec: const genesis = JSON.parse(fs.readFileSync('/genesis-template/genesis.json', 'utf8')); + genesis.alloc[wallet.address] = { + balance: '0x3635c9adc5dea00000', // 1000 ETH in wei + }; + // Generate wallets for each index const numValidators = {{ .Values.validator.replicas }}; const numExtraAccounts = {{ .Values.ethereum.extraAccounts }}; const totalAccounts = numValidators + numExtraAccounts; + const path = "m/44'/60'/0'/0/"; for (let i = 0; i < totalAccounts; i++) { // Derive wallet for the current index - const childWallet = wallet.deriveChild(i); + const childWallet = ethers.HDNodeWallet.fromPhrase( + mnemonic, + null, + `${path}${i}` + ); // Add the wallet's address and balance to the genesis allocation genesis.alloc[childWallet.address] = {