TLDR:Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
- EVM nodes refuse to broadcast legacy (pre-EIP-155) transactions because they could be replayed on other EVM chains.
- The fix: include
chainIdin 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 includechainId, the resulting transaction is “legacy” pre-EIP-155 and the node rejects it.
Solution
IncludechainId 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
- EIP-155: Simple replay attack protection
- chainlist.org — registry of EVM chain IDs
- Error reference