Skip to main content
TLDR:
  • EVM nodes refuse to broadcast legacy (pre-EIP-155) transactions because they could be replayed on other EVM chains.
  • The fix: include chainId in the transaction object before signing.
  • All modern signing libraries do this automatically when you pass chainId (ethers.js, viem) or set the network/wallet to a specific chain (web3.py with a chain-aware wallet).

The error

You try to send a raw transaction through an EVM node and get:

Cause

EIP-155 made the chain ID part of the signed transaction so a signature for Ethereum mainnet can’t be replayed as-is on, say, BNB Smart Chain. Most modern EVM clients refuse to accept non-EIP-155 transactions over public RPC. If your signing code doesn’t include chainId, the resulting transaction is “legacy” pre-EIP-155 and the node rejects it.

Solution

Include chainId in the transaction object before signing. The value is the numeric chain ID of the target network — look it up on chainlist.org.
In ethers.js and viem, chainId is taken from the provider/chain object — you usually don’t have to set it manually. The error typically shows up when you’re hand-crafting a transaction or using a low-level signer that doesn’t have a chain context bound.

See also

Last modified on May 19, 2026