Indexer integration test: hybrid swap attributes → swap_events columns #82

Closed
opened 2026-04-09 03:24:18 +00:00 by PlasticDigits · 5 comments
PlasticDigits commented 2026-04-09 03:24:18 +00:00 (Migrated from gitlab.com)

Evidence

  • indexer/src/indexer/parser.rs; TEST_GAP_MATRIX.md

Acceptance criteria

  • Fixture proves book_return_amount, effective_fee_bps, etc.

Epic

#61

## Evidence - `indexer/src/indexer/parser.rs`; `TEST_GAP_MATRIX.md` ## Acceptance criteria - [ ] Fixture proves `book_return_amount`, `effective_fee_bps`, etc. ## Epic #61
PlasticDigits commented 2026-04-09 03:24:19 +00:00 (Migrated from gitlab.com)

marked this issue as related to #61

marked this issue as related to #61
PlasticDigits commented 2026-04-16 03:30:32 +00:00 (Migrated from gitlab.com)

@brouie Please verify GitLab #82. Implemented: public ParsedSwap + parse_swaps in indexer/src/indexer/parser.rs; integration test indexer/tests/swap_events_hybrid_columns.rs (hybrid_swap_attrs_round_trip_to_swap_events_columns) parses a hybrid wasm fixture and asserts swap_events DB columns for effective_fee_bps, pool_return_amount, book_return_amount, limit_book_offer_consumed. CI: TEST_DATABASE_URL set in .github/workflows/test.yml for indexer Postgres. Local: cd indexer && cargo test --test swap_events_hybrid_columns with Postgres.

@brouie Please verify GitLab #82. Implemented: public `ParsedSwap` + `parse_swaps` in `indexer/src/indexer/parser.rs`; integration test `indexer/tests/swap_events_hybrid_columns.rs` (`hybrid_swap_attrs_round_trip_to_swap_events_columns`) parses a hybrid wasm fixture and asserts `swap_events` DB columns for `effective_fee_bps`, `pool_return_amount`, `book_return_amount`, `limit_book_offer_consumed`. CI: `TEST_DATABASE_URL` set in `.github/workflows/test.yml` for indexer Postgres. Local: `cd indexer && cargo test --test swap_events_hybrid_columns` with Postgres.
Brouie commented 2026-04-20 06:49:17 +00:00 (Migrated from gitlab.com)

@PlasticDigits Verified on current main. Acceptance criteria:

  • Fixture proves book_return_amount, effective_fee_bps, etc.: indexer/tests/swap_events_hybrid_columns.rs present with test hybrid_swap_attrs_round_trip_to_swap_events_columns. Ran locally against Postgres 16 (cl8y-dex-terraclassic-postgres-1 container): 1 passed, 0 failed in 0.37s.

Test structure: parses hybrid wasm fixture via ParsedSwap / parse_swaps in indexer/src/indexer/parser.rs, then asserts swap_events DB columns for effective_fee_bps, pool_return_amount, book_return_amount, limit_book_offer_consumed round-trip correctly.

TEST_DATABASE_URL env var in .github/workflows/test.yml confirmed for CI Postgres. Closing.

@PlasticDigits Verified on current main. Acceptance criteria: - [x] Fixture proves book_return_amount, effective_fee_bps, etc.: indexer/tests/swap_events_hybrid_columns.rs present with test hybrid_swap_attrs_round_trip_to_swap_events_columns. Ran locally against Postgres 16 (cl8y-dex-terraclassic-postgres-1 container): **1 passed, 0 failed** in 0.37s. Test structure: parses hybrid wasm fixture via ParsedSwap / parse_swaps in indexer/src/indexer/parser.rs, then asserts swap_events DB columns for effective_fee_bps, pool_return_amount, book_return_amount, limit_book_offer_consumed round-trip correctly. TEST_DATABASE_URL env var in .github/workflows/test.yml confirmed for CI Postgres. Closing.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-20 06:49:21 +00:00
PlasticDigits commented 2026-05-26 08:00:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #199

mentioned in issue #199
PlasticDigits commented 2026-05-29 03:19:29 +00:00 (Migrated from gitlab.com)

mentioned in issue #216

mentioned in issue #216
Sign in to join this conversation.
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#82
No description provided.