From f92e150e5e5c59e47b39eccbb4480de0c0777d80 Mon Sep 17 00:00:00 2001 From: Doug Lance <4741454+douglance@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:03:48 -0500 Subject: [PATCH] update dotenv --- .github/workflows/build-test.yml | 3 --- packages/sdk/scripts/deployStandard.ts | 3 ++- packages/sdk/scripts/genNetwork.ts | 2 +- packages/sdk/scripts/instantiate_bridge.ts | 2 +- packages/sdk/scripts/testSetup.ts | 2 +- .../custom-fee-token/customFeeTokenEthBridger.test.ts | 3 ++- packages/sdk/tests/integration/eth.test.ts | 3 ++- .../getArbitrumNetworkInformationFromRollup.test.ts | 3 ++- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 89e2701408..ed8b65df83 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -198,8 +198,5 @@ jobs: - name: Generate network file run: yarn gen:network - - name: debug - run: pwd && ls && cd packages && ls && cd sdk && ls - - name: Run integration tests run: CI=true yarn test:integration diff --git a/packages/sdk/scripts/deployStandard.ts b/packages/sdk/scripts/deployStandard.ts index 0fb68cdc5a..e222f77229 100644 --- a/packages/sdk/scripts/deployStandard.ts +++ b/packages/sdk/scripts/deployStandard.ts @@ -5,7 +5,8 @@ import { constants, BigNumber, utils } from 'ethers' import { MultiCaller } from '../src' import axios from 'axios' import prompt from 'prompts' -dotenv.config() +import path from 'path' +dotenv.config({ path: path.resolve(__dirname, '../../../.env') }) const privKey = process.env.PRIVKEY as string if (!privKey) { diff --git a/packages/sdk/scripts/genNetwork.ts b/packages/sdk/scripts/genNetwork.ts index f991bc2660..05cae9d0bc 100644 --- a/packages/sdk/scripts/genNetwork.ts +++ b/packages/sdk/scripts/genNetwork.ts @@ -1,5 +1,5 @@ import * as dotenv from 'dotenv' -dotenv.config() +dotenv.config({ path: path.resolve(__dirname, '../../../.env') }) import { execSync } from 'child_process' import * as fs from 'fs' diff --git a/packages/sdk/scripts/instantiate_bridge.ts b/packages/sdk/scripts/instantiate_bridge.ts index 747a81e8b6..a34008b086 100644 --- a/packages/sdk/scripts/instantiate_bridge.ts +++ b/packages/sdk/scripts/instantiate_bridge.ts @@ -29,7 +29,7 @@ import { import { Signer } from 'ethers' import { AdminErc20Bridger } from '../src/lib/assetBridger/erc20Bridger' -dotenv.config() +dotenv.config({ path: path.resolve(__dirname, '../../../.env') }) const arbKey = process.env['ARB_KEY'] as string const ethKey = process.env['ETH_KEY'] as string diff --git a/packages/sdk/scripts/testSetup.ts b/packages/sdk/scripts/testSetup.ts index 10bc2c68ba..dc8239b418 100644 --- a/packages/sdk/scripts/testSetup.ts +++ b/packages/sdk/scripts/testSetup.ts @@ -41,7 +41,7 @@ import { } from '../tests/integration/custom-fee-token/customFeeTokenTestHelpers' import { fundParentSigner } from '../tests/integration/testHelpers' -dotenv.config() +dotenv.config({ path: path.resolve(__dirname, '../../../.env') }) const isTestingOrbitChains = process.env.ORBIT_TEST === '1' diff --git a/packages/sdk/tests/integration/custom-fee-token/customFeeTokenEthBridger.test.ts b/packages/sdk/tests/integration/custom-fee-token/customFeeTokenEthBridger.test.ts index a2fb36b9a0..8395fc8b6d 100644 --- a/packages/sdk/tests/integration/custom-fee-token/customFeeTokenEthBridger.test.ts +++ b/packages/sdk/tests/integration/custom-fee-token/customFeeTokenEthBridger.test.ts @@ -19,6 +19,7 @@ import { expect } from 'chai' import { ethers, constants, Wallet } from 'ethers' import dotenv from 'dotenv' +import path from 'path' import { parseEther, parseUnits } from '@ethersproject/units' @@ -34,7 +35,7 @@ import { ChildToParentMessageStatus } from '../../../src' import { ChildToParentMessage } from '../../../src/lib/message/ChildToParentMessage' import { getNativeTokenDecimals } from '../../../src/lib/utils/lib' -dotenv.config() +dotenv.config({ path: path.resolve(__dirname, '../../../../.env') }) describeOnlyWhenCustomGasToken( 'EthBridger (with custom fee token)', diff --git a/packages/sdk/tests/integration/eth.test.ts b/packages/sdk/tests/integration/eth.test.ts index 6c2aacedc8..b9744ebcbe 100644 --- a/packages/sdk/tests/integration/eth.test.ts +++ b/packages/sdk/tests/integration/eth.test.ts @@ -18,6 +18,7 @@ import { expect } from 'chai' import dotenv from 'dotenv' +import path from 'path' import { Wallet } from '@ethersproject/wallet' import { parseEther } from '@ethersproject/units' @@ -44,7 +45,7 @@ import { } from '../../src/lib/utils/lib' import { parseUnits } from 'ethers/lib/utils' -dotenv.config() +dotenv.config({ path: path.resolve(__dirname, '../../../.env') }) describe('Ether', async () => { beforeEach('skipIfMainnet', async function () { diff --git a/packages/sdk/tests/integration/getArbitrumNetworkInformationFromRollup.test.ts b/packages/sdk/tests/integration/getArbitrumNetworkInformationFromRollup.test.ts index 92f2569937..3b68a04c7f 100644 --- a/packages/sdk/tests/integration/getArbitrumNetworkInformationFromRollup.test.ts +++ b/packages/sdk/tests/integration/getArbitrumNetworkInformationFromRollup.test.ts @@ -1,3 +1,4 @@ +import path from 'path' import dotenv from 'dotenv' import { JsonRpcProvider } from '@ethersproject/providers' import { constants } from 'ethers' @@ -8,7 +9,7 @@ import { getArbitrumNetworkInformationFromRollup, } from '../../src/lib/dataEntities/networks' -dotenv.config() +dotenv.config({ path: path.resolve(__dirname, '../../../.env') }) describe('getArbitrumNetworkInformationFromRollup', () => { it('fetches information about arbitrum one', async () => {