Skip to content

feat(wallet_screening): FTM publicKey matching and ETH sanctions index#128

Merged
rosspeili merged 1 commit into
ARPAHLS:mainfrom
Hendobox:feat/issue-115-ftm-publickey-matching
May 26, 2026
Merged

feat(wallet_screening): FTM publicKey matching and ETH sanctions index#128
rosspeili merged 1 commit into
ARPAHLS:mainfrom
Hendobox:feat/issue-115-ftm-publickey-matching

Conversation

@Hendobox
Copy link
Copy Markdown
Contributor

@Hendobox Hendobox commented May 25, 2026

Summary

  • Parse FTM properties.publicKey (list values and comma-separated strings); match only valid Ethereum 0x + 40 hex addresses.
  • Add normalize_eth_address() (lowercase, strip zero-width Unicode).
  • Build _sanctions_index at skill init; O(1) lookup via _lookup_sanctions_hits().
  • Copy records before __source_file__ tagging (no in-place mutation of loaded JSON).

Motivation

Closes the Phase 2.1 gap from #115 / #127: FTM was loaded but produced ~0 ETH sanctions hits because matching ignored publicKey.

Test plan

  • pytest tests/skills/finance/test_wallet_screening.py -v
  • Optional manual: execute({"address": "0x....."}) with ETHERSCAN_API_KEYsanctioned_entity_match: true

Out of scope

Schema v2, tx forensics (pagination/tokentx/TRM in tx flow), Phase 1 canonical pipeline, live Chainalysis/TRM APIs.

Closes #127

Relates to #115

Parse FTM properties.publicKey (lists and comma-separated values), normalize
Ethereum addresses, and build an in-memory sanctions index at init for O(1)
lookup. Copy entities before tagging __source_file__.
Closes ARPAHLS#127
Relates to ARPAHLS#115
@rosspeili rosspeili self-requested a review May 26, 2026 11:34
Copy link
Copy Markdown
Contributor

@rosspeili rosspeili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, matches #127 / RFC 2.1. FTM publicKey parsing, ETH normalization, init-time sanctions index, and no in-place entity mutation all look right. Tests pass locally (7/7 on Python 3.13). Good first slice from #115; Phase 1 can follow separately. Approved to merge once CI is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[wallet_screening] 2.1: FTM publicKey matching + ETH address index (parent: #115)

2 participants