Skip to content

Migrate EVM signing to ethers v6 - #237

Closed
sidhujag wants to merge 149 commits into
syscoin:mainfrom
sidhujag:chore/ethers-v6-keyring-migration
Closed

sidhujag wants to merge 149 commits into
syscoin:mainfrom
sidhujag:chore/ethers-v6-keyring-migration

Conversation

@sidhujag

@sidhujag sidhujag commented Jul 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace direct ethers v5 package usage in sysweb3 keyring/utils/network with ethers v6 boundaries.
  • Keep noble-backed local EVM signing while moving transaction envelope serialization and hardware final assembly through ethers v6 APIs.
  • Add EVM signer/transaction vector coverage and preserve explicit sysweb3 validation for unsupported transaction shapes.

Test plan

  • packages/sysweb3-keyring: yarn type-check
  • sysweb3: yarn test packages/sysweb3-keyring/test/unit/transactions/evm-local-signer.spec.ts --runInBand
  • sysweb3: focused Ledger suite passed during migration after updating v6-specific error assertions.
  • Earlier validation also covered sysweb3 utils/network type-checks and package builds.

Made with Cursor

jagdeep sidhu and others added 28 commits December 31, 2025 12:28
xpub will be missing for some hw wallets potentially so set evm signer and just log a warning
Preserve BIP84 public key versions for imported extended accounts and enrich Syscoin PSBT paths so imported zpub/vpub accounts can sign reliably. Remove zkSync-specific EVM transaction paths now that zkTanenbaum uses standard EVM handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix imported zpub signing and remove zkSync handling
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Share duplicate-address detection across keyring account creation paths so imported and hardware accounts cannot duplicate existing passkey smart accounts.

Co-authored-by: Cursor <cursoragent@cursor.com>
feat(keyring): add passkey smart account metadata
Keep passkey sponsor metadata aligned with the on-chain sponsor URL field and remove the stale URL hash property.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Add in-flight deduplication for `tokens=used&details=tokens` xpub
  fetches shared by getAddress/pubkey/path derivation and PSBT path
  enrichment (no TTL: derivation always sees fresh indexes once a
  request settles)
- Cache getRecommendedFee per explorer URL for 60s (fee estimation was
  refetched on every send-screen change)
- Cache txUtils.getRawTransaction responses for 60s with in-flight
  dedup; failures and null (not-yet-indexed) responses are never cached

Co-authored-by: Cursor <cursoragent@cursor.com>
perf(keyring,utils): reduce Blockbook round trips in UTXO flows
…r errors

The custom fetch-based send/sendBatch overrides threw plain
Error(json.error.message), discarding json.error.data. Custom contract
errors (e.g. ERC-7579 module reverts) became undecodable downstream:
consumers only ever saw "execution reverted". Stock ethers v5 attaches
code/data to JSON-RPC errors; restore that behavior so checkError/
spelunk and wallet error mapping can decode revert reasons again.

Bumps @sidhujag/sysweb3-keyring to 1.0.593.

Co-authored-by: Cursor <cursoragent@cursor.com>
fix(keyring): preserve JSON-RPC error code and revert data on provider errors
Co-authored-by: Cursor <cursoragent@cursor.com>
feat(keyring): Add SLH-DSA setup secret support
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…floor

fix(keyring): avoid default gas limit floor
Replace ethers v5 package usage with ethers v6 boundaries so local and hardware EVM signing use maintained transaction handling while preserving app-facing value shapes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag

sidhujag commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Closing: opened against the wrong repository. Re-opening against sidhujag/sysweb3.

@sidhujag sidhujag closed this Jul 4, 2026
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.

3 participants