-
-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add parseEip712Transaction util function #2948
fix: add parseEip712Transaction util function #2948
Conversation
🦋 Changeset detectedLatest commit: 5fd181c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@nikola-bozin-txfusion is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
export function parseEip712Transaction( | ||
transaction: Hex, | ||
): ZksyncTransactionSerializableEIP712 { | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the scope required here (L14 + L21)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scope is removed.
throw new BaseError('transaction type must be eip712') | ||
} | ||
|
||
return constructEip712Transaction(payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we inline the contents of constructEip712Transaction
into here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constructEip712Transaction
method is inlined.
type PaymasterParams = { | ||
paymaster: Hex | ||
paymasterInput: Hex | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to explicitly define this type? The handleArrayToPaymaster
return type should be inferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PaymasterParams
is not needed and it has been removed.
Can we please add an export & docs for this? Also needs a changeset. |
09689f7
to
5f8b1d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2948 (comment)
5f8b1d3
to
5fd181c
Compare
Changeset and docs are added. |
PR-Codex overview
This PR introduces a new utility function,
parseEip712Transaction
, to the ZKsync extension, enhancing transaction parsing capabilities for EIP712 serialized transactions. It also updates documentation and adds tests to ensure functionality.Detailed summary
parseEip712Transaction
function insrc/zksync/utils/parseEip712Transaction.ts
.parseEip712Transaction
fromsrc/zksync/index.ts
.parseEip712Transaction
insite/pages/zksync/utilities/parseEip712Transaction.md
.parseEip712Transaction
insrc/zksync/utils/parseEip712Transaction.test.ts
.site/sidebar.ts
to include link to the new utility.