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

update wagmi & rainbow for walletConnectV2 #381

Merged
merged 7 commits into from
Jun 26, 2023
Merged

Conversation

technophile-04
Copy link
Collaborator

@technophile-04 technophile-04 commented Jun 19, 2023

Description

Updated wagmi and rainbowkit there were close to no breaking changes and were only related to WalletConnect in both wagmi and rainbowkit checkout -> wagmi migration from 0.11.x -> 0.12.x and rainbow kit migration guide

Demo :

Screen.Recording.2023-06-19.at.6.46.05.PM.mov

TODO :

  • We will be needing the projectId for the demo purpose ^ I created a test projectId

Additional Information

Related Issues

None

Your ENS/address: shivbhonde.eth

Copy link
Member

@carletex carletex left a comment

Choose a reason for hiding this comment

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

I deployed a contract to Sepolia, changed the scaffold.config to point to it, and got this:

image

@technophile-04 technophile-04 marked this pull request as draft June 20, 2023 08:13
@technophile-04
Copy link
Collaborator Author

I deployed a contract to Sepolia, changed the scaffold.config to point to it, and got this:

Yes, it happened with me too !! For some reason, it works on goerli...I am having a look at it

@technophile-04
Copy link
Collaborator Author

technophile-04 commented Jun 20, 2023

Ok so after hard debugging found this -> wevm/wagmi#2219 (comment), so as suggested switched to jsonRpcProvider in 7454c8f also it makes sense now why goerli was working and was only problem with sepolia.

Also while looking for a solution I came across this discussion -> rainbow-me/rainbowkit#1229 , So I think it's better we get #229 rolling soon 🙌

Here is the live link: https://wallet-connect-sage.vercel.app/

Note : Not all wallets are transitioned yet as mentioned in rainbow-me/rainbowkit#1229

@technophile-04 technophile-04 marked this pull request as ready for review June 20, 2023 12:42
@carletex
Copy link
Member

Thanks for this @technophile-04 Good work!

Everything seems to be working. But I don't really understand this:

Ethers v5 doesn't support Sepolia yet. Will need to use the jsonRpcProvider as a workaround and enter the URL manually.

We were using ethers 5 in the previous wagmi / rainbowkit version, right? And sepolia was working.

@technophile-04
Copy link
Collaborator Author

Ethers v5 doesn't support Sepolia yet. Will need to use the jsonRpcProvider as a workaround and enter the URL manually.

Yeah ! I am confused too, there was something in 0.12.0 that lead it to break (my assumption since it was not breaking at 0.11.7), I have asked the question here about it wevm/wagmi#2219 (comment) .

Btw while testing I noticed till now weren't actually using our RPC when DApps were deployed to sepolia it was always defaulted to rpc.sepolia.org(public provider) ....checkout networks tabs of -> https://sepolia-test.vercel.app

Maybe we can wait a few days until more rainbowkit patches comes out and hopefully will get an answer for this wevm/wagmi#2219 (comment) too 🙌

@carletex
Copy link
Member

Btw while testing I noticed till now weren't actually using our RPC when DApps were deployed to sepolia it was always defaulted to rpc.sepolia.org(public provider) ....checkout networks tabs of -> https://sepolia-test.vercel.app/

Oh, this makes sense. As you said in the Wagmi issue, it seems that 0.11 has a fallback that was used when the first provider
failed.

Maybe we can wait a few days until more rainbowkit patches comes out and hopefully will get an answer for this wevm/wagmi#2219 (comment) too raised_hands

Your call!

@technophile-04
Copy link
Collaborator Author

technophile-04 commented Jun 26, 2023

Hey guys thanks 🙌, merging this

RainbowKit enabled WalletConnect v2 by default with 0.12.15 and 1.0.2. We are continuing support for 0.12.x in case your dApp has not yet upgraded to wagmi v1 and RainbowKit v1.

Original post -> https://www.rainbowkit.com/guides/walletconnect-v2

I think we should get #352 rollin as soon though

@technophile-04 technophile-04 merged commit 123e6d8 into main Jun 26, 2023
1 check passed
@technophile-04 technophile-04 deleted the feat/walletConnectv2 branch June 26, 2023 05:42
kmjones1979 added a commit that referenced this pull request Jul 3, 2023
* Update SE-2 nomenclautre  (#317)

* Fix autoConnect when contract not deployed (#292)

* oxford comma lol

* Fix icon visibility on dark mode in EtherInput (#320)

* Update README: Add Vercel ENV var to disable type/lint checking (#327)

* Fix typo (#334)

Fix typo at code snippet

* README: Updated SE-2 custom hook section (#330)

Co-authored-by: KcPele <fidekg123@gmail.com>
Co-authored-by: Shiv Bhonde <shivbhonde04@gmail.com>
Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>

* Remove duplicated HINT on README (#335)

* PR and Issue templates (#329)

* Native currency symbol and price as per target network (#322)

* useAppStore => useGlobalState (#338)

* Event history filter type (#333)

* fix: event history filter type

Fixes #332

* fix: make scaffold event history config separate type

* fix: prettier broke due to invalid syntax

* fix: ts error after generating contract

* Indexed prop + example

---------

Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>

* Update README: custom hooks section (#339)

* fix: assert type as Abi to avoid ts error (#350)

* fix: assert type as Abi to avoid ts error

Fixes #344

* assert type as Abi to avoid ts error on useScaffoldContract

---------

Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>

* Fix useEffect filter dep on event hook (#349)

* Block confirmation options / callback for useScaffoldContractWrite (#348)

* Patch useLocalStorage setting the right initial value to avoid a hydration error (#356)

Co-authored-by: sverps <sverps@gmail.com>

* Save selected contract to local storage (#326)

* Save selected contract to local storage

* refactor: Replaced native localStorage with useLocalStorage from usehooks-ts

* Fixed empty string parameter error.

* Updated parameter requirements to fix issue.

* Fixed error.

* Fixed parameter assignment error.

* Use useLocalStorage to save selected contract

---------

Co-authored-by: Damian <damianmarti@gmail.com>

* Refactor meta tags into separate component and add default thumbnail / image (#359)

* Hotfix: thumbnail.png => thumbnail.jpg

* Local Block Explorer (#351)

Co-authored-by: Shiv Bhonde <shivbhonde04@gmail.com>

* Fix daisyUI dropdown on IOS (#342)

* allow `overrides` in useScaffoldContractWrite (#345)

* allow overrides for useScaffoldContractWrite

* spread overrides and restConfig separately

* feat: proactively disable read hook when it would result in error (#250)

Fixes #249

Co-authored-by: Shiv Bhonde | shivbhonde.eth <shivbhonde04@gmail.com>

* Size prop on Address component (#365)


Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>

* Generate TS ABIs from deploy script (#368)

* enable solidity optimizer by default (#360)

* fix(Balance): font-size of symbol should be relative to current font-size, not document root (#375)

* fix(contract.ts): very long abi's now no longer go over type instantiation limit (#377)

Fixes #374

* fix(contract.ts): improve missing config check (#372)

Fixes #371

* fix listner types error when contracts missing (#379)

* zkSyncEra Testnet config (#383)

* Upgrade hardhat-deploy to 0.11.26 where zkSync is supported

* Dependency for @matterlabs/hardhat-zksync-solc

* Add zkSyncEraTestnet to networks

* Import @matterlabs/hardhat-zksync-solc

* Add artifacts-zk and cache-zk to gitignore

* yarn install

* Add zkSync mainnet config

* add hardhat-zksync-verify for contract verification

---------

Co-authored-by: moltam89 <moltam89@gmail.com>
Co-authored-by: Damian <damianmarti@gmail.com>
Co-authored-by: Shiv Bhonde <shivbhonde04@gmail.com>

* allow writeAsync by useScaffoldContractWrite to be called with updated args (#385)

* update wagmi & rainbow for walletConnectV2 (#381)

* meged changes from main, additional configuration in subgraph.yaml

---------

Co-authored-by: Shiv Bhonde | shivbhonde.eth <shivbhonde04@gmail.com>
Co-authored-by: Austin Griffith <austin@ethereum.org>
Co-authored-by: Kevin Joshi <kevinjoshi46b@gmail.com>
Co-authored-by: Carlos Sánchez <oceanrdn@gmail.com>
Co-authored-by: AlehN <natsevsky@gmail.com>
Co-authored-by: Pablo Alayeto <55535804+Pabl0cks@users.noreply.github.com>
Co-authored-by: KcPele <fidekg123@gmail.com>
Co-authored-by: Samuel | solidixen.eth <sverps@gmail.com>
Co-authored-by: Eda Akturk <edakturk96@gmail.com>
Co-authored-by: Tamas Molnar <tamas.molnar@liferay.com>
Co-authored-by: Damian Martinelli <damianmarti@gmail.com>
Co-authored-by: Alexander <a00112699@gmail.com>
Co-authored-by: port <108868128+portdeveloper@users.noreply.github.com>
Co-authored-by: moltam89 <moltam89@gmail.com>
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.

None yet

3 participants