diff --git a/packages/request-node/package.json b/packages/request-node/package.json index c8868f99a..b715765f9 100644 --- a/packages/request-node/package.json +++ b/packages/request-node/package.json @@ -51,7 +51,7 @@ "chalk": "4.1.0", "cors": "2.8.5", "dotenv": "8.2.0", - "eip1559-fee-suggestions-ethers": "1.3.3", + "eip1559-fee-suggestions": "git+https://github.com/alexandre-abrioux/fee-suggestions#hex-feehistory-dist", "ethers": "5.5.1", "express": "4.17.1", "graphql": "15.5.0", diff --git a/packages/request-node/src/thegraph/TheGraphStorage.ts b/packages/request-node/src/thegraph/TheGraphStorage.ts index b6db87b0d..cd7c228ce 100644 --- a/packages/request-node/src/thegraph/TheGraphStorage.ts +++ b/packages/request-node/src/thegraph/TheGraphStorage.ts @@ -5,9 +5,11 @@ import Utils from '@requestnetwork/utils'; import { LogTypes, StorageTypes } from '@requestnetwork/types'; import { requestHashSubmitterArtifact } from '@requestnetwork/smart-contracts'; import { RequestOpenHashSubmitter } from '@requestnetwork/smart-contracts/types'; -import { suggestFees } from 'eip1559-fee-suggestions-ethers'; import { GasPriceDefiner } from '@requestnetwork/ethereum-storage'; +// should be @rainbow-me/fee-suggestions. See https://github.com/RequestNetwork/requestNetwork/pull/765 +import { suggestFees } from 'eip1559-fee-suggestions'; + type TheGraphStorageProps = { network: string; signer: Signer; @@ -58,9 +60,7 @@ export class TheGraphStorage { const fee = await this.hashSubmitter.getFeesAmount(ipfsSize); const overrides: PayableOverrides = { value: fee }; if (this.enableEip1559) { - const suggestedFee = await suggestFees( - this.hashSubmitter.provider as providers.JsonRpcProvider, - ); + const suggestedFee = await suggestFees(this.provider); const maxPriorityFeePerGas = BigNumber.from(suggestedFee.maxPriorityFeeSuggestions.urgent); const maxFeePerGas = maxPriorityFeePerGas.add(suggestedFee.baseFeeSuggestion); overrides.maxPriorityFeePerGas = maxPriorityFeePerGas; diff --git a/yarn.lock b/yarn.lock index e7a36c689..aca04ac02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11759,10 +11759,9 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -eip1559-fee-suggestions-ethers@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/eip1559-fee-suggestions-ethers/-/eip1559-fee-suggestions-ethers-1.3.3.tgz#cf21b6ae4734b697c8f79e556d91aeda3e464d60" - integrity sha512-W/5SQICRpDL0XvOdcX5oVWfaE2sow2u9il8I6Qyd9fkL9XY1knypywTcoBTdU9ULrPoP3phn/RnEKGq7Y8qkLw== +"eip1559-fee-suggestions@git+https://github.com/alexandre-abrioux/fee-suggestions#hex-feehistory-dist": + version "2.0.0" + resolved "git+https://github.com/alexandre-abrioux/fee-suggestions#c2160fd7e37264364fc62137916de063d6560ff3" dependencies: "@ethersproject/providers" "^5.5.0" bignumber.js "^9.0.1"