Skip to content

Commit

Permalink
added gas multiplier for polygon network config
Browse files Browse the repository at this point in the history
  • Loading branch information
fforbeck committed Apr 4, 2024
1 parent b70212c commit c371f0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cli-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
1 change: 1 addition & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
skipDryRun: true,
networkCheckTimeout: 10000,
deploymentPollingInterval: 10000,
gasMultiplier: configs.gasMultiplier,
},
mainnet: {
url: configs.ethBlockchainApi,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down

0 comments on commit c371f0f

Please sign in to comment.