Goal
Split filter/cardano/cardano.go (currently 551 lines and growing with each governance feature) into per-matcher files. Pure refactor with no behavior change.
Files
filter/cardano/cardano.go (reduce to plugin scaffolding and event routing)
filter/cardano/match_address.go (new)
filter/cardano/match_asset.go (new)
filter/cardano/match_pool.go (new)
filter/cardano/match_drep.go (new)
filter/cardano/match_event.go (new, only if event-type matching exists separately)
filter_types.go, option.go, and plugin.go stay where they are.
Changes
Move each matcher function and its private helpers into the matching new file. Keep all signatures identical and exported/unexported the same. Run the test suite after extracting each file so each commit is independently green and the diff is bisectable.
After the split, cardano.go should contain only the plugin struct and the event routing logic that dispatches each event type to the relevant matcher.
Verification
go build ./...
go test -v -race ./filter/cardano/...
golangci-lint run ./filter/cardano/...
No tests added or removed; behavior must not change. Diff should consist solely of moves and re-imports.
Dependencies
Recommended after the test coverage work for filters lands so the refactor is covered by tests, but not blocking.
Goal
Split
filter/cardano/cardano.go(currently 551 lines and growing with each governance feature) into per-matcher files. Pure refactor with no behavior change.Files
filter/cardano/cardano.go(reduce to plugin scaffolding and event routing)filter/cardano/match_address.go(new)filter/cardano/match_asset.go(new)filter/cardano/match_pool.go(new)filter/cardano/match_drep.go(new)filter/cardano/match_event.go(new, only if event-type matching exists separately)filter_types.go,option.go, andplugin.gostay where they are.Changes
Move each matcher function and its private helpers into the matching new file. Keep all signatures identical and exported/unexported the same. Run the test suite after extracting each file so each commit is independently green and the diff is bisectable.
After the split,
cardano.goshould contain only the plugin struct and the event routing logic that dispatches each event type to the relevant matcher.Verification
No tests added or removed; behavior must not change. Diff should consist solely of moves and re-imports.
Dependencies
Recommended after the test coverage work for filters lands so the refactor is covered by tests, but not blocking.