ethers
library. By following this example, you’ll be able to create, sign, and send a transaction on the Ethereum Sepolia network.
dotenv
, axios
, and ethers
libraries.env
File
Create a .env
file in your project root directory and add your Stardust API key and wallet ID:
.env
file:
dotenv
, axios
, and ethers
libraries and sets up the environment variables.
ethers
library. This example uses an EIP-1559 transaction. More information about EIP-1559 can be found here or here.
If you are interacting with a contract, you will need to encode the data to interact with the contract according to the data field
ethers
library.
source
eth_sendRawTransaction
.
source
ethers
library. You can now use this example to integrate transaction sending into your application. For more information, refer to the Stardust API documentation.