1.0.1 • Published 7 months ago

eth-gas-tracker-node v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

eth-gas-tracker-node is a powerful nodejs module that provides developers with an effortless way to retrieve live Ethereum gas prices, empowering them to optimize transactions and smart contracts on the Ethereum network.

Features

  • 🚀 Retrieve live Ethereum gas prices with ease.
  • ⛽️ Obtain up-to-date and accurate gas price data.
  • 💪 Fine-tune transaction optimization based on real-time gas prices.
  • 🤝 Seamless integration into existing projects.
  • 📚 Comprehensive code examples for easy implementation.

📦 Install

npm i eth-gas-tracker-node

Usage

To retrieve live Ethereum gas prices, follow these simple steps:

const EthereumGasPrice = require('eth-gas-tracker-node');

const gasPriceTracker = new EthereumGasPrice();

// Using .then
gasPriceTracker.getGasPrices().then((gasPrices) => {
  if (gasPrices) {
    console.log(gasPrices);
  } else {
    console.error('Failed to fetch gas prices.');
  }
});

// Using await
(async () => {
  const gasPrices = await gasPriceTracker.getGasPrices();
  if (gasPrices) {
    console.log(gasPrices);
  } else {
    console.error('Failed to fetch gas prices.');
  }
})();

Contributing

Contributions are welcome! Feel free to fork the repository and submit pull requests as well.

License

This project is licensed under the MIT license.

Connect with Me

Feel free to reach out to me for any project-related queries or collaborations. I'm always happy to connect and discuss ideas!