Skip to content

fix: stop fabricating fake EVM transaction hashes in broadcastToChains - #576

Open
Xhaka00 wants to merge 1 commit into
Heliobond:mainfrom
Xhaka00:feat/issue-504-broadcasttochains-fabricates-a-fake-transaction
Open

fix: stop fabricating fake EVM transaction hashes in broadcastToChains#576
Xhaka00 wants to merge 1 commit into
Heliobond:mainfrom
Xhaka00:feat/issue-504-broadcasttochains-fabricates-a-fake-transaction

Conversation

@Xhaka00

@Xhaka00 Xhaka00 commented Aug 31, 2026

Copy link
Copy Markdown

Overview

This PR fixes the misleading behavior where POST /v1/chains/broadcast/:projectId reported fabricated EVM transaction hashes. Now the route returns success: false with a clear "EVM submission not implemented" error for EVM chains (Ethereum/Polygon) until real on-chain submission via ethers/viem is implemented. Stellar submissions remain unchanged and still return real hashes from updateImpactScore().

Related Issue

Closes #

Changes

🚫 Stop Fabricating EVM Transaction Hashes

  • [MODIFY] src/routes/chains.ts
    • Added an explicit EVM-chain guard in POST /v1/chains/broadcast/:projectId so Ethereum/Polygon requests no longer reach the hash-fabricating path in submitToChain().
    • EVM chains now return { chain, success: false, error: "EVM submission not implemented" } instead of a fake 0x... transaction hash.
    • Removed the txHash field from EVM responses — no fabricated hash is ever reported for a submission that never touched the network.
    • Stellar path is untouched and continues to return the real hash from updateImpactScore().

Verification Results

npm test -- src/routes/__tests__/chains.test.ts
✅ 6/6 passed

Live API acceptance check:
✅ POST /v1/chains/broadcast/:projectId (Ethereum) → { chain: "ethereum", success: false, error: "EVM submission not implemented" }
✅ POST /v1/chains/broadcast/:projectId (Polygon) → { chain: "polygon", success: false, error: "EVM submission not implemented" }
✅ POST /v1/chains/broadcast/:projectId (Stellar) → real hash from updateImpactScore(), success: true
✅ No fabricated 0x... hashes appear in any EVM response
Acceptance Criteria Status
EVM chains never report a fabricated transaction hash success: false returned for Ethereum/Polygon; no txHash included
API fails clearly for unimplemented EVM submission ✅ Clear "EVM submission not implemented" error message returned
Stellar submission behavior is preserved ✅ Stellar still returns real hash from updateImpactScore() with success: true
No misleading success: true when nothing was submitted on-chain ✅ EVM results are success: false until real ethers/viem submission is implemented

Closes #504

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Xhaka00 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

broadcastToChains() fabricates a fake transaction hash for EVM chains instead of ever submitting on-chain

1 participant