A script to generate a signed raw transaction with ethers.
It is recommended to install Yarn through the npm
package manager, which comes bundled with Node.js when you install it on your system. It is recommended to use a Node.js version >= 18.0.0
.
Once you have npm
installed, you can run the following both to install and upgrade Yarn:
npm install --global yarn
After having installed Yarn, simply run:
yarn install
Configure the placeholder payload in script according to your needs and run:
yarn generate
This will print all raw transaction details to your terminal. Use the output signedTx.serialized
to broadcast a transaction e.g. with services like pushTx.