Skip to main content
Skip to main content
Anteyko

Case Study

Wallet and RPC Compatibility: EVM edge cases

MetaMask, Rabby, signing flows, JSON-RPC correctness. One broken edge breaks the product.

8Wallet providers supported
0Support tickets after launch
Year: 2025Industry: Web3 / DeFiTimeline: 5 weeks

Problem

EVM dApp failed for a significant share of users: MetaMask worked, Rabby and others threw silent failures or wrong signing results. RPC responses differed by provider. No single test suite covered wallet + RPC matrix.

Constraints

  • Support MetaMask, Rabby, WalletConnect, injected wallets
  • Correct handling of eth_sign vs personal_sign vs EIP-712
  • JSON-RPC must match spec (chainId, gas, nonce edge cases)
  • No user-facing errors on unsupported chains

Solution

Built a wallet compatibility matrix and RPC correctness checklist. Wrapped signing in a single abstraction with fallbacks per wallet type. Added provider-agnostic JSON-RPC tests (including error payloads). Documented edge cases and added E2E for MetaMask + Rabby on two chains.

Deliverables

  • Wallet abstraction layer (sign, send, switchChain)
  • RPC correctness test suite (request/response + errors)
  • Compatibility matrix: MetaMask, Rabby, WalletConnect
  • E2E scenarios for main wallets on testnet/mainnet
  • Runbook for new wallet onboarding

Artifacts

Documents and deliverables from the project

Wallet compatibility matrix

MetaMask, Rabby, WC

RPC correctness suite

JSON-RPC tests

Onboarding runbook

New wallets

Verification / Quality gates

6-phase checklist before release

01Build
Pass
02Wallet abstraction tests
Pass
03RPC correctness suite
Pass
04MetaMask E2E
Pass
05Rabby E2E
Pass
06WalletConnect E2E
Pass
All gates passed
6/6

Tech stack

TypeScriptethers.jsviemPlaywrightHardhat

Outcome

Zero wallet-related support tickets after rollout. Rabby and MetaMask both pass full flow. New wallet added in 1 day using runbook.

Hard parts we solved

Signing method divergence

eth_sign deprecated, personal_sign and EIP-712 differ by wallet. We normalized to a single API and mapped per wallet under the hood.

JSON-RPC correctness

Some providers return extra fields or wrong error codes. We asserted on a minimal compliant subset and documented known deviations. Built a normalization layer that strips non-standard fields, coerces hex values to consistent casing, and maps provider-specific error codes to our internal error taxonomy — so the application layer never sees raw provider quirks.

Automated Cross-Wallet Regression Suite

Manual testing across 8 wallets × 3 networks × 4 signing methods = 96 combinations per release. We built a Playwright-based test harness that automates wallet interactions via browser extension injection: MetaMask and Rabby are installed as unpacked extensions, test scripts programmatically approve transactions and sign messages, and assertion checks verify the on-chain result matches the expected state. The suite runs in CI on every PR and catches regressions that manual QA would miss — like Rabby silently changing its EIP-712 domain separator encoding in a minor update, which would have broken typed data signing for 15% of users.

Have a similar project? Get an estimate or book a call.