Skip to content

Commit 09b30a2

Browse files
committed
Add Arbiscan API key configuration to environment and Hardhat setup
1 parent a16942c commit 09b30a2

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

packages/smart-contract/.env.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ RPC_URL=
99

1010
## Mnemonic for the network
1111
MNEMONIC=
12+
13+
## Arbiscan API key to verify contracts
14+
ARBISCAN_API_KEY=

packages/smart-contract/config/env.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const envSchema = z.object({
2424

2525
// Mnemonic de déploiement ou interaction réseau
2626
MNEMONIC: z.string().min(1, 'MNEMONIC cannot be empty').optional().or(z.literal('')),
27+
28+
// Clé API pour Arbiscan
29+
ARBISCAN_API_KEY: z.string().optional().or(z.literal('')),
2730
});
2831

2932
export const env = envSchema.parse(process.env);

packages/smart-contract/hardhat.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ const config: HardhatUserConfig = {
5858
//to verify contract on Blockscout
5959
etherscan: {
6060
apiKey: {
61-
bellecour: 'abc',
61+
bellecour: 'nothing', // a non-empty string is needed by the plugin.
62+
avalancheFujiTestnet: 'nothing', // a non-empty string is needed by the plugin.
63+
arbitrumSepolia: env.ARBISCAN_API_KEY,
6264
},
6365
customChains: [
6466
{

0 commit comments

Comments
 (0)