Minimal example showing how to use Hypersync to stream blockchain events from Uniswap V3.
- Node.js
- pnpm
# Install dependencies
pnpm i
# Run full version with UI
node run.js
# Run minimal version (recommended for beginners)
node run-simple.js
# Run version with interactive terminal dashboard
node run-tui.js
# Run single event decoder example (Uniswap V3 swaps)
node run-decoder.js
# Run multi-event decoder example (ERC20 Transfer and Approval events)
node run-decoder-multi.js
The script streams events directly from Ethereum mainnet and displays progress as it scans the blockchain.
Note: To use other networks, change the URL in
client = HypersyncClient.new({url: "http://eth.hypersync.xyz"})
. See documentation for supported networks.
run.js
- Main example with UI for tracking Uniswap V3 eventsrun-simple.js
- Simplified version for beginnersrun-tui.js
- Example with interactive terminal dashboardrun-decoder.js
- Shows how to use Hypersync's decoder to parse Uniswap V3 swap eventsrun-decoder-multi.js
- Demonstrates decoding multiple event types (ERC20 Transfer and Approval)
For more information about Hypersync, visit the official documentation.