Skip to content

fix(multichain): reject EVM chain submissions with explicit error and eliminate fabricated transaction hashes - #945

Open
mopxam-art wants to merge 1 commit into
Heliobond:mainfrom
mopxam-art:fix/multichain-no-fake-hashes
Open

mopxam-art wants to merge 1 commit into
Heliobond:mainfrom
mopxam-art:fix/multichain-no-fake-hashes

Conversation

@mopxam-art

Copy link
Copy Markdown

Why

src/lib/multichain.ts synthesized artificial hexadecimal strings and formatted them as transaction hashes (0x${chain.id}_${projectId}_... and 0x${Buffer.from(...)}) for EVM chains (Ethereum and Polygon). These fake hashes were presented as successful cross-chain submissions in API responses and internal broadcast results, even though no EVM contract call was executed.

What

  • Removed synthesized transaction hash paths in submitToChain (src/lib/multichain.ts).
  • Explicitly return unconfigured error (EVM chain submission not configured for ...: missing rpcUrl or contractAddress) when configuration is absent, and not-implemented error (EVM chain submission is not implemented for ...) when configured, leaving txHash empty ("") and success: false.
  • Updated test assertions in src/__tests__/multichain.test.ts to verify that no fabricated hash is ever emitted.

Verified

  • Added comprehensive unit tests in src/__tests__/multichain-no-fake-hashes.test.ts (105 passing, 149 across multichain suites) proving zero synthetic hashes are emitted across all project IDs, score boundaries, and target configurations.
  • All 123 test suites (1,524 tests) pass (npm test).
  • Typecheck (npx tsc --noEmit) and linter pass with 0 errors.
  • Production build (npm run build) succeeded.

Closes #921

Payout coordinate:
USDC (EVM / Base / Arbitrum / ERC20): 0x387c064ccf729a4846b62e95dc6b70e4d4c41e73

This branch has not been deployed

No deployments
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.

multichain submitToChain fabricates fake transaction hashes for EVM chains even when RPC and contract are configured

1 participant