test(indexer): fix parked-lifecycle fixtures for #285 _contract_address scoping #775

Merged
Brouie merged 1 commit from qa/parked-lifecycle-fixture into main 2026-06-05 07:03:43 +00:00
Brouie commented 2026-06-05 06:52:08 +00:00 (Migrated from gitlab.com)

Drive-by while working #316: tests/limit_order_parked_lifecycle.rs::park_event_then_claim_updates_db_and_api_filters is RED on main.

Root cause: #285 (e951e61) scoped lifecycle event parsing to the runtime-reserved _contract_address key only (wasm_contract_addr / is_wasm_contract_addr_key), but this test's wasm_park_tx / wasm_claim_tx fixtures still emit the unreserved contract_address. So the park/claim events never match the seeded pair, the order stays active, and the assertion (parked_expired) fails. The #285 fixture sweep updated the parser unit-test fixtures but missed this integration test.

Fix: point both fixtures at _contract_address (what wasmd actually stamps). Test-only — production parsing is unchanged. Verified the test passes after the change.

Drive-by while working #316: tests/limit_order_parked_lifecycle.rs::park_event_then_claim_updates_db_and_api_filters is RED on main. Root cause: #285 (e951e61) scoped lifecycle event parsing to the runtime-reserved `_contract_address` key only (wasm_contract_addr / is_wasm_contract_addr_key), but this test's wasm_park_tx / wasm_claim_tx fixtures still emit the unreserved `contract_address`. So the park/claim events never match the seeded pair, the order stays `active`, and the assertion (`parked_expired`) fails. The #285 fixture sweep updated the parser unit-test fixtures but missed this integration test. Fix: point both fixtures at `_contract_address` (what wasmd actually stamps). Test-only — production parsing is unchanged. Verified the test passes after the change.
Brouie commented 2026-06-05 06:52:23 +00:00 (Migrated from gitlab.com)

mentioned in issue #285

mentioned in issue #285
PlasticDigits commented 2026-06-05 07:02:14 +00:00 (Migrated from gitlab.com)

Security review

Commit reviewed: c5cd51295a1f980359dfc9fa650471733657716a

Scope: indexer/tests/limit_order_parked_lifecycle.rs — test fixture update only. Two mock wasm event attributes changed from contract_address to _contract_address in wasm_park_tx / wasm_claim_tx so integration fixtures match wasmd output and the #285 parser scoping (wasm_contract_addr / is_wasm_contract_addr_key). No production code, dependencies, API surface, or auth paths modified.

Method: Inspected MR diff; traced event-attribute handling through indexer/src/indexer/parser.rs (unchanged by this MR). Confirmed #285 already restricts lifecycle event attribution to the runtime-reserved _contract_address key and ignores forgeable contract_address. This MR only aligns stale test fixtures with that hardened behavior.

Outcome: FINDINGS: 0 medium+

Security review: no medium+ findings on this diff.

Inline threads: none (no findings to anchor).

## Security review **Commit reviewed:** `c5cd51295a1f980359dfc9fa650471733657716a` **Scope:** `indexer/tests/limit_order_parked_lifecycle.rs` — test fixture update only. Two mock wasm event attributes changed from `contract_address` to `_contract_address` in `wasm_park_tx` / `wasm_claim_tx` so integration fixtures match wasmd output and the #285 parser scoping (`wasm_contract_addr` / `is_wasm_contract_addr_key`). No production code, dependencies, API surface, or auth paths modified. **Method:** Inspected MR diff; traced event-attribute handling through `indexer/src/indexer/parser.rs` (unchanged by this MR). Confirmed #285 already restricts lifecycle event attribution to the runtime-reserved `_contract_address` key and ignores forgeable `contract_address`. This MR only aligns stale test fixtures with that hardened behavior. **Outcome:** `FINDINGS: 0` medium+ Security review: **no medium+ findings** on this diff. **Inline threads:** none (no findings to anchor).
PlasticDigits (Migrated from gitlab.com) merged commit 2e67269718 into main 2026-06-05 07:03:43 +00:00
PlasticDigits commented 2026-06-05 07:03:44 +00:00 (Migrated from gitlab.com)

mentioned in commit 2e67269718

mentioned in commit 2e67269718cc220bea1bdd762f7988117248709e
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!775
No description provided.