From 05d758a01eb73ee07db69a3ce14e64464fdfa929 Mon Sep 17 00:00:00 2001 From: Theo Date: Thu, 6 Jul 2023 13:48:52 -0700 Subject: [PATCH] Add to docs, that getTxGasParams returns value in WEI & bump lib version --- README.md | 6 +++++- package.json | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ef10ca6..fdf415e 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,9 @@ type GetTxGasParamsRes = } const gasParams: GetTxGasParamsRes = await oracle.getTxGasParams({ legacySpeed: 'fast', bumpPercent: 30 }) -console.log(gasParams) // { maxFeePerGas: 17, maxPriorityFeePerGas: 3 } || { gasPrice: 19 } +console.log(gasParams) +// { maxFeePerGas: '3f5476a00', maxPriorityFeePerGas: 'b2d05e00' } || { gasPrice: '46c7cfe00' } +// equal to: { maxFeePerGas: 17 gwei, maxPriorityFeePerGas: 3 gwei } || { gasPrice: 19 gwei } web3.eth.sendTransaction({ from: '0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8', @@ -267,6 +269,8 @@ web3.eth.sendTransaction({ `bumpPercent` argument (`0` by default) - response data will increase by `bumpPercent`%. `legacySpeed` argument (`fast` by default) - select the speed of legacy gasPrice. +Returns gas info in `wei`, hex-format. + ### Offchain oracles only ```typescript diff --git a/package.json b/package.json index bab541a..5acb468 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "gas-price-oracle", - "version": "0.5.2", + "version": "0.5.3", "description": "Gas Price Oracle library for Ethereum dApps.", - "homepage": "https://github.com/peppersec/gas-price-oracle", + "homepage": "https://git.tornado.ws/tornado-packages/gas-price-oracle", "main": "./lib/index.js", "module": "./lib/esm/index.js", "types": "./lib/index.d.ts", "repository": { "type": "git", - "url": "https://github.com/peppersec/gas-price-oracle.git" + "url": "https://git.tornado.ws/tornado-packages/gas-price-oracle" }, "scripts": { "test": "ts-mocha --timeout 30000 --paths 'src/tests/*.test.ts'",