Re-scanned in-scope Nim files after the May 28 squash (`29c64b3` etc.):
-`src/chat/delivery/waku_client.nim`
-`vendor/nwaku/waku/factory/node_factory.nim` (mirrored in loose `vendor/logos-lez-rln/logos-delivery/` and canonical `vendor/logos-lez-rln/logos-delivery-module/vendor/logos-delivery/`)
Cross-checked all three mirror trees — byte-identical pre- and post-edit.
Findings still standing from the prior (pre-squash) pass:
1.**`watchMembershipConfirmation`** helper in `rln_gifter/client.nim` — already extracted; both call sites (mix-node self-reg in `node_factory.nim` and chat-client cushion in `waku_client.nim`) use it. **No further work.**
2.**Hex-encoding loops** — now 3 sites in `node_factory.nim` (gifterSubmitOnce, waitForChainCommit, statusHandler), all producing uppercase hex from `seq[byte]`. Previous pass deferred this; with a third site added, extraction now meets rule-of-three cleanly.
3.**`is_member_registered` JSON params** — 2 sites, but with different post-processing contracts (raw `uint64` vs `MembershipStatusResponse`). The shared prefix is only the param string + parseJson. Not worth a wrapper.
4.**`callRlnFetcher + parseJson` patterns** — different field shapes per call. No real duplication.
5.**rpc_codec.nim getField sequences** — standard protobuf decoder shape, not duplication.
## Critical assessment
| Candidate | Verdict | Reason |
|---|---|---|
| `watchMembershipConfirmation` | DONE in prior pass | Already a single helper in `rln_gifter/client.nim`. |
| Hex-encoding loops (3 sites) | EXTRACT | Three byte-identical 3-line loops, all uppercase. Natural home is `logos_core_client.nim` (already houses the matching `hexToBytes32` decoder). |
| `is_member_registered` params | SKIP | 2 sites, distinct return contracts. Wrapping the shared 4-line prefix would still need 2 callers that diverge on parsing — net loss. |
| `callRlnFetcher` + parseJson | SKIP | Each callsite parses a different schema. No common middle. |
1.**High confidence**: add `bytesToHexUpper*` to `logos_core_client.nim`, replace 3 hex loops in `node_factory.nim`. Done.
2.**Deferred**: none worth pursuing.
## Applied
Added `proc bytesToHexUpper*(bytes: openArray[byte]): string` (8 lines incl. doc-comment) to `vendor/nwaku/waku/waku_mix/logos_core_client.nim`, placed adjacent to the existing `hexToBytes32` decoder.
Replaced 3 inline `newStringOfCap + for-loop + toHex` blocks in `vendor/nwaku/waku/factory/node_factory.nim` with `mix_lez_client.bytesToHexUpper(...)` calls. Net change: −12 lines in node_factory.nim, +8 in logos_core_client.nim = **−4 lines** plus clarity gain (intent visible at call site).