fix(webhooks): send camelCase eventHashes in evmContractEvents template (DX-5346)#26
Merged
Conversation
…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.
AlejandroFabianCampos
approved these changes
May 27, 2026
theelderbeever
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eventHashes(camelCase) insideevmContractEventstemplateArgs (perapi.quicknode.com/webhooks/rest/openapi.json).EvmContractEventsTemplatehad no#[serde(rename_all = "camelCase")], so the field went on the wire asevent_hashesand the API returned500: Expected array for arg "eventHashes"— whether the field was supplied or not.#[serde(rename_all = "camelCase")]toEvmContractEventsTemplate(the only template struct with a multi-word field; openapi audit confirmed all other webhook templates use single-word fields).create_webhook_from_template_wire_body_uses_camelcase_event_hashes) and tightenedevm_contract_events_roundtripto assert the field hits the wire aseventHashes.event_hashes) is unchanged; only the JSON wire key changed.Closes DX-5346.
Test plan
cargo checkjust lintcargo test -p quicknode-sdk --lib webhooks(32 tests pass, including new regression)