Skip to content

Commit

Permalink
Merge branch 'hyperlane-xyz:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mshojaei-txfusion authored Jan 22, 2025
2 parents 59165bb + 9e38617 commit 1058872
Show file tree
Hide file tree
Showing 14 changed files with 1,761 additions and 344 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,12 @@ jobs:
# Other commands
- relay
# Warp Commands
- warp-init
- warp-read
- warp-apply
- warp-check
- warp-deploy
- warp-init
- warp-read
- warp-send
steps:
- uses: actions/checkout@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class MultiChainResolver implements ChainResolver {
argv.config ||= DEFAULT_WARP_ROUTE_DEPLOYMENT_CONFIG_PATH;
argv.context.chains = await this.getWarpRouteConfigChains(
argv.config.trim(),
argv.skipConfirmation,
argv.context.skipConfirmation,
);
return argv.context.chains;
}
Expand Down
32 changes: 28 additions & 4 deletions typescript/cli/src/tests/commands/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { ethers } from 'ethers';
import { $, ProcessOutput, ProcessPromise } from 'zx';

import { ERC20Test__factory, ERC4626Test__factory } from '@hyperlane-xyz/core';
import { ChainAddresses } from '@hyperlane-xyz/registry';
import {
ERC20Test,
ERC20Test__factory,
ERC4626Test__factory,
} from '@hyperlane-xyz/core';
import {
ChainAddresses,
createWarpRouteConfigId,
} from '@hyperlane-xyz/registry';
import {
HypTokenRouterConfig,
WarpCoreConfig,
Expand Down Expand Up @@ -41,8 +48,19 @@ export const CHAIN_3_METADATA_PATH = `${REGISTRY_PATH}/chains/${CHAIN_NAME_3}/me

export const WARP_CONFIG_PATH_EXAMPLE = `${EXAMPLES_PATH}/warp-route-deployment.yaml`;
export const WARP_CONFIG_PATH_2 = `${TEMP_PATH}/${CHAIN_NAME_2}/warp-route-deployment-anvil2.yaml`;
export const WARP_DEPLOY_OUTPUT_PATH = `${TEMP_PATH}/warp-route-deployment.yaml`;
export const WARP_CORE_CONFIG_PATH_2 = `${REGISTRY_PATH}/deployments/warp_routes/ETH/anvil2-config.yaml`;

export function getCombinedWarpRoutePath(
tokenSymbol: string,
chains: string[],
): string {
return `${REGISTRY_PATH}/deployments/warp_routes/${createWarpRouteConfigId(
tokenSymbol.toUpperCase(),
chains,
)}-config.yaml`;
}

export const DEFAULT_E2E_TEST_TIMEOUT = 100_000; // Long timeout since these tests can take a while

export enum KeyBoardKeys {
Expand Down Expand Up @@ -258,7 +276,8 @@ export async function deployToken(
privateKey: string,
chain: string,
decimals = 18,
) {
symbol = 'TOKEN',
): Promise<ERC20Test> {
const { multiProvider } = await getContext({
registryUri: REGISTRY_PATH,
registryOverrideUri: '',
Expand All @@ -270,7 +289,12 @@ export async function deployToken(

const token = await new ERC20Test__factory(
multiProvider.getSigner(chain),
).deploy('token', 'token', '100000000000000000000', decimals);
).deploy(
'token',
symbol.toLocaleUpperCase(),
'100000000000000000000',
decimals,
);
await token.deployed();

return token;
Expand Down
Loading

0 comments on commit 1058872

Please sign in to comment.