Bug
In packages/nextjs/utils/scaffold-eth/decodeTxData.ts, line 20:
if (tx.input.length >= 10 && !tx.input.startsWith("0x60e06040")) {
This check is intended to skip contract creation transactions (which can't be decoded as function calls). However, the standard Solidity contract creation bytecode starts with 0x60806040 (PUSH1 0x80 PUSH1 0x40 MSTORE), not 0x60e06040.
As a result, contract creation transactions are not excluded and fall through to the function decoder, which fails to match any ABI and labels them as ⚠️ Unknown in the block explorer.
Expected behavior
Contract creation transactions should be detected and either skipped or labeled as "Contract Creation" in the block explorer.
Suggested fix
- if (tx.input.length >= 10 && !tx.input.startsWith("0x60e06040")) {
+ if (tx.input.length >= 10 && !tx.input.startsWith("0x6080604")) {
Using 0x6080604 (without the trailing digit) covers all standard Solidity init code variants. The 0x60e06040 check can be kept as an additional prefix if there are edge cases.
Environment
- Scaffold-ETH 2 (latest main, cloned 2026-03-14)
- Hardhat network (chainId 31337)
- Contracts deployed via external deploy script (not SE2's built-in deploy)
Bug
In
packages/nextjs/utils/scaffold-eth/decodeTxData.ts, line 20:This check is intended to skip contract creation transactions (which can't be decoded as function calls). However, the standard Solidity contract creation bytecode starts with
0x60806040(PUSH1 0x80 PUSH1 0x40 MSTORE), not0x60e06040.As a result, contract creation transactions are not excluded and fall through to the function decoder, which fails to match any ABI and labels them as
⚠️ Unknownin the block explorer.Expected behavior
Contract creation transactions should be detected and either skipped or labeled as "Contract Creation" in the block explorer.
Suggested fix
Using
0x6080604(without the trailing digit) covers all standard Solidity init code variants. The0x60e06040check can be kept as an additional prefix if there are edge cases.Environment