Skip to content

fix: hardcode Alchemy gateway URLs#186

Merged
TaprootFreak merged 1 commit intodevelopfrom
fix/hardcode-alchemy-gateway-urls
May 8, 2026
Merged

fix: hardcode Alchemy gateway URLs#186
TaprootFreak merged 1 commit intodevelopfrom
fix/hardcode-alchemy-gateway-urls

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

Summary

  • Companion to fix: hardcode EVM chain IDs #185 (chain IDs) — same principle: known Alchemy endpoints are not secrets
  • The EvmClient creates an ethers.JsonRpcProvider with ${gatewayUrl}/${apiKey} that is actively used for contract.decimals() calls in the MonitoringService
  • Stale Goerli/Mumbai gateway URLs in env vars caused NETWORK_ERROR on every monitoring cycle
  • Only ALCHEMY_API_KEY remains as env var (it's a secret)
  • CITREA_GATEWAY_URL stays as env var (non-Alchemy, deployment-specific RPC)

Test plan

  • Deploy to dfxdev
  • Verify no more NETWORK_ERROR / noNetwork in lds-api logs

Alchemy gateway URLs follow a fixed pattern per chain
(e.g. https://eth-mainnet.g.alchemy.com/v2). The env vars
contained stale Goerli/Mumbai testnet URLs causing
NETWORK_ERROR in the ethers.js provider used by
MonitoringService for ERC20 contract calls.

Only ALCHEMY_API_KEY remains as env var (it's a secret).
Citrea keeps its env var (non-Alchemy, deployment-specific RPC).
@TaprootFreak TaprootFreak marked this pull request as ready for review May 8, 2026 16:27
@TaprootFreak TaprootFreak merged commit 984ebc6 into develop May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant