Skip to content

Commit

Permalink
feat: update the hardhat config file to use the new addRpcUrlToNetwor…
Browse files Browse the repository at this point in the history
…k from commons-config package
  • Loading branch information
clauBv23 committed Mar 11, 2024
1 parent bcf5b3b commit 370e43c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
init,
addRpcUrlToNetwork,
networks as osxCommonsNetworks,
getNetworkByNameOrAlias,
} from '@aragon/osx-commons-configs';
Expand All @@ -23,13 +23,9 @@ dotenvConfig({path: resolve(__dirname, dotenvConfigPath)});

// check alchemy Api key existence
if (process.env.ALCHEMY_API_KEY) {
init(process.env.ALCHEMY_API_KEY);
addRpcUrlToNetwork(process.env.ALCHEMY_API_KEY);
} else {
// throw new Error('ALCHEMY_API_KEY in .env not set');
console.error(
'\x1b[33m%s\x1b[0m',
'ALCHEMY_API_KEY variable is not set in your .env file. Some functionalities may not work properly.'
);
throw new Error('ALCHEMY_API_KEY in .env not set');
}

export const networks: {[index: string]: NetworkUserConfig} = {
Expand Down

0 comments on commit 370e43c

Please sign in to comment.