ERC-20 supply watch
Template: community/erc20-supply-watch ยท category: monitoring ยท risk: monitor_only ยท community
Watches an ERC-20 for large supply changes: a Transfer FROM the zero address
is a mint, TO the zero address is a burn. Each alert reads the resulting
totalSupply() so you see the new number in the same message. No signer, no
relayer, no transactions.
Community template: fetched SHA-pinned and hash-verified at install time. The
package ships NO ABI blob โ the manifest declares the token interface
against the curated builtin erc20 standard, and the install materializes
abis/token.json from it after verifying the declared totalSupply() and
Transfer(address,address,uint256) signatures.
When to use it
- catch a surprise mint (inflation, a compromised minter role)
- watch a large burn (a buyback-and-burn, or a supply shock)
- keep an audit trail of a token's supply moves in a channel
Generate it
# a full project (fetched from the registry, hash-verified, then gated)
rflow new --template community/erc20-supply-watch
# or add the workflow to an existing project
rflow add workflow community/erc20-supply-watchNon-interactive (CI/agents):
rflow new --template community/erc20-supply-watch --yes --output ./supply \
--answer token_address=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \
--answer min_amount=1000000Inputs
| key | type | default |
|---|---|---|
project_name | string | erc20-supply-watch |
network / chain_id / rpc_env / rpc_url | network / chain_id / env_var / string | ethereum / 1 / ETH_RPC / a public RPC |
token_name / token_address / token_decimals | contract / address / int | Token / USDC mainnet / 6 |
min_amount | token_amount | 1000000 |
channel | string | ops |
tg_bot_token_env / tg_chat_id_env | env_var | TG_BOT_TOKEN / TG_CHAT_ID |
Required env vars
DATABASE_URL, the RPC env var (default ETH_RPC), and the telegram
credentials (default TG_BOT_TOKEN / TG_CHAT_ID) โ all in the generated
.env.example.
Safety notes
Monitor-only: no signer: and no relayers:, so the relayer engine never
boots. The install records the registry, commit and per-file sha256s in
.rflow/template-lock.yaml, and both workflows end in
on_failure: dead_letter.
Run it locally
docker compose up -d # postgres on localhost:5448
# fill .env, set the token address + decimals
rflow validate
rflow startCommon modifications
- drop
supply-burnif you only care about mints - tighten
min_amountto catch smaller mints - pair with the large transfer alert