gas-price-oracle update
This commit is contained in:
parent
afe875a263
commit
3a168c3c54
|
@ -28,7 +28,7 @@
|
|||
"dependencies": {
|
||||
"async-mutex": "^0.2.4",
|
||||
"ethers": "^5.4.6",
|
||||
"gas-price-oracle": "git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614",
|
||||
"gas-price-oracle": "git+https://github.com/peppersec/gas-price-oracle.git#de97ca2d154480aebbe9130778a69727f3a0f00b",
|
||||
"web3-core-promievent": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -418,8 +418,9 @@ class Transaction {
|
|||
*/
|
||||
async _getGasParams() {
|
||||
const maxGasPrice = parseUnits(this.manager.config.MAX_GAS_PRICE.toString(), 'gwei')
|
||||
const gasParams = await this.manager._gasPriceOracle.getTxGasParams({})
|
||||
const gasParams = await this.manager._gasPriceOracle.getTxGasParams()
|
||||
if (gasParams.gasPrice) gasParams.gasPrice = min(gasParams.gasPrice, maxGasPrice)
|
||||
else gasParams.maxFeePerGas = min(gasParams?.maxFeePerGas, maxGasPrice)
|
||||
gasParams.type = gasParams?.maxFeePerGas ? 2 : 0
|
||||
return gasParams
|
||||
}
|
||||
|
|
|
@ -2086,9 +2086,9 @@ functions-have-names@^1.2.2:
|
|||
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
|
||||
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
|
||||
|
||||
"gas-price-oracle@git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614":
|
||||
"gas-price-oracle@git+https://github.com/peppersec/gas-price-oracle.git#de97ca2d154480aebbe9130778a69727f3a0f00b":
|
||||
version "0.5.0"
|
||||
resolved "git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614"
|
||||
resolved "git+https://github.com/peppersec/gas-price-oracle.git#de97ca2d154480aebbe9130778a69727f3a0f00b"
|
||||
dependencies:
|
||||
axios "^0.21.2"
|
||||
bignumber.js "^9.0.0"
|
||||
|
|
Loading…
Reference in New Issue