Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

WETH wrap monitor

Template: community/weth-wrap-monitor ยท category: monitoring ยท risk: monitor_only ยท community

Watches WETH9's Deposit (wrap) and Withdrawal (unwrap) events and notifies a telegram channel on large ones โ€” a spike in wrapping/unwrapping often front-runs a big on-chain move. 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 weth interface against the curated builtin weth9 standard, and the install materializes abis/weth.json from it after verifying the declared Deposit(address,uint256) / Withdrawal(address,uint256) topic0s.

When to use it

  • watch for large wraps/unwraps ahead of a big swap or bridge
  • monitor WETH flow on any chain by pointing at that chain's WETH9
  • a compact example of the weth9 builtin interface

Generate it

# a full project (fetched from the registry, hash-verified, then gated)
rflow new --template community/weth-wrap-monitor
 
# or add the workflow to an existing project
rflow add workflow community/weth-wrap-monitor

Non-interactive (CI/agents):

rflow new --template community/weth-wrap-monitor --yes --output ./weth \
  --answer min_amount=100

Inputs

keytypedefault
project_namestringweth-wrap-monitor
network / chain_id / rpc_env / rpc_urlnetwork / chain_id / env_var / stringethereum / 1 / ETH_RPC / a public RPC
weth_name / weth_addresscontract / addressWETH / mainnet WETH9
min_amounttoken_amount100
channelstringops
tg_bot_token_env / tg_chat_id_envenv_varTG_BOT_TOKEN / TG_CHAT_ID

WETH is 18 decimals โ€” the threshold and formatting use 18 directly.

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
rflow validate
rflow start

Common modifications

  • change weth_address for L2s / other chains' canonical WETH
  • drop one workflow if you only care about wraps (or unwraps)
  • lower min_amount to watch all sizeable flow