-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: add ethers v6 codemods #4825
base: main
Are you sure you want to change the base?
Conversation
Hey, If you have any repos in mind, then, I can test it on them, and can let you know about its performance. |
Thanks! This looks super amazing! |
Awesome, if you do know any repos, where I can test them, then it would be great. |
Hey, I just wanna update, if you want you can also check it on your end, or if you want to provide with some test repos, then I could check and show you the results. |
@@ -298,6 +348,11 @@ _code: parsing transactions @lang<script> | |||
// v6 (the tx can optionally include the signature) | |||
txBytes = Transaction.from(tx).serialized | |||
|
|||
_note: Codemod replaces [[parseTransaction]] and [[serializeTransaction]] with new [[Transaction]] class for parsing and serializing singatures: |
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.
_note: Codemod replaces [[parseTransaction]] and [[serializeTransaction]] with new [[Transaction]] class for parsing and serializing singatures: | |
_note: Codemod replaces [[parseTransaction]] and [[serializeTransaction]] with new [[Transaction]] class for parsing and serializing signatures: |
@@ -427,6 +482,11 @@ _code: commify @lang<script> | |||
|
|||
commify("1234.5"); | |||
|
|||
_note: Codemod refactors various utility methods mentioned above, constants, data manipualtion functions, and transaction handling: |
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.
_note: Codemod refactors various utility methods mentioned above, constants, data manipualtion functions, and transaction handling: | |
_note: Codemod refactors various utility methods mentioned above, constants, data manipulation functions, and transaction handling: |
@@ -278,6 +323,11 @@ _code: signature manipulation | |||
splitSig = ethers.Signature.from(sigBytes) | |||
sigBytes = ethers.Signature.from(splitSig).serialized | |||
|
|||
_note: Codemod replaces [[splitSignature]] and [[joinSignature]] with [[ethers.Signature]] class for parsing and serializing singatures: |
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.
_note: Codemod replaces [[splitSignature]] and [[joinSignature]] with [[ethers.Signature]] class for parsing and serializing singatures: | |
_note: Codemod replaces [[splitSignature]] and [[joinSignature]] with [[ethers.Signature]] class for parsing and serializing signatures: |
|
||
npx codemod@latest Ethers/6/Migration-Recipe | ||
|
||
This wil run the following codemods from the Ethers Codemod repository: |
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.
This wil run the following codemods from the Ethers Codemod repository: | |
This will run the following codemods from the Ethers Codemod repository: |
This PR adds instructions on using the ethers-v6-codemods.
This codemod automates the process of migrating to v6 of ethers.js
You can test/run the codemod using:
This allows Ethers.js v5 users to easily automate the changes mentioned in the migration guide to Ethers v6 with a one-line command.