Skip to content

Support reading TenderlyConfig api_key from environment variable#4332

Merged
squadgazzz merged 1 commit intomainfrom
support-env-var-tenderly-api-key
Apr 14, 2026
Merged

Support reading TenderlyConfig api_key from environment variable#4332
squadgazzz merged 1 commit intomainfrom
support-env-var-tenderly-api-key

Conversation

@squadgazzz
Copy link
Copy Markdown
Contributor

Description

The TenderlyConfig.api_key field currently deserializes as a plain string from TOML config. This means it cannot use the %ENV_VAR pattern to read secrets from environment variables at runtime, unlike CoinGeckoConfig.api_key which already supports this.

Since PR #4225 moved price estimation into a separate crate and removed the old CLI --tenderly-* arguments, the only way to configure Tenderly for the trade verifier is via the TOML [price-estimation.tenderly] section. Without env var support on the api-key field, the API key would need to be hardcoded in the ConfigMap, which is a security concern.

Changes

  • Added deserialize_string_from_env to TenderlyConfig.api_key so it supports the %ENV_VAR pattern (same as CoinGeckoConfig.api_key)

How to test

Existing tests.

@squadgazzz squadgazzz requested a review from a team as a code owner April 14, 2026 14:28
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the TenderlyConfig struct in crates/configs/src/simulator.rs to support reading the api_key from environment variables using the %ENV_VAR format via a custom deserializer. I have no feedback to provide.

@squadgazzz squadgazzz added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit df3de51 Apr 14, 2026
22 checks passed
@squadgazzz squadgazzz deleted the support-env-var-tenderly-api-key branch April 14, 2026 14:54
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants