From 6fb59a1b60082334a1359a110250dee309a5de7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dragi=C5=A1a=20Spasojevi=C4=87?= Date: Mon, 18 Dec 2023 21:43:25 +0100 Subject: [PATCH] build: add dotenv --- .env.example | 1 + package.json | 1 + wagmi.config.ts | 3 +++ yarn.lock | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..10b1a76d --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +ARBISCAN_API_KEY= diff --git a/package.json b/package.json index c63f1ee3..7fcacfc4 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "devDependencies": { "@wagmi/cli": "^1.5.2", + "dotenv": "^16.3.1", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", "typescript": "^5.2.2", diff --git a/wagmi.config.ts b/wagmi.config.ts index 6b9a5e1b..38fd0420 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -1,8 +1,11 @@ import { erc, etherscan } from '@wagmi/cli/plugins'; +import dotenv from 'dotenv'; import { ParentChainId } from './src'; import { sepolia, arbitrumSepolia } from './src/chains'; +dotenv.config(); + if (typeof process.env.ARBISCAN_API_KEY === 'undefined') { throw new Error('Missing ARBISCAN_API_KEY environment variable'); } diff --git a/yarn.lock b/yarn.lock index 76b370d8..92c72922 100644 --- a/yarn.lock +++ b/yarn.lock @@ -736,7 +736,7 @@ dotenv-expand@^10.0.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A== -dotenv@^16.0.3: +dotenv@^16.0.3, dotenv@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==