Skip to content

init subcommand fails with RPC endpoints defined #25

@0xJem

Description

@0xJem

Running treb init on an existing foundry project led to this error:

Error: failed to initialize app: failed to load foundry config: failed to parse foundry.toml: toml: line 47 (last key "rpc_endpoints.mainnet"): incompatible types: TOML value has type map[string]any; destination has type string

This is the entry in foundry.toml:

[rpc_endpoints]
# Place ALCHEMY_API_KEY in the environment or .env file
mainnet = { endpoint = "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }

Commenting-out the endpoints fixes the error, but it would be nice if treb-cli handled the format (which is valid for foundry/forge)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions