Skip to content

fix(webhooks): send camelCase eventHashes in evmContractEvents template (DX-5346)#26

Merged
johnpmitsch merged 1 commit into
mainfrom
jm/beta_bugfixes2
May 27, 2026
Merged

fix(webhooks): send camelCase eventHashes in evmContractEvents template (DX-5346)#26
johnpmitsch merged 1 commit into
mainfrom
jm/beta_bugfixes2

Conversation

@johnpmitsch

Copy link
Copy Markdown
Collaborator

Summary

  • The Webhooks API expects eventHashes (camelCase) inside evmContractEvents templateArgs (per api.quicknode.com/webhooks/rest/openapi.json). EvmContractEventsTemplate had no #[serde(rename_all = "camelCase")], so the field went on the wire as event_hashes and the API returned 500: Expected array for arg "eventHashes" — whether the field was supplied or not.
  • Added #[serde(rename_all = "camelCase")] to EvmContractEventsTemplate (the only template struct with a multi-word field; openapi audit confirmed all other webhook templates use single-word fields).
  • Added a wire-inspection regression test (create_webhook_from_template_wire_body_uses_camelcase_event_hashes) and tightened evm_contract_events_roundtrip to assert the field hits the wire as eventHashes.
  • No README changes — the documented Rust field name (event_hashes) is unchanged; only the JSON wire key changed.

Closes DX-5346.

Test plan

  • cargo check
  • just lint
  • cargo test -p quicknode-sdk --lib webhooks (32 tests pass, including new regression)

…te (DX-5346)

The Webhooks API expects `eventHashes` (camelCase) in the
`evmContractEvents` templateArgs. `EvmContractEventsTemplate` had no
serde rename, so the field was serialized as `event_hashes` and the API
returned `500: Expected array for arg "eventHashes"` whether the field
was supplied or not — making the template effectively unusable.
@johnpmitsch johnpmitsch merged commit 7123db1 into main May 27, 2026
4 checks 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.

3 participants