From c371f0fa8c177ad2265fdf69138eabc678bc8383 Mon Sep 17 00:00:00 2001 From: Felipe Forbeck Date: Thu, 4 Apr 2024 16:50:01 -0300 Subject: [PATCH] added gas multiplier for polygon network config --- cli-config.js | 1 + hardhat.config.js | 1 + src/utils/contract.js | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli-config.js b/cli-config.js index 1ee75fe..bb3f6da 100644 --- a/cli-config.js +++ b/cli-config.js @@ -35,6 +35,7 @@ const configs = { keyVersion: process.env.KMS_KEY_VERSION, }, tokenAddr: process.env.TOKEN_ADDR, + gasMultiplier: process.env.GAS_MULTIPLIER || 1, }; module.exports = { configs }; diff --git a/hardhat.config.js b/hardhat.config.js index 9630f89..4f2c5a4 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -19,6 +19,7 @@ module.exports = { skipDryRun: true, networkCheckTimeout: 10000, deploymentPollingInterval: 10000, + gasMultiplier: configs.gasMultiplier, }, mainnet: { url: configs.ethBlockchainApi, diff --git a/src/utils/contract.js b/src/utils/contract.js index f349b0f..e16fb75 100644 --- a/src/utils/contract.js +++ b/src/utils/contract.js @@ -28,12 +28,12 @@ const getProvider = (network) => { case "mainnet": { if (configs.alchemyApiKey) return new ethers.providers.AlchemyProvider( - network === 'polygon' ? 'matic' : network, + network === "polygon" ? "matic" : network, configs.alchemyApiKey ); if (configs.infuraApiKey) return new ethers.providers.InfuraProvider( - network === 'polygon' ? 'matic' : network, + network === "polygon" ? "matic" : network, configs.infuraApiKey );