diff --git a/solidity/test/signer.ts b/solidity/test/signer.ts index b4e31d5625..c59a626203 100644 --- a/solidity/test/signer.ts +++ b/solidity/test/signer.ts @@ -7,6 +7,6 @@ export async function getSigners(): Promise { } export async function getSigner(): Promise { - const [signers] = await getSigners(); - return signers; + const [signer] = await getSigners(); + return signer; } diff --git a/typescript/infra/package.json b/typescript/infra/package.json index f3695a2761..bf100b8d7b 100644 --- a/typescript/infra/package.json +++ b/typescript/infra/package.json @@ -67,7 +67,7 @@ "deploy-helloworld": "tsx scripts/deploy.ts -e test -m helloworld", "deploy-hook": "tsx scripts/deploy.ts -e test -m hook", "hardhat-esm": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only --no-warnings=ExperimentalWarning' hardhat --config hardhat.config.cts", - "kathy": "yarn tsx ./scripts/send-random-messages.ts", + "kathy": "yarn tsx ./scripts/send-test-messages.ts", "prettier": "prettier --write ./src ./config ./scripts ./test", "test": "yarn test:unit && yarn test:hardhat", "test:unit": "mocha --config ../sdk/.mocharc.json test/**/*.test.ts", diff --git a/typescript/infra/scripts/middleware/circle-relayer.ts b/typescript/infra/scripts/middleware/circle-relayer.ts index c619cefaad..18bc68774b 100644 --- a/typescript/infra/scripts/middleware/circle-relayer.ts +++ b/typescript/infra/scripts/middleware/circle-relayer.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; import { @@ -22,8 +22,8 @@ async function check() { } const multiProvider = await config.getMultiProvider(); - const dir = path.join( - path.dirname(fileURLToPath(import.meta.url)), + const dir = join( + dirname(fileURLToPath(import.meta.url)), '../../', getEnvironmentDirectory(environment), 'middleware/liquidity-layer', diff --git a/typescript/infra/scripts/middleware/portal-relayer.ts b/typescript/infra/scripts/middleware/portal-relayer.ts index b486a0296f..ed3a8e09bd 100644 --- a/typescript/infra/scripts/middleware/portal-relayer.ts +++ b/typescript/infra/scripts/middleware/portal-relayer.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; import { @@ -19,8 +19,8 @@ async function relayPortalTransfers() { const { environment } = await getArgs().argv; const config = getEnvironmentConfig(environment); const multiProvider = await config.getMultiProvider(); - const dir = path.join( - path.dirname(fileURLToPath(import.meta.url)), + const dir = join( + dirname(fileURLToPath(import.meta.url)), '../../', getEnvironmentDirectory(environment), 'middleware/liquidity-layer', diff --git a/typescript/infra/scripts/send-random-messages.ts b/typescript/infra/scripts/send-test-messages.ts similarity index 100% rename from typescript/infra/scripts/send-random-messages.ts rename to typescript/infra/scripts/send-test-messages.ts diff --git a/typescript/infra/src/agents/index.ts b/typescript/infra/src/agents/index.ts index ee2f7a6e6e..186d35934a 100644 --- a/typescript/infra/src/agents/index.ts +++ b/typescript/infra/src/agents/index.ts @@ -1,5 +1,5 @@ import fs from 'fs'; -import path from 'path'; +import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; import { ChainName, RpcConsensusType, chainMetadata } from '@hyperlane-xyz/sdk'; @@ -27,8 +27,8 @@ import { execCmd, isEthereumProtocolChain } from '../utils/utils.js'; import { AgentGCPKey } from './gcp.js'; -const HELM_CHART_PATH = path.join( - path.dirname(fileURLToPath(import.meta.url)), +const HELM_CHART_PATH = join( + dirname(fileURLToPath(import.meta.url)), '/../../../../rust/helm/hyperlane-agent/', ); diff --git a/typescript/infra/src/agents/key-utils.ts b/typescript/infra/src/agents/key-utils.ts index ffc767097b..256a24e6b9 100644 --- a/typescript/infra/src/agents/key-utils.ts +++ b/typescript/infra/src/agents/key-utils.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; import { ChainMap, ChainName } from '@hyperlane-xyz/sdk'; @@ -44,8 +44,8 @@ export interface KeyAsAddress { address: string; } -const CONFIG_DIRECTORY_PATH = path.join( - path.dirname(fileURLToPath(import.meta.url)), +const CONFIG_DIRECTORY_PATH = join( + dirname(fileURLToPath(import.meta.url)), '../../config', ); @@ -452,8 +452,8 @@ export async function persistRoleAddressesToLocalArtifacts( addresses[environment][context] = updated; // Resolve the relative path - const filePath = path.join( - path.dirname(fileURLToPath(import.meta.url)), + const filePath = join( + dirname(fileURLToPath(import.meta.url)), `../../config/${role}.json`, );