Skip to content

Commit

Permalink
fix: spartan accounts (#11321)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 authored Jan 17, 2025
1 parent 77854e2 commit fa9c9ce
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spartan/aztec-network/templates/reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down

0 comments on commit fa9c9ce

Please sign in to comment.