ERC-721 floor sweep watch
Template: erc721-floor-sweep-watch ยท category: monitoring ยท risk: monitor_only
Indexes an ERC-721 collection's Transfer events and pages when a single
wallet sweeps many of them in a short window โ a floor buy-up, a bulk dump, or
a wash-trading burst. It uses a query: trigger over the indexed Transfer
table (no external cron/API), edge-triggered so one sweep is one alert.
When to use it
- get paged when a whale sweeps the floor of a collection you track
- catch a bulk dump before the floor craters
- feed a trading or governance workflow off collection flow
Generate it
rflow new --template erc721-floor-sweep-watch
# or add the workflow to an existing project
rflow add workflow erc721-floor-sweep-watchNon-interactive (CI/agents):
rflow new --template erc721-floor-sweep-watch --yes --output ./sweep \
--answer window="10 minutes" --answer sweep_threshold=5Inputs
| key | type | default |
|---|---|---|
project_name | string | erc721-floor-sweep-watch |
network / chain_id / rpc_env / rpc_url | network / chain_id / env_var / string | ethereum / 1 / ETH_RPC / a public RPC |
collection_name / collection_address | contract / address | collection / zero placeholder (replace!) |
window | string (pg interval) | 10 minutes |
sweep_threshold | int | 5 |
poll_every | duration | 1m |
channel | string | ops |
collection_name is lowercase and drives the indexed table name
(rflow_indexer_rflow_idx_<collection_name>.transfer). Run rflow tables to
see the live table and drill into who swept.
Required env vars
DATABASE_URL, the RPC env var (default ETH_RPC), TG_BOT_TOKEN,
TG_CHAT_ID โ all listed in the generated .env.example.
Safety notes
Monitor-only: no signer: and no relayers:, so the relayer engine never
boots. The contract is index-only (no event workflow triggers on it). The
query runs read-only, and the workflow ends in on_failure: dead_letter. Give
the indexer a moment to backfill the window before the first useful poll.
Run it locally
docker compose up -d # postgres on localhost:5448
# fill .env, set collection_address
rflow validate
rflow startCommon modifications
- lower
sweep_threshold/ tightenwindowfor a hair-trigger - filter to mints (
"from"= zero) by editing the query'sWHERE - widen the query to group by
"from"to catch bulk dumps by seller