Problem
The scripts/setup.js setup script generates wallet private keys and addresses for all EVM chains, but misses Citrea mainnet (CITREA_WALLET_PRIVATE_KEY, CITREA_WALLET_ADDRESS).
Only CITREA_TESTNET_WALLET_PRIVATE_KEY and CITREA_TESTNET_WALLET_ADDRESS are generated via the privateKeysToGenerate and addressesToGenerate arrays.
This causes the API to crash on startup with:
TypeError: Cannot read properties of undefined (reading 'toHexString')
at new SigningKey
at new Wallet
at new EvmClient
at new CitreaBaseClient
at new CitreaClient
Root Cause
scripts/setup.js lines 378-388 and 414-424 list all EVM wallet keys/addresses to generate, but CITREA_WALLET_PRIVATE_KEY and CITREA_WALLET_ADDRESS are missing from both arrays (only CITREA_TESTNET_* is included).
Fix
Add the following to privateKeysToGenerate:
'CITREA_WALLET_PRIVATE_KEY'
Add the following to addressesToGenerate:
Workaround
Manually add to .env:
CITREA_WALLET_PRIVATE_KEY=<same as other EVM keys>
CITREA_WALLET_ADDRESS=<same as other EVM addresses>
Problem
The
scripts/setup.jssetup script generates wallet private keys and addresses for all EVM chains, but misses Citrea mainnet (CITREA_WALLET_PRIVATE_KEY,CITREA_WALLET_ADDRESS).Only
CITREA_TESTNET_WALLET_PRIVATE_KEYandCITREA_TESTNET_WALLET_ADDRESSare generated via theprivateKeysToGenerateandaddressesToGeneratearrays.This causes the API to crash on startup with:
Root Cause
scripts/setup.jslines 378-388 and 414-424 list all EVM wallet keys/addresses to generate, butCITREA_WALLET_PRIVATE_KEYandCITREA_WALLET_ADDRESSare missing from both arrays (onlyCITREA_TESTNET_*is included).Fix
Add the following to
privateKeysToGenerate:'CITREA_WALLET_PRIVATE_KEY'Add the following to
addressesToGenerate:'CITREA_WALLET_ADDRESS'Workaround
Manually add to
.env: