Skip to content

[SDK] Transaction hash mismatch from Provider.sendTransaction #508

Discussion options

You must be logged in to vote

I think I found what needed to be changed.

You need to attach the signature differently.
Here's approximate diff:

  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

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@dutterbutter
Comment options

@everdimension
Comment options

@dutterbutter
Comment options

@everdimension
Comment options

@everdimension
Comment options

Comment options

You must be logged in to vote
2 replies
@bxpana
Comment options

@everdimension
Comment options

Answer selected by everdimension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ZK Stack
Labels
sdk Questions for the SDKs zk-stack ZK Stack Question WIP The issue is currently being worked on
3 participants