Cover photo

Sending EIP-4844 Blob Transactions with ethers.js and kzg-wasm

EIP-4844 Blob Transactions


EIP-4844 introduces blob transactions (Type 3) as part of Proto-Danksharding. While the specification is well documented, sending blob transactions in practice still comes with real-world constraints around tooling and RPC support.

This article summarizes hands-on experimentation with ethers.js v6 and kzg-wasm, focusing on what currently works, what does not, and how to get a minimal setup running.


If you are not interested in code and just want to create a blob, https://blobsender.xyz provides a simple interface where anyone can write a message and submit it as a blob on Ethereum.


Current limitations

There are two important things to understand up front.

Browser wallets and connectors do not support sending blob transactions yet.
Blob transactions must currently be sent from a backend or script that directly controls a private key.

RPC support for EIP-4844 is still inconsistent.
Even on Sepolia, many public RPC endpoints reject blob transactions or do not support them at all.


RPC support on Sepolia

RPC support turned out to be one of the main friction points. Around 20 Sepolia RPC providers were tested while working on this. Many rejected blob transactions or failed due to missing EIP-4844 support.

The following public RPC endpoints worked reliably for sending blob transactions on Sepolia:

https://sepolia.infura.io/v3/YOUR_API_KEY
https://ethereum-sepolia-rpc.publicnode.com
https://eth-sepolia.api.onfinality.io/public
https://0xrpc.io/sep
https://sepolia.drpc.org

This list is included in the repository so others do not need to test providers themselves.


Repository and code

All working examples referenced in this article live here:

https://github.com/0xKurt/eip-4844-ethers-examples

The repository contains two scripts:

send-blob.ts
Sends a simple blob transaction.

send-blob-contract.ts
Sends a blob transaction while also calling a contract.

Both examples use ethers.js v6 and kzg-wasm and send Type 3 transactions.

At a high level, sending a blob transaction requires preparing a fixed-size blob, generating a KZG commitment and KZG proof, and sending a transaction with type: 3 and the blob attached. The examples cover both a minimal blob transaction and a blob transaction combined with a contract call.


Blobscan

Blobscan makes it easy to inspect:

  • blob versioned hashes

  • blob gas prices

  • other blob-related metadata

The scripts print direct Blobscan links using the blob versioned hash returned by ethers, which makes it easy to verify that a blob was included and inspect it.


Full walkthrough

This post is a condensed summary. A full step-by-step walkthrough of the setup, code, and transaction flow is available in the original article on Medium:

https://medium.com/@Kurt0x/sending-eip-4844-blob-transactions-using-ethers-js-and-kzg-wasm-d84224be6b81