Skip to content

✅ test: Document legacy Transaction.hash() is correct per EIP-155#276

Merged
roninjin10 merged 1 commit intomainfrom
fix/issue-94-tx-hash
Jan 4, 2026
Merged

✅ test: Document legacy Transaction.hash() is correct per EIP-155#276
roninjin10 merged 1 commit intomainfrom
fix/issue-94-tx-hash

Conversation

@roninjin10
Copy link
Contributor

Summary

Test plan

  • Pre-EIP-155 transactions match viem
  • EIP-155 transactions match viem
  • serialize → hash roundtrip works

🤖 Generated with Claude Code

Closes #94 - Investigated Transaction.hash() RLP encoding for legacy
transactions. The implementation is correct:
- Transaction hash = keccak256(RLP([nonce, gasPrice, gasLimit, to, value, data, v, r, s]))
- This is distinct from signing hash which varies by EIP-155

Added cross-validation tests with viem to document and verify correct behavior
for both pre-EIP-155 (v=27) and EIP-155 (v=37, chainId=1) transactions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dist Error Error Jan 4, 2026 11:18am
voltaire Error Error Jan 4, 2026 11:18am

@roninjin10 roninjin10 merged commit f4f60a7 into main Jan 4, 2026
19 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Transaction.hash() may use wrong RLP encoding for legacy transactions

1 participant