Skip to content

Setup script missing Citrea mainnet wallet keys #3233

@TaprootFreak

Description

@TaprootFreak

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:

  • 'CITREA_WALLET_ADDRESS'

Workaround

Manually add to .env:

CITREA_WALLET_PRIVATE_KEY=<same as other EVM keys>
CITREA_WALLET_ADDRESS=<same as other EVM addresses>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions