DEV Community

Kurt
Kurt

Posted on

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

BlobBytes

EIP-4844 introduces blob transactions (Type 3) as part of Proto-Danksharding. Sending blob transactions in practice comes with constraints around tooling, RPC support, and transaction preparation.

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


If you just want to create a blob without diving into code, https://blobsender.xyz lets anyone write a message and submit it as a blob on Ethereum.


Current limitations

  • Browser wallets and connectors do not support blob transactions yet.
    They must be sent from a backend or script controlling a private key directly.

  • RPC support is inconsistent.
    Even on Sepolia, many public RPC endpoints reject blob transactions or do not support EIP-4844.


RPC support on Sepolia

RPC support was one of the main friction points. About 20 Sepolia RPC providers were tested. Many rejected blob transactions or lacked EIP-4844 support.

The following public RPC endpoints worked reliably:

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 to save others testing time.


Repository and code

All working examples live here:

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

The repository contains two scripts:

  • send-blob.ts – a simple blob transaction
  • send-blob-contract.ts – a blob transaction combined with a contract call

Both 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 proof, and sending a transaction with type: 3.


Blobscan

Blobscan allows inspection of:

  • blob versioned hashes
  • blob gas prices
  • other blob-related metadata

The scripts print direct links to Blobscan using the blob versioned hash returned by ethers, making verification and inspection easy.


Full walkthrough

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

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

Top comments (0)