[General] Code example of using wagmi to send EIP-712 tx #752
-
Team or ProjectLens Team EnvironmentTestnet L2 block numberNo response Provide a brief description of the functionality you're trying to implement and the issue you are running into.I could only find this example: https://code.zksync.io/tutorials/guide-wagmi#send-transaction For context, what I am trying to understand is the recommended flow from acquiring access to a WalletClient configured for a ZKsync chain to send the transaction in a wagmi/viem idiomatic way (i.e., leveraging their types system). Repo Link (Optional)No response Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For sending EIP-712 formatted transactions using wagmi with ZKsync, you can follow the general steps outlined in the wagmi guide for ZKsync. Here’s a brief overview of the process:
Unfortunately, the specific example of sending an EIP-712 transaction using wagmi with ZKsync is not directly available in the documentation. However, the general steps for sending transactions can be adapted by incorporating EIP-712 data formatting into the transaction preparation step. For more detailed guidance and to discuss with other developers, you might find it helpful to visit the ZKsync developers discussions on Github: ZKsync Developers Discussions. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
hey @bxpana, I guess that what I am saying is that, although viem/zksync provides typed actions, I couldn't find a clean path (one that does not involve an unsafe TS assertion) to get a Hence I am wondering if you had tried this flow. |
Beta Was this translation helpful? Give feedback.
Since wagmi is a wrapper over Viem you can use the Viem docs, https://viem.sh/docs/chains/zksync#utilities.