Skip to content
nikicatPublic

About

Real-time Arbitrum sequencer feed transaction decoder

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

arb-wss

Real-time Arbitrum transaction decoder. Connects to the sequencer's public WebSocket feed and decodes transactions as they arrive — before they're batched to L1.

Usage

uv run python3 arb-feed.py

Output

#428731195 0x6066a9...d664 -> 0xFd086b...Cbb9 value=0 gas=44776 gasPrice=0.02gwei nonce=11 type=0  data=0xa9059cbb... (68B)

Each line: sequence number, from, to (or CREATE), value, gas params, nonce, tx type, function selector + calldata size.

How it works

  1. Connects to wss://arb1.arbitrum.io/feed — the same feed that provider nodes use
  2. Parses JSON broadcasts, filters for kind=3 (L2 messages)
  3. Decodes l2Msg: sub-type 3 = batch (8-byte length-prefixed segments), sub-type 4 = signed tx
  4. RLP-decodes each transaction (legacy/EIP-2930/EIP-1559), recovers sender

Transactions appear ~250ms after sequencer acceptance, before L1 batch posting (~5-10 min).

L2 message sub-types

Sub-type Name Description
0 UnsignedUserTx Protocol-generated (retryable redemptions)
1 ContractTx L1-originated contract call
3 Batch Container of length-prefixed sub-messages
4 SignedTx Regular user-signed transaction
6 SignedCompressedTx Brotli-compressed signed tx

About

Real-time Arbitrum sequencer feed transaction decoder

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages