eth-gass-checker-joki
v1.0.2
Published
An open-source JavaScript function that checks the current gas price (in Gwei) on the Ethereum blockchain and offers a utility to verify if it's below a specified threshold.
Downloads
10
Maintainers
Readme
Sure! Here's a sample README.md file for the open-source project:
# Ethereum Gas Price Checker
This is a simple JavaScript function that checks the current gas price (in Gwei) on the Ethereum blockchain using the Etherchain API. It also provides a utility function to check if the gas price is below a specified threshold.
## Installation
There is no installation required for this project. Simply copy the provided JavaScript functions into your project.
## Usage
### `getGasPrice()`
This asynchronous function fetches the current gas price from the Etherchain API.
```javascript
async function getGasPrice() {
// Code implementation
}
checkGasPriceThreshold(thresholdGwei)
This asynchronous function checks if the current gas price is below a specified threshold (in Gwei).
async function checkGasPriceThreshold(thresholdGwei) {
// Code implementation
}
Example Usage
// Check if gas price is below 50 Gwei
checkGasPriceThreshold(50);
Contributing
Contributions are welcome! Feel free to open issues or pull requests for any improvements or fixes.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
You can add more sections or details as needed. The above README.md provides basic information about the project, how to use it, how to contribute, and its licensing.