[SDK] Transaction hash mismatch from Provider.sendTransaction #508
-
EnvironmentTestnet Acknowledgement
Issue DescriptionI have submitted a transaction using the Provider that's exported from Error: Transaction hash mismatch from Provider.sendTransaction. Does that mean that the RPC url returned something wrong? My package versions:
Expected BehaviorI guess Code ExampleMy code looks roughly like this:
Repo Link (Optional)No response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Thanks for the post, will check things out and get back to you. |
Beta Was this translation helpful? Give feedback.
-
I think I found what needed to be changed. You need to attach the signature differently. const signature = await this.signTypedData_v4({
context,
params: { typedData },
});
+ transaction.customData.customSignature = signature;
- const rawTransaction = zkSyncUtils.serialize(transaction, signature);
+ const rawTransaction = zkSyncUtils.serialize(transaction);
return this.sendSignedTransaction(rawTransaction); Here's a reference in the zksync docs: https://docs.zksync.io/build/developer-reference/account-abstraction.html#sending-transactions-from-an-account |
Beta Was this translation helpful? Give feedback.
I think I found what needed to be changed.
You need to attach the signature differently.
Here's approximate diff:
Here's a reference in the zksync docs: https://docs.zksync.io/build/developer-reference/account-abstraction.html#sending-transactions-from-an-account