Skip to content
Agentmart
Submit a tool

onchain-monitor

Monitor blockchain addresses and contracts for notable activity

Skill by aeonfun

IndexedMIT★ 782
Write a review

Chalk Labs

Need help deploying onchain-monitor?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/aeonfun-onchain-monitor

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Monitor blockchain addresses and contracts for notable activity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/onchain-monitor

What's inside

Skill name
onchain-monitor
Description
Monitor blockchain addresses and contracts for notable activity
License
MIT
Metadata
var: · title: Onchain Monitor · category: crypto
Instructions
352 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

<!-- autoresearch: variation B — sharper output (decoded transfers + counterparty labels + ranked USD-denominated one-liners + TL;DR lede); folds in A's Alchemy+Etherscan-v2 input path and C's persistent state + source-status footer + dedup. -->

> **${var}** — Watch label or chain to check. Empty = all watches. `add-address:<0x… [chain]>` is the shape the Telegram force-reply sends — it appends a new watch and exits (see step 0).

If `${var}` is set, only monitor the watch with that label or watches on that chain.

## Config

Reads `memory/on-chain-watches.yml`. If the file is missing or `watches: []`, offer to add the first watch via a Telegram force-reply (only if no `add-address` prompt was offered in the last 2 days of `memory/logs/` — dedup so an unconfigured fork isn't nagged every run), then log `ON_CHAIN_NO_CONFIG` and exit cleanly (do **not** send an alert — empty config is not an error):

```bash
./notify "No addresses on watch yet. Paste one to monitor — a 0x… wallet, optionally its chain." \
  --force-reply --placeholder "0x… base" \
  --context "onchain-monitor::add-address"
```

The reply routes back as `var=add-address:<0x… [chain]>`, handled by the config-capture branch in step 0. Record `FORCE_REPLY_OFFERED: add-address` in the log when you send it.

```yaml
# memory/on-chain-watches.yml
watches:
  - label: My Wallet
    address: "0x1234...abcd"
    chain: ethereum          # ethereum | base | arbitrum | optimism | polygon | robinhood
    type: wallet             # wallet | contract
    threshold_usd: 1000      # alert on transfers ≥ this USD value (default 1000)
  - label: Uniswap Pool
    address: "0xabcd...5678"
    chain: ethereum
    type: contract
    event_topics:            # optional — only alert on these topic0 hashes
      - "0xddf252ad..."      # ERC20 Transfer
```

Optional `memory/known-addresses.yml` — counterparty label dictionary used to humanize alerts. Lowercase keys, free-text values:
```yaml
labels:
  "0x28c6c06298d514db089934071355e5743bf21d60": "Binance 14"
  "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43": "Coinbase 10"
  "0xe592427a0aece92de3edee1f18e0157c05861564": "Uniswap V3 Router"
  "0x0000000000000000000000000000000000000000": "Zero (mint/burn)"
```

## State

`memory/on-chain-state.json` — per-watch state, persisted atomically after each successful run:

```json
{
  "My Wallet": {
    "last_block": 19345678,
    "last_run": "2026-04-20T12:00:00Z",
    "last_block_hash": "0x…",
    "alerted_tx": [
      {"hash": "0xabc...", "block_number": 19345690, "first_seen": "2026-04-20T12:00:00Z"},
      {"hash": "0xdef...", "block_number": 19345702, "first_seen": "2026-04-20T12:00:00Z"}
    ],
    "median_usd_30d": 8500
  }
}
```

- `last_block` — start block for the next run's fetch. Initialise to `current_block − 2400` (≈ 8h ETH) on first run; on `robinhood` (~0.1s blocks) use `current_block − 280000` for the same ≈ 8h window. On `robinhood`, also cap every later run at that span: if `current_block − last_block` is more than 280000 (a delayed or caught-up run; 12h late is ~420k blocks, 15 windows per direction per watch), start from `current_block − 280000` and log `CLAMPED: skipped <n> blocks` for that watch, so a late run degrades to "last ~8h" instead of walking the whole gap.
- `last_block_hash` — the canonical hash observed for `last_block` on the previous successful run. Before fetching new events, read that block again. If the hash differs, log `REORG: block <n> changed <old> → <new>`, rewind the watch to `max(0, last_block − 12)` (or the chain's documented finality depth), and replay the range. Do not send an alert until the replay completes. Keep normal transaction-hash dedup during the replay: a reorg can re-mine the same transaction in a new block, and that must not alert twice. Legacy string entries from earlier state are hashes and dedup the same way.
- `alerted_tx` — objects `{hash, block_number, first_seen}` for txs alerted in the last 7 days, capped at 200. Used for cross-run dedup by `hash`; purge by `first_seen`. `block_number` is the block the alert was seen in, kept for the audit trail.
- `median_usd_30d` — rolling median USD size of transfers at this watch; powers the `WHALE-TRANSFER` tag.

Write the file via `mv` from a tempfile so a mid-run failure cannot corrupt state. `mv` is not an allowed Bash command here, so do that move inside one `python3 -c` call (write the tempfile, then `os.replace` it onto the target), or write the whole file in one step with Write.

## Steps

Read `memory/MEMORY.md`, `memory/on-chain-watches.yml`, `memory/on-chain-state.json`, and the last 2 days of `memory/logs/` (for visibility only — state lives in the JSON file).

### 0. Config capture (Telegram force-reply)

Before the per-watch loop, intercept the add-a-watch reply. When `${var}` starts with `add-address:`, the operator replied to the force-reply prompt (offered in the Config section on an empty config) - append a watch and **exit** (no monitoring this invocation). The remainder is `<address> [chain]`.

**Shell shape.** Each Bash call is one allowed command (pipes are fine). The run refuses a call that sets a variable (`ADDR="$(...)"`, `KEYQ=""`, `cutoff=$(date ...)`), uses `case` / `if` / `for` or a `[ ... ] &&` test, joins commands with `;`, `&&` or `||`, or appends to a repo file with `>>` / `cat >>`, and `sed`, `awk`, `printf`, `touch`, `rm` and `mv` are not allowed commands; each refusal costs a model turn. So parse `${var}` in your head, edit `memory/` files with Write/Edit, write every network slug, chain id, address, block number and window into each command literally (the `<ADDRESS>`, `<FROM_BLOCK>` style placeholders in the snippets), make one call per watch, direction and window, and do file pruning and atomic writes inside one `python3 -c` call.

Work it out in your head, not in a shell script:
1. `REST` = the text after `add-address:`, leading spaces trimmed. `ADDR` = its first word; `CHAIN` = its second word lowercased, or `ethereum` when there is none. A `CHAIN` that is not one of `ethereum|base|arbitrum|optimism|polygon|robinhood` becomes `ethereum`.
2. If `ADDR` is not `0x` plus 40 hex characters (case-insensitive), send this (ADDR written in literally) and stop:
   ```bash
   ./notify "Couldn't read \"<ADDR>\" as an address. Reply with a 0x… wallet, optionally a chain."
   ```
3. Read `memory/on-chain-watches.yml` (Read; create it with Write as `watches:` if it is missing). With Edit, turn a `watches: []` line into `watches:`, and add a `watches:` line if there is none, so block items can be appended.
4. If the file already contains `ADDR` (case-insensitive), send `./notify "Already watching <ADDR>."` and stop.
5. Otherwise `SHORT` = `ADDR`'s first 6 characters (`0x` plus 4), then `…`, then its last 4. Append this block to the end of the file with Edit:
   ```yaml
     - label: "<SHORT>"
       address: "<ADDR>"
       chain: <CHAIN>
       type: wallet
       threshold_usd: 1000
   ```
   then send:
   ```bash
   ./notify 'Now watching <SHORT> on <CHAIN> (wallet, moves ≥$1000). Edit memory/on-chain-watches.yml to tune.'
   ```
6. Log under `### onchain-monitor`: `- view: add-address (var="${var}") → <ADDR> on <CHAIN>`, then **exit**.

Defaults for a captured watch: `type: wallet`, `threshold_usd: 1000`, `label` = the shortened address. The operator refines chain/type/threshold by editing `memory/on-chain-watches.yml` directly. (This appends to the end of the file, which is correct because `watches:` is the only top-level key — if a future config grows more keys, insert under `watches:` instead of at EOF.)

For each watch (filtered by `${var}`):

### 1. Fetch raw activity from `last_block` → the pinned `to_block`

Once per chain at the start of the run, resolve `current_block` and its hash. That
number is the chain's `to_block`: every watch on that chain, and every source
(Alchemy, Etherscan, RPC), queries up to it and no further. Never send `latest`,
`endblock=99999999` or an open-ended range. Each watch keeps its own `from_block`
(its `last_block`, after the clamp and any reorg rewind). For a watch with
`last_block_hash`, perform the reorg check above before constructing any query
windows.

**Path A — Alchemy** (preferred, if `ALCHEMY_API_KEY` set).

Wallets use `alchemy_getAssetTransfers` - one call returns categorized in/out history with `value`, `asset`, `category`, `hash`, `from`, `to`, `metadata.blockTimestamp`. Run it twice per watch (once with `toAddress`, once with `fromAddress`) and merge. Write the network slug, the address and both blocks in literally; `<FROM_BLOCK_HEX>` / `<TO_BLOCK_HEX>` are the block numbers as hex digits without the `0x` (convert them yourself):

```bash

From aeonfun/aeon, MIT.

Signals

Stars
782
Forks
292
Open issues
0
Last commit (this folder)
Oct 24, 2026 (19 days ago)
Last release
Jul 9, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get onchain-monitor running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying onchain-monitor?

CallGet help
Cite this page

onchain-monitor skill. Agent Mart. https://agentmart.dev/skills/aeonfun-onchain-monitor (last updated 2026-10-24)