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

Upgrade to wagmi v2 #245

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MidnightLightning
Copy link

Draft solution to #236. Upgrades libraries to:

  • wagmi 2.12.17
  • viem 2.21.18
  • @reown/appkit 1.0.7 (formerly @web3modal/react)

Copy link

vercel bot commented Oct 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
widget-docs ❌ Failed (Inspect) Oct 7, 2024 6:30pm
widget-reference-docs ✅ Ready (Inspect) Visit Preview Oct 7, 2024 6:30pm

Copy link

vercel bot commented Oct 5, 2024

@MidnightLightning is attempting to deploy a commit to the Superfluid Finance Team on Vercel.

A member of the Team first needs to authorize it.

@MidnightLightning
Copy link
Author

This change gets the bulk of the changes for wagmi v2 in place (renaming of the hooks that changed).

The key things that still need to be changed (and I likely need some direction from the project team on how they want them changed) is the CommandMapper and ContractWriteManager concepts need to be re-evaluated. I think several of the roles they were aiming to fill are now easily done by wagmi or viem directly (so they might not be needed as such an abstract middle layer?).

@kasparkallas
Copy link
Collaborator

kasparkallas commented Oct 7, 2024

Hey, thanks! I'll take a look at this today.

Regarding the Command abstraction, the main purpose is to capture the intent of the user, and based on that map into transaction when it's time to.

In this proof of concept PR, the value of the abstraction is better captured, as the user can choose whether to batch the transaction or do them incrementally: #216

If the user doesn't finish the process all the way, and moves back and forth in the widget, or comes back later, as long as the intent is there, we can map it into the correct set of transactions.

So I think the value of the abstraction is still there. wagmi/viem deal with lower level concerns.

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.

2 participants