Skip to content

Feat/issue 439 wallet screening slice1 tokentx - #442

Open
Hendobox wants to merge 2 commits into
ARPAHLS:mainfrom
Hendobox:feat/issue-439-wallet-screening-slice1-tokentx
Open

Hendobox wants to merge 2 commits into
ARPAHLS:mainfrom
Hendobox:feat/issue-439-wallet-screening-slice1-tokentx

Conversation

@Hendobox

Copy link
Copy Markdown
Contributor

Description

Slice 1 of #439: paginated Etherscan tokentx and txlistinternal so ERC-20 / internal flows are screened against the malicious / TRM risk index. Major-token volumes (USDT, USDC, DAI, WETH) resolve from operator evm.tokens (ethereum entries added in skillware/data/evm_defaults.yaml).

Acceptance mapping:

  • Paginated tokentx / txlistinternal → skills/finance/wallet_screening/skill.py (_paginate_account_action, _get_erc20_transactions, _get_internal_transactions)
  • Screen token contracts + counterparties against _tx_risk_index → _append_risk_interaction + _analyze_transactions; covered in test_tokentx_usdt_to_tornado_is_flagged / test_internal_tx_to_tornado_is_flagged
  • Major tokens via evm_config → _load_major_tokens; test_major_tokens_come_from_evm_config
  • Report additive fields (total_token_txs, total_internal_txs, transfer_kind, token_flow) without schema v2 → _generate_report_data; catalog / instructions updated

Does not include schema v2 / verdict, offline-direct mode, or live Chainalysis/TRM (later slices on #439).

Type of Change

  • New Skill — new registry bundle under skills/
  • Skill Upgrade — changes to an existing skill under skills/
  • Bug Fix — incorrect runtime or framework behavior
  • Documentation — docs, README, CONTRIBUTING only
  • Framework Feature — skillware/core/ loader, env, adapters
  • CLI — skillware/cli.py, docs/usage/cli.md
  • Examples — examples/*.py, agent loops, examples/README.md
  • Packaging — PyPI wheel, pyproject.toml, MANIFEST.in
  • RFC / meta — templates, labels, CI, or large design doc

Checklist (all PRs)

  • Linked GitHub issue (Fixes #… or Refs #…)
  • Scope matches the issue — no unrelated refactors
  • Contribution complies with Legal notice and code ownership (original work, MIT license grant, no malicious logic)
  • python -m black --check ., flake8, and ruff check . pass locally (or CI-equivalent subset)
  • pytest skills/ and pytest tests/ pass locally when relevant
  • CHANGELOG.md updated under [Unreleased] when user-visible behavior changes
  • examples/README.md updated if this PR adds, renames, or removes a runnable script
  • Ran pytest tests/test_registry_docs.py when skills, examples index, or agent-loops matrix changed
  • Ran pytest tests/test_skill_docs.py when catalog Usage Examples or provider snippets changed

New or updated skill

Bundle and metadata

  • Skill at skills/<category>/<skill_name>/ (from templates/python_skill/ or equivalent)
  • manifest.yaml: name (full ID), version, description, parameters, constitution, real issuer
  • Optional: short_description, issuer.github, issuer.org, requirements, env_vars

Effect, Directive, Assurance

  • Deterministic skill.py (Effect; no ad-hoc LLM-generated execution paths)
  • instructions.md (Directive) explains when and how to use the skill
  • card.json (Presentation) issuer matches manifest when present
  • test_skill.py (Assurance) covers execution and schema expectations
  • SkillLoader.load_skill("<category>/<skill_name>") succeeds (or deps documented)

Documentation and catalog

  • docs/skills/<category>/<skill_name>.md, category hub row, row in docs/skills/README.md, and docs/sitemap.md
  • Usage Examples for Gemini, Claude, OpenAI, DeepSeek, Ollama per skill usage template

Constitution and safety (skills only)

Read-only Etherscan / CoinGecko fetches plus bundled sanctions data. No signing. Fail closed on invalid address / missing ETHERSCAN_API_KEY. Report remains schema v1; summary.total_transactions stays normal-ETH-only.

Related Issues

Refs #439

Screen ERC-20 and internal transfers against the risk index so stablecoin
and contract-path flows are no longer invisible. Major token volumes resolve
from operator evm.tokens.

This branch has not been deployed

No deployments
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.

1 participant