Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Replace internal Ethers functionality with Viem - Add WAGMI support module #2203

Merged
merged 158 commits into from
May 28, 2024

Conversation

Adamj1232
Copy link
Member

Description

This PR adds a handful of update focused around the following features:

  • Replace internal Ethers functionality with Viem
    • ENS and wallet balance checking
  • Add WAGMI support module
    • Added as an external module that when added will give the dapp all of the WAGMI functionality to use with the wallets connected through W3O

To make the above changes a few project wide changes were required which include:

  • Update to the latest Typescript
  • Update tsconfig files for the TS version change
    • WAGMI requires TS strict set to true so there were a lot of changes around that across packages
  • Update rollup build config and versions

Checklist

  • Increment the version field in package.json of the package you have made changes in following semantic versioning and using alpha release tagging
  • Check the box that allows repo maintainers to update this PR
  • Test locally to make sure this feature/fix works
  • Run yarn check-all to confirm there are not any associated errors
  • Confirm this PR passes Circle CI checks
  • Add or update relevant information in the documentation

Docs Checklist

  • Include a screenshot of any changes (see docs README on running locally)
  • Add/update the appropriate package README (if applicable)
  • Add/update the related module in the docs demo (if applicable)
  • Add/update the related package in the docs/package.json file (if applicable)

Tests with demo app (injected)

  • send transaction
  • switch chains
  • sign message
  • disconnect

Tests with demo app (SDK)

  • send transaction
  • switch chains
  • sign message
  • disconnect

Adamj1232 added 30 commits April 4, 2023 10:55
… to ensure the node engine check is enforced
…ted chain usage for ens and l2s, added function for handling decimel resolution with bigints
@Adamj1232 Adamj1232 marked this pull request as ready for review May 23, 2024 17:18
Copy link

socket-security bot commented May 23, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

Copy link
Collaborator

@lnbc1QWFyb24 lnbc1QWFyb24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@Adamj1232 Adamj1232 force-pushed the feat/wagmi_support branch from eee079c to 82a46ae Compare May 28, 2024 16:46
@Adamj1232 Adamj1232 merged commit 0fdd0ac into develop May 28, 2024
3 checks passed
@Adamj1232 Adamj1232 deleted the feat/wagmi_support branch May 28, 2024 17:20
Adamj1232 added a commit that referenced this pull request May 31, 2024
* Update WC versions

* Feature - Replace internal Ethers functionality with Viem - Add WAGMI support module (#2203)

* Replaced isAddress check from ethers

* Replace Ethers BigNumber usage with browser native BigInt

* Remove ethers from common

* Testing package size

* Working as expected!

* Disable ums

* Cleanup chain usage

* More cleanup

* Ens avatar testing

* Some ethers swapped out for viem in Trezor and import map expanded

* Alittle cleanup in Trezor

* revert Trezor changes

* All is working from old commit

* Fix conflict

* Remove logs

* Return Address type to official check

* Update versions and handle type issues

* Bump Viem to latest

* Add node version check and min set to 16.15.1

* Add npmrc files with engine-strict set to true to core, react and vue to ensure the node engine check is enforced

* Added function for converting wei in both hex and string to eth, updated chain usage for ens and l2s, added function for handling decimel resolution with bigints

* Return bignumber to core for now

* cleanup and testing, removing unused code, refactor and rename to properly reflect functionality

* Remove bignumber from core again

* Fix merge issue with unstoppable resolution

* Return getText function for ens and update to viem

* Refine ci changes scope to core and related packages

* Final pass of PR for cleanup and refactor

* Remove ethers from tp

* Update to latest viem

* Update cede and WC docs

* resolve conflict

* Update config to publish viem test branches

* Update tsconfig and types

* Update node version in core

* Bump versions for release and Remove console.log

* ENS working again

* Progress within hw wallets

* Progress on chain imports

* Further refinement on viem usage of public client

* refine ledger, deprecate v1

* Update TS, revert viem changes to HW-wallets

* Handle ts errors

* Update packages for test release

* Handle all ts errors!

* Cleanup

* Making progress

* Wagmi core

* Refine imports and test a whole bunch

* Fix build errors

* Try later version of node in CI

* Add sass types to common

* Update tsconfig

* Update imports from common

* Refine types

* Update core imports

* Update svelte preprocess

* Bump common version

* More refinements to core

* Remove log

* Update tsconfig for hw-common to resolve build error

* Ensure new utils file is part of commit

* Remove unnecessary commonjs as the issue was fixed by viem team

* Use viem utils in common

* Changes to versioning and ready for testing

* Bump version

* Merge in changes from viem branch

* More updates from viem branch

* Refine package intialization and wagmi init

* testing signing

* Update wagmi disconnect

* Update viem versions

* Yarn it

* Update publish workflow to publish all packages

* Fix issue and redeploy

* Update solid node build version

* Handle build errors

* Update configs for build

* Update ci build config

* Bump arcana  node version in CI

* Fix arcana

* Fix venly

* Update gnosis pakcage.json

* Get all of the changes from viem merged and stablelized

* Use toHex function, switch chain now working

* Handle multiple wallets correctly

* Still working thru MM sdk issues

* Working through issues

* Still working through MM issues

* Connect working for sdks

* wagmi support stabilized

* Cleanup logs

* More updates to wagmi on disconnect

* Refine disconnect

* Create and test wagmi module

* Create wagmi module

* Add wagmi docs

* Update examples

* Update disconnect to handle wagmi

* Handle ts errors in wagmi package

* Refine examples and more ts fixes

* Handle more errors

* Update tags to be named as wagmi

* Update CI for deployment

* Fix CI build for wagmi

* Update tsconfig

* Update tsconfig again

* Update docs examples

* Fix build error

* cleanup exports and hook within react and document

* Refine docs

* Capsule is working!

* Add note about init object to docs and readme

* Export all wagmi functions from wagmi package

* Update docs

* Fix examples

* Bump to latest versions of wagmi and viem

* bump common version

* Bump versions for latest deps

* Bump versions for pub

* Version from wagmi to alpha flag

* Revert testing ci changes

* update CI to remove testing flow

* Remove log

* Remove capsule for failing build from demo

* Fix wagmi versioning (#2206)

* Add sunset warnings to tx preview (#2205)

* Add sunset warnings to tx preview

* Update versioning and merge in develop

* Update wagmi usage docs (#2207)

* Update wagmi usage docs

* Refine example imports

* Refine wagmi API

* Refine docs, examples and use of wallet state to pass wagmiConnector

* Merge in develop

* Update wagmi docs

* Fix - Core import of wagmi module version  (#2210)

* Update versions to publish with exact version of core

* Yarn it

* Update hw-wallet packages for type alignment (#2211)

* Update packages for type alignment

* Docs building again!

* Update .github/workflows/docs.yml

* Revert unnecessary change

* Remove alpha.1 flags

* Update versions for release

* Update docs versions

* Remove log
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