Skip to content

Add fart2fartcoin: detect a fart, buy Fartcoin - #379

Closed
rdyplayerB wants to merge 1 commit into
openhome-dev:devfrom
rdyplayerB:ability/fart2fartcoin
Closed

rdyplayerB wants to merge 1 commit into
openhome-dev:devfrom
rdyplayerB:ability/fart2fartcoin

Conversation

@rdyplayerB

Copy link
Copy Markdown

Fart2Fart(coin)

Every confirmed fart in the room buys Fartcoin. No wake word, no confirmation, no regrets.

"Warning. Room-clearing event detected. Magnitude six point two. Duration one point four seconds. Open a window and be on smell lookout."
"Bought one dollar of Fartcoin, about five point nine seven seven Fartcoin."

Sells a whole number of dollars of USDC on Base through the user's Bankr wallet and lands Fartcoin on Solana in one cross-chain swap. Spend limits are Bankr's (bankr.bot → Security); the ability only guards against buying the same fart twice. A fresh install is in dry run until the user says "turn fart trading on".

Trigger words: fart finder, fart detector, flatulence, fart trading, fart buy, fartcoin

Built on

Layout

  • main.py — voice skill: set dollars per fart, trading on/off, report, holdings, balance, plus Fart Finder's status/arm/disarm/sensitivity
  • background.py — cloud daemon: poll, announce, buy hook, arrival check, daily line
  • trade.py — pure Bankr functions and the source of truth; inlined into the two cloud files because the sandbox caches sibling modules across pushes
  • devkit_functions.py, listener/, pi/ — device side, from Fart Finder

Testing

  • Verified live on 2026-09-16 with a Mac standing in for the DevKit: a fart clip played through the speakers was detected, and nine seconds later Bankr filled a $1 buy (Base tx 0xf50b8ef8…d93a, 5.977 Fartcoin confirmed on Solana).
  • 123 unit tests, no network. Passes validate_ability.py and the upload scan.
  • Not yet run on DevKit hardware.

Notes for review

  • Bankr requires a UUID idempotencyKey; it is derived deterministically from the fart event id.
  • The Fartcoin position is small enough that the Bankr web wallet hides it by default; the API reports it with showLowValueTokens.

🤖 Generated with Claude Code

Fart2Fart(coin): Fart Finder detection plus an automatic Bankr buy of a
whole-dollar amount of USDC into Fartcoin on Solana on every detected fart.
Cross-chain Base USDC -> Solana Fartcoin in one Bankr swap; spend limits are
Bankr's. Verified live on a Mac stand-in on 2026-09-16.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rdyplayerB
rdyplayerB requested a review from a team as a code owner September 16, 2026 17:08
@github-actions

Copy link
Copy Markdown
Contributor

🔀 Branch Merge Check

PR direction: ability/fart2fartcoin → dev

✅ Passed — ability/fart2fartcoin → dev is a valid merge direction

@github-actions

Copy link
Copy Markdown
Contributor

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions github-actions Bot added the community-ability Community-contributed ability label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Ability Validation Passed

📋 Validating: community/fart2fartcoin
  ✅ All checks passed!

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Lint Results

🔧 Formatting fixes available

This PR is from a fork, so fixes could not be pushed automatically. Download the python-lint-results artifact from the workflow run for the patch file, then run:

git apply autofix.patch

❌ __init__.py Must Be Empty

The following __init__.py files must be completely empty:

community/fart2fartcoin/listener/__init__.py

Files linted: community/fart2fartcoin/background.py community/fart2fartcoin/devkit_functions.py community/fart2fartcoin/listener/classify.py community/fart2fartcoin/listener/copy.py community/fart2fartcoin/listener/gate.py community/fart2fartcoin/listener/magnitude.py community/fart2fartcoin/listener/pipeline.py community/fart2fartcoin/main.py community/fart2fartcoin/trade.py

✅ Flake8 — Passed

Fix the remaining issues and push again. The lint will re-run automatically.

@uzair401 uzair401 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Closing.

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

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants