Wagmi v2 #3068
Replies: 19 comments 50 replies
-
Excellent work on the release. Migration has been pretty smooth. One issue: We get our Example snippet: import { createConfig, http } from "wagmi";
import { mainnet } from "wagmi/chains";
import { getDefaultWallets } from "@rainbow-me/rainbowkit";
const { connectors } = getDefaultWallets({
appName: "my app",
projectId: 'project-id'
chains: [mainnet],
});
export const wagmiConfig = createConfig({
chains: [mainnet]
connectors, // <-- incompatable type
transports: {
[mainnet.id]: http('alchemy-url'),
},
}); |
Beta Was this translation helpful? Give feedback.
-
Is |
Beta Was this translation helpful? Give feedback.
-
What is the estimated release date? |
Beta Was this translation helpful? Give feedback.
-
Wondering if anyone run into this issue with
|
Beta Was this translation helpful? Give feedback.
-
I has some issue, have to change code in node_modules |
Beta Was this translation helpful? Give feedback.
-
Any updates on the wagmi-cli react plugin? Will we have a chance to test it out soon? |
Beta Was this translation helpful? Give feedback.
-
Are the Will anyone initialize the parameters externally and then pass them to useConfig to obtain them? |
Beta Was this translation helpful? Give feedback.
-
Will v2 support async loading of connectors? #2402 |
Beta Was this translation helpful? Give feedback.
-
Can the v2 version add more examples of hooks? I think there are only a small part now. |
Beta Was this translation helpful? Give feedback.
-
great work. i am completely unable to SwitchChainError: An error occurred when attempting to switch chain.
Details: Chain not configured.
Version: @wagmi/core@2.0.0-rc.0
Version: viem@2.0.0-rc.0
at Object.switchChain (injected.js:274:1)
at async switchChain (switchChain.js:14:1) with |
Beta Was this translation helpful? Give feedback.
-
It looks like V2 removed the In v4 we could pass down the |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
https://stackblitz.com/edit/vitejs-vite-9e1qqk?file=src%2Fcomponents%2FConnect.tsx |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Are you planning to add back to the ...
plugins: [
react({
useContractEvent: false,
useContractRead: true,
useContractFunctionRead: false,
...
}),
...
],
... |
Beta Was this translation helpful? Give feedback.
-
The migration guide shows data?.gas but in my version (2.0.0-rc.2), data from useEstimateGas is a bigint and data?.gas is undefined. |
Beta Was this translation helpful? Give feedback.
-
Hi Wagmi team. This v2 is awesome! |
Beta Was this translation helpful? Give feedback.
-
Curious as to whether useReadContract/useWriteContract/useWaitForTransactionReceipt might eventually (re)gain support for onError/onSuccess callbacks from v1? These were especially useful eg. for Sentry error logging on failures. There are alternate ways of accomplishing this using isError/error, of course, but the previous interface was really nicely encapsulated. |
Beta Was this translation helpful? Give feedback.
-
is there a reason you cannot pass the data.request directly to the useWriteContract hook. I wanted to bundle the entire useSimulateContract -> useWriteContract lifecycle into a custom hook (made the error handling much cleaner on the component side), but because useWriteContract no longer returns the write functions not sure it is possible? |
Beta Was this translation helpful? Give feedback.
-
Very excited to announce the next major version of Wagmi!
Wagmi v2 redesigns the core APIs to mesh better with Viem and TanStack Query. This major version transforms Wagmi into a light wrapper around these libraries, sprinkling in multichain support and account management. As such, there are some breaking changes and deprecations. Check out the migration guide for more info.
There are also some incredible features included in this release, like:
We recommend trying it out in your projects, but there may be breaking changes before the final release. If you find bugs or have feedback, please open an issue or reply to this discussion. All development is happening on the
rc
branch.In general, since major versions don't happen that often, feel free to give feedback on anything. We appreciate the support!
Beta Was this translation helpful? Give feedback.
All reactions