Skip to content

Conversation

@samholmes
Copy link
Contributor

@samholmes samholmes commented Jan 21, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

Description

none

- Use Pino for performant logging
- Use Pino's .child() pattern for efficient scoped logging
- Add pino-pretty support for human-readable development output
- Disable logging in tests via NODE_ENV check
- Automatically rename conflicting fields (time → time_, scope → scope_)
Remove the following plugins to reduce load:
- abstract, amoy, arbitrum, avalanche, base
- bobevm, celo, ethereumclassic, ethereumpow, fantom
- filecoinfevm, filecoinfevmcalibration, holesky, hyperevm
- pulsechain, rsk, sepolia, sonic
Add serviceKeysFromUrl utility that matches API keys to URLs by hostname
with subdomain fallback support (e.g., api.example.com → example.com).
Keys can be configured with or without ports.

- Add src/util/serviceKeys.ts with ServiceKeys type and matching logic
- Add src/util/replaceUrlParams.ts for {{param}} placeholder substitution
- Add src/util/authenticateUrl.ts to combine key lookup with URL templating
- Add comprehensive tests for serviceKeysFromUrl

Refactor RPC and scan adapter configuration:
- Switch to authenticated RPC endpoints using {{apiKey}} templates
- Make scanAdapters required in EvmRpcOptions
- Update EtherscanV1/V2 adapters to use serviceKeysFromUrl
- Fix pickRandom return type to T | undefined for empty arrays
- Improve error handling when no URLs or API keys are configured
This reduces complexity and re-uses the new infrastructure.

The only trade-off is to remove the logging of the URL without the
key, which we can accept since these logs should be treated as
company sensitive.
Implement a new plugin that uses Alchemy's Address Activity webhooks for
real-time address monitoring on supported EVM chains.

New files:
- src/plugins/alchemy.ts - Main plugin implementation
- src/util/alchemyNotifyApi.ts - Alchemy Notify API client
- src/util/alchemyWebhookHandler.ts - HTTP webhook receiver with HMAC validation
- test/plugins/alchemy.test.ts - Unit tests (13 tests)

Changes:
- src/serverConfig.ts - Add webhookHost, webhookPort, alchemyWebhookSigningKey
- src/index.ts - Initialize webhook handler on server startup
- src/plugins/allPlugins.ts - Replace ethereum, polygon, optimism with Alchemy

Features:
- Batched address subscription updates (1s debounce)
- HMAC-SHA256 webhook signature validation
- Case-insensitive address matching with original case preservation
- Support for ETH_MAINNET, MATIC_MAINNET, OPT_MAINNET networks
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.

2 participants