Y

Ethers/6/Transactions

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

The transaction helpers present in v5 were all wrapped into a Transaction class, which can handle any supported transaction format to be further processed.

Example

Before

ts

After

ts

There is new way to serialize the transaction object('tx') back into raw transaction bytes.
The advantage here is that Transaction object itself manages whether the transaction is signed or not, and the serialized property
will automatically include the signature if it is present in the Transaction object.

Whereas in v5 we have to we have to explicitly mentioned whether the transaction is signed or not.

This is for both the transformation below.

Before

ts

After

ts

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.