feat: filter governance events by address#601
Conversation
📝 WalkthroughWalkthroughThis change adds address filtering for Cardano governance events by introducing Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
75d43f8 to
aa3fc76
Compare
9ea3f59 to
c0d67f1
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@filter/cardano/cardano.go`:
- Around line 232-244: matchStakeCertificates is comparing 28-byte credBytes to
entries in stakeCredentialHashes that include a 1-byte header (29 bytes), so the
equality check always fails; update matchStakeCertificates to mirror the logic
in matchAddressFilterGovernance: for each filterHash from stakeCredentialHashes,
if len(filterHash) > 28 set hashToCompare = filterHash[len(filterHash)-28:] else
hashToCompare = filterHash, then compare bytes.Equal(credBytes, hashToCompare);
this ensures header-byte handling is consistent between
matchAddressFilterGovernance and matchStakeCertificates.
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
c0d67f1 to
78b62b8
Compare
Closes #490
Summary by cubic
Add address-based filtering for Cardano governance events. This surfaces only proposals, treasury withdrawals, and vote delegations tied to the configured addresses.
Written for commit 78b62b8. Summary will update on new commits.
Summary by CodeRabbit
New Features
Tests