[SDK] Issue using Paymaster with zkSync-web3.Web3Provider
and WalletConnect-v2
#63
-
EnvironmentTestnet Acknowledgement
Issue DescriptionIt is not possible to send transactions using a Paymaster when using WalletConnect-v2 Ethereum-Provider (tested with Metamask as the wallet), the transactions are sent to the wallet, but no approval pop-up is ever triggered and in the app an error is thrown with the generic message When executing the same code using Metamask instead of WalletConnect, both on desktop and from the MM-Browser transaction are sent successfully without throwing any errors. When one replaces the We have tried to send the transactions using Expected BehaviorWhen a transaction is sent using a Paymaster it should open an approval pop-up in the wallet to sign a type 113 transaction and not throw any errors. Code Example
Repo Link (Optional)No response |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 8 replies
-
Hey there! 😊 Thanks for the super detailed info you've provided here and in #53! Sorry for the delayed response, we'll aim to be speedier next time. 🐢➡️🐇 We understand how crucial it is for WalletConnect and paymasters to work seamlessly together, so rest assured we're on the case. We will be investigating this further to find a resolution for yourself and the community. We want to give you the ease-of-use you're after! I know patience is a virtue and you've been super virtuous so far! 🙏 Thank you for that. I will update here as soon as we have some updates. Again, thank you for being an awesome community member! 🙌 |
Beta Was this translation helpful? Give feedback.
-
By chance, I figured out what the problem was. It was a really small mistake in how WalletConnect's But the real problem remains. The issue is the error returned is always The big question now is what is causing the error message bug? Is it Here are some examples of reports of the issue: MM github repo:
Assuming that this is an issue with WC or MM, ideally if the zkSync team could reach out to WC/MM it could potentially get this issue prioritized. Also this does nothing to solve my issue #53 which remains a big concern and for which I see no easy solution. |
Beta Was this translation helpful? Give feedback.
-
Good and bad news. Bad news: It stopped working again. WTF!!! I feel like I'm going crazy... I didn't change anything on my end, and the everything continues |
Beta Was this translation helpful? Give feedback.
-
I should add, that this doesn't appear to be related to the paymaster. I have tried with and without including the custom data and neither works. The only way currently to interact with a smart contract using WC is the use |
Beta Was this translation helpful? Give feedback.
-
I figured it out, (I hope!) the issue is with WalletConnect, and the passing of the methods during the initialization of the Here is the link to WC's code that shows the explicit list. |
Beta Was this translation helpful? Give feedback.
-
I was planning on opening issue in the WC repo for this. This isn't really a bug, it's just that the error thrown provides you with no clue to what the problem. |
Beta Was this translation helpful? Give feedback.
-
Guess what? The issue is not resolved. Last week when I was working on this I made a fatal assumption. When clicking the "mint token" button in my dApp MetaMask correctly displayed the transaction pop-up with type 113 transaction message to sign. I assumed that it meant that it was good, because once I've reached that point it was always good. So as not to waste testnet tokens I simply clicked cancel. But I was wrong, it wasn't good. This morning I got back onto the project, I tried minting, and I did click submit, and the transaction failed. Since now both WC and MM provide me with the transaction message, I compared the messages and they are both identical. I really don't get what the problem could be. |
Beta Was this translation helpful? Give feedback.
It seems that WC does not support paymaster
customData
payload at this time. We are investigating a patch or a way to circumvent this for the short-term, and then hopefully a longer-term solution is an upstream fix to WC. Paymaster transactions will work fine with MM so its specific to WC. This issue is separate from the issues you faced prior and tagged accordingly.