diff --git a/README.md b/README.md index 4bc195b..7f3809a 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ const config: HardhatUserConfig = { url: `https://ropsten.infura.io/v3/${process.env.INFURA_KEY}`, gcpKmsKeyName: "YOUR KMS KEY ID", minMaxFeePerGas: 1600000000, - mixMaxPriorityFeePerGas: 1200000000 + minMaxPriorityFeePerGas: 1200000000 } } } diff --git a/package.json b/package.json index 2fd014d..5a201c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@conduitxyz/hardhat-gcp-kms-signer", - "version": "1.1.4", + "version": "1.1.5", "description": "Sign Hardhat deployment transactions using KMS key", "repository": "github:conduitxyz/hardhat-gcp-kms-signer", "author": "Conduit XYZ", diff --git a/src/index.ts b/src/index.ts index c53b952..ffe7d8a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,15 +45,17 @@ extendEnvironment((hre) => { eip1193Provider, hre.network.config.gcpKmsKeyName ); - wrappedProvider = new AutomaticGasProvider( - wrappedProvider, - hre.network.config.gasMultiplier - ); - wrappedProvider = new AutomaticGasPriceProvider( - wrappedProvider, - hre.network.config.minMaxFeePerGas, - hre.network.config.minMaxPriorityFeePerGas - ); + if (hre.network.config.minMaxFeePerGas || hre.network.config.minMaxPriorityFeePerGas) { + wrappedProvider = new AutomaticGasProvider( + wrappedProvider, + hre.network.config.gasMultiplier + ); + wrappedProvider = new AutomaticGasPriceProvider( + wrappedProvider, + hre.network.config.minMaxFeePerGas, + hre.network.config.minMaxPriorityFeePerGas + ); + } hre.network.provider = new BackwardsCompatibilityProviderAdapter( wrappedProvider );