[SDK] Error while setting custom paymaster data with Go-SDK #811
-
Team or ProjectZyfi Select the SDKGo EnvironmentTestnet Issue DescriptionError while trying to integrate Zyfi's paymaster with go-sdk. Returns the result with "failed to call eth_sendRawTransaction: failed to validate the transaction. reason: Validation revert: Paymaster validation error: Error function_selector = 0x, data = 0x" I suspect that paymasterInput is not being sent correctly through sdk. While the same transaction with same paymasterInput works fine with typescript. Expected BehaviorTransaction should be successful with paymaster integration. Code ExampleHere is the test code :
Repo Link (Optional) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
It appears that the issue you're encountering with the Go SDK and Zyfi's paymaster integration might be related to how the Here are a few steps you can take to troubleshoot and potentially resolve this issue:
If after these steps the issue persists, it might be beneficial to reach out directly to the Zyfi or ZKsync support or development team with details of what you have tried and the specifics of the error. They might be able to provide more direct insights or updates regarding SDK compatibility or known issues. 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.
-
Thanks for the post, will check this out. Are you able to add me to the repo too? |
Beta Was this translation helpful? Give feedback.
-
@hoshiyari420 hello sir 👋 I would suggest updating |
Beta Was this translation helpful? Give feedback.
Update:
I’ve created a min-example repo to assist with debugging against a running fork of Sepolia using anvil-zksync. I added some console logs to get more details during the Paymaster's
validateAndPayForPaymasterTransaction
function, where the issue seems to occur.Findings:
It seems that the Paymaster input differs between the Go test and the JS test when interacting with the contract. Specifically, during the Go test, the Paymaster contract fails while decoding this line:
Observed Differences:
_transaction.paymasterInput[4:]
differs as shown below:JS …