Skip to content

Commit 0238d86

Browse files
author
ankitsingh
committed
Version bump and readme changes
1 parent c0aa07f commit 0238d86

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
# OST Dynamic Gas Price
2+
3+
This fetches an estimated gas price for which Transaction could get mined in less than 5 minutes (source: 'https://ethgasstation.info/txPoolReport.php').
4+
5+
Usage:
6+
7+
````
8+
dynamicGasPriceProvider = require('@ostdotcom/ost-dynamic-gas-price');
9+
chainId = 1; //main Ethereum Network
10+
dynamicGasPriceProvider.dynamicGasPrice.get(chainId)
11+
.then(function(val){
12+
estimatedCurrentGasPrice = val;
13+
});
14+
````

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ostdotcom/ost-dynamic-gas-price",
3-
"version": "0.9.1-beta.1",
3+
"version": "1.0.0",
44
"description": "OST dynamic gas price suggester",
55
"main": "index.js",
66
"keywords": [

services/dynamic_gas_price.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ DynamicGasPriceKlass.prototype = {
7171
*/
7272
get: function (chainId) {
7373
return new Promise(function (onResolve, onReject) {
74+
//mainnet:1
75+
//ropsten:3
7476
if (chainId == 1 || chainId == 3) {
7577
// Dynamically fetch ethereum gas in GWei
7678
_private.sendRequest(onResolve);

0 commit comments

Comments
 (0)