npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

comet-txflow-replayer

v1.1.0

Published

CLI to replay and inspect Compound III (Comet) transactions from a flow.json log.

Readme

comet-txflow-replayer

Transaction capture and replay toolkit for Compound III (Comet) forensic analysis.

Comet TxFlow Replayer

A transaction capture and replay toolkit for forensic analysis of Compound III (Comet) protocol activity.

Setup

  1. Install dependencies:
npm install
# Comet TxFlow Replayer

**Comet TxFlow Replayer** is a transaction capture and forensic replay toolkit for the [Compound III (Comet)](https://compound.finance/docs/#compound-iii) protocol. It helps developers and researchers inspect and analyze on-chain activity by downloading, parsing, and saving real Ethereum transaction flows.

---

 What It Does

- Pulls recent Ethereum transactions targeting Compound III contracts
- Saves transaction metadata to a local `flow.json` file
- Designed to support decoding and simulation of tx flows
- Modular base for building protocol tooling or research pipelines

---

## Install

### Global (recommended)
```bash
npm install -g comet-txflow-replayer
comet-txflow --help

Local / project usage

npm install --save-dev comet-txflow-replayer
npx comet-txflow --limit 5 --json

Make sure you have either ALCHEMY_API_KEY or any ETH_RPC_URL in your .env file so the replay can fetch on-chain data.


Getting Started

1. Clone the Repository

git clone https://github.com/your-username/comet-txflow-replayer.git
cd comet-txflow-replayer
2. Install Dependencies
bash
Copy
Edit
npm install
3. Add Your Etherscan API Key
Create a file named .env in the project root:

env
Copy
Edit
ETHERSCAN_API_KEY=your_key_here
You can get a free key from etherscan.io

▶Usage
Run the capture script:

bash
Copy
Edit
node captureTxFlow.js
This will create a flow.json file with the latest Compound III transactions.

Project Structure
bash
Copy
Edit
comet-txflow-replayer/
├── captureTxFlow.js    # Main transaction fetcher
├── flow.json           # Output: latest fetched txs
├── .env                # Your Etherscan API key (not committed)
└── README.md           # Project overview and instructions
Future Features (Planned)
Input data decoding (ABI decoding)

Tx replay with simulated state traces

Protocol-specific action labeling

Web-based explorer or CLI visualization

## CLI Usage Examples

The `replayTxFlow.js` script now supports multiple output and filtering modes via **yargs** flags:

| Flag | Purpose |
|------|---------|
| `--limit <n>` | Process only the first **n** transactions from `flow.json` |
| `--filter successful|failed` | Include **only** transactions whose receipt `status` matches (1 = successful, 0 = failed) |
| `--json` | Stream one JSON object per line (ND-JSON) to *stdout* — great for piping into other tools |
| `--quiet` | Suppress the colourful human-readable logs (still streams JSON if `--json` is set) |
| `--output <file>` | Write an **array** of processed tx objects to the given file |
| `--verbose` | Extra debug timings / fetch details |
| `--from-block N` | Skip txs before block N |
| `--to-block N` | Skip txs after block N |

### Quick recipes

```bash
# 1. Full forensic replay (verbose)
node replayTxFlow.js

# 2. First 5 transactions only
node replayTxFlow.js --limit 5

# 3. Only failed txs, no console noise
node replayTxFlow.js --filter failed --quiet

# 4. ND-JSON stream → jq
node replayTxFlow.js --json | jq -c .

# 5. Structured array written to disk
node replayTxFlow.js --limit 20 --output txs.json --quiet

Example verbose output:

🔍 [1] Tx: 0x...
   ⛓  Block: 23031...
   📨  From : 0x...
   📥  To   : 0x...
   🔎  Function: supply
   📤  ERC20 Transfers:
       0x... → 0x... : 123.45 tokens (0xTOKEN)

License MIT — feel free to use, fork, and contribute.