Problem
The Settings view has a TODO at line 50 for regenerating test accounts. Confirming does nothing.
Current State
- Line 50:
// TODO: Regenerate accounts
- Uses same confirmation dialog as reset
- Shows "Accounts regenerated" but nothing changes
Required Implementation
- Add
regenerateAccounts() method to Blockchain:
- Generate 10 new random private keys
- Derive addresses from private keys
- Clear existing accounts from EVM database
- Create new accounts with 10,000 ETH each
- Update
self.accounts list
- Private key generation:
- Use secure random bytes (std.crypto.random)
- 32 bytes per key
- Derive address via secp256k1 (or use evm's address derivation)
Key Files
src/views/settings.zig:48-52 - Regenerate handler
src/core/blockchain.zig - Need to add regenerateAccounts() method
Note
This is lower priority than other features. The hardcoded test accounts (Hardhat-compatible) are generally sufficient for development.
Acceptance Criteria
Problem
The Settings view has a TODO at line 50 for regenerating test accounts. Confirming does nothing.
Current State
// TODO: Regenerate accountsRequired Implementation
regenerateAccounts()method toBlockchain:self.accountslistKey Files
src/views/settings.zig:48-52- Regenerate handlersrc/core/blockchain.zig- Need to add regenerateAccounts() methodNote
This is lower priority than other features. The hardcoded test accounts (Hardhat-compatible) are generally sufficient for development.
Acceptance Criteria