Skip to content

Upgrade to wagmi v2#245

Draft
MidnightLightning wants to merge 5 commits intosuperfluid-org:masterfrom
MidnightLightning:236-wagmi-v2
Draft

Upgrade to wagmi v2#245
MidnightLightning wants to merge 5 commits intosuperfluid-org:masterfrom
MidnightLightning:236-wagmi-v2

Conversation

@MidnightLightning
Copy link
Copy Markdown

Draft solution to #236. Upgrades libraries to:

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

@vercel
Copy link
Copy Markdown

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

@vercel
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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