From a5aaf8efea96e352bc57a0a91f2e2b8b3862a0df Mon Sep 17 00:00:00 2001 From: Mikhail <16622558+mmv08@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:14:35 +0200 Subject: [PATCH] Allowance module: Add deployment instructions for contracts to README and remove outdated networks from hardhat configuration (#494) - Add deployment instructions for contracts to README - remove outdated networks from hardhat configuration --- modules/allowances/README.md | 24 +++++++++++++++++++++++- modules/allowances/hardhat.config.ts | 16 ---------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/modules/allowances/README.md b/modules/allowances/README.md index 74f7342a4..1eccbbc03 100644 --- a/modules/allowances/README.md +++ b/modules/allowances/README.md @@ -122,4 +122,26 @@ pnpm test ```bash pnpm i pnpm build -``` \ No newline at end of file +``` + +## Deploying and verifying contracts + +Specify all the necessary environment variables in `.env`, following the `.env.sample` file. + +```bash +pnpm i +pnpm run deploy +``` + +1. `network_name` is the name of the network you want to deploy to. It must be added to the hardhat config under `networks` beforehand. +2. If the hardhat plugin cannot figure out the etherscan API url for the network, you can add it manually to `tasks/deploy_verify.ts`. +Example: +```ts +await hre.run('etherscan-verify', { + forceLicense: true, + license: 'LGPL-3.0', + apiUrl: "https://api.gnosiscan.io" +}) +``` + + diff --git a/modules/allowances/hardhat.config.ts b/modules/allowances/hardhat.config.ts index 34fd386a4..8a6d5c4bd 100644 --- a/modules/allowances/hardhat.config.ts +++ b/modules/allowances/hardhat.config.ts @@ -57,26 +57,10 @@ const config: HardhatUserConfig = { ...sharedNetworkConfig, url: 'https://rpc.gnosischain.com', }, - ewc: { - ...sharedNetworkConfig, - url: `https://rpc.energyweb.org`, - }, - goerli: { - ...sharedNetworkConfig, - url: `https://goerli.infura.io/v3/${INFURA_KEY}`, - }, - mumbai: { - ...sharedNetworkConfig, - url: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`, - }, polygon: { ...sharedNetworkConfig, url: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`, }, - volta: { - ...sharedNetworkConfig, - url: `https://volta-rpc.energyweb.org`, - }, bsc: { ...sharedNetworkConfig, url: `https://bsc-dataseed.binance.org/`,