Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Commit 91bcb62

Browse files
committed
deploy: cleans up helper exports to avoid name collisions
1 parent 5c81cb7 commit 91bcb62

12 files changed

+30
-39
lines changed

deployment/helpers/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export * from "./env";
2-
export * from "./evm";
3-
export * from "./solana";
2+
export * as evm from "./evm";
3+
export * as solana from "./solana";
44
export * from "./interfaces";
55
export * from "./utils";

deployment/scripts/evm/TokenRouter/bytecode-verification-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { runOnEvms, ChainInfo, LoggerFn, getContractAddress, getDeploymentArgs, getVerifyCommand, verificationApiKeys, flattenObject } from "../../../helpers";
2-
import { ethers } from "ethers";
1+
import { evm, getContractAddress, getDeploymentArgs, getVerifyCommand, verificationApiKeys, flattenObject } from "../../../helpers";
32
import { execSync } from "child_process";
43
import path from "path";
54
import chalk from "chalk";
65

7-
runOnEvms("bytecode-verification-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
6+
evm.runOnEvms("bytecode-verification-token-router", async (chain, signer, log) => {
87
// The root path of the foundry project
98
const rootPath = path.resolve('../evm/');
109

deployment/scripts/evm/TokenRouter/config-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { ChainInfo, LoggerFn, getContractInstance, getContractAddress, runOnEvmsSequentially, ValueDiff } from "../../../helpers";
2-
import { ethers } from "ethers";
1+
import { evm, LoggerFn, getContractInstance, getContractAddress, ValueDiff } from "../../../helpers";
32
import { getConfigurationDifferences, logDiff } from "./utils";
43
import confirm from '@inquirer/confirm';
54
import { TokenRouter } from "../../../contract-bindings";
65
import { FastTransferParametersStruct } from "../../../contract-bindings/ITokenRouter";
76

8-
runOnEvmsSequentially("config-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
7+
evm.runOnEvmsSequentially("config-token-router", async (chain, signer, log) => {
98
const tokenRouterAddress = getContractAddress("TokenRouterProxy", chain.chainId);
109
const tokenRouter = (await getContractInstance("TokenRouter", tokenRouterAddress, chain)) as TokenRouter;
1110
const diff = await getConfigurationDifferences(chain);

deployment/scripts/evm/TokenRouter/cross-registration-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { ChainInfo, LoggerFn, getContractInstance, getContractAddress, runOnEvms, contracts, getUniversalAddress } from "../../../helpers";
2-
import { ethers } from "ethers";
1+
import { evm, getContractInstance, getContractAddress, contracts, getUniversalAddress } from "../../../helpers";
32
import { TokenRouter } from "../../../contract-bindings";
43
import { circle, toChain } from "@wormhole-foundation/sdk-base";
54

6-
runOnEvms("cross-registration-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
5+
evm.runOnEvms("cross-registration-token-router", async (chain, signer, log) => {
76
const tokenRouterAddress = getContractAddress("TokenRouterProxy", chain.chainId);
87
const tokenRouter = (await getContractInstance("TokenRouter", tokenRouterAddress, chain)) as TokenRouter;
98
const deployedTokenRouters = contracts['TokenRouterProxy'].filter((router) => router.chainId !== chain.chainId);

deployment/scripts/evm/TokenRouter/deploy-token-router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { ethers } from "ethers";
2-
import { runOnEvms, ChainInfo, LoggerFn, writeDeployedContract } from "../../../helpers";
2+
import { evm, LoggerFn, writeDeployedContract } from "../../../helpers";
33
import { TokenRouterConfiguration } from "../../../config/config-types";
44
import { deployImplementation, getTokenRouterConfiguration } from "./utils";
55
import { ERC1967Proxy__factory } from "../../../contract-bindings";
66

7-
runOnEvms("deploy-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
7+
evm.runOnEvms("deploy-token-router", async (chain, signer, log) => {
88
const config = await getTokenRouterConfiguration(chain);
99
const implementation = await deployImplementation(chain, signer, config, log);
1010
await deployProxy(signer, config, implementation, log);

deployment/scripts/evm/TokenRouter/disable-router-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { TokenRouter } from "../../../contract-bindings";
2-
import { ChainInfo, LoggerFn, getContractInstance, getContractAddress, runOnEvms } from "../../../helpers";
3-
import { ethers } from "ethers";
2+
import { evm, getContractInstance, getContractAddress } from "../../../helpers";
43
import { getTokenRouterConfiguration } from "./utils";
54

6-
runOnEvms("disable-router-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
5+
evm.runOnEvms("disable-router-token-router", async (chain, signer, log) => {
76
const tokenRouterAddress = getContractAddress("TokenRouterProxy", chain.chainId);
87
const tokenRouter = (await getContractInstance("TokenRouter", tokenRouterAddress, chain)) as TokenRouter;
98
const config = await getTokenRouterConfiguration(chain);

deployment/scripts/evm/TokenRouter/get-config-diff-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { runOnEvms, ChainInfo, LoggerFn } from "../../../helpers";
2-
import { ethers } from "ethers";
1+
import { evm } from "../../../helpers";
32
import { getConfigurationDifferences, logDiff } from "./utils";
43

5-
runOnEvms("get-config-diff-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
4+
evm.runOnEvms("get-config-diff-token-router", async (chain, signer, log) => {
65
const diff = await getConfigurationDifferences(chain);
76

87
log(`TokenRouter configuration differences on chain ${chain.chainId}:`);

deployment/scripts/evm/TokenRouter/read-config-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { runOnEvms, ChainInfo, LoggerFn } from "../../../helpers";
2-
import { ethers } from "ethers";
1+
import { evm } from "../../../helpers";
32
import { getOnChainTokenRouterConfiguration } from "./utils";
43
import { inspect } from "util";
54

6-
runOnEvms("read-config-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
5+
evm.runOnEvms("read-config-token-router", async (chain, signer, log) => {
76
const onChainConfig = await getOnChainTokenRouterConfiguration(chain);
87
log(`TokenRouter configuration for chainId ${chain.chainId}:`);
98
log(inspect(onChainConfig, { depth: null, colors: true, compact: true }));

deployment/scripts/evm/TokenRouter/update-owner-assistant-token-router.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { TokenRouter } from "../../../contract-bindings";
2-
import { runOnEvmsSequentially, ChainInfo, LoggerFn, getContractInstance, getContractAddress, logComparision } from "../../../helpers";
3-
import { ethers } from "ethers";
2+
import { evm, getContractInstance, getContractAddress, logComparision } from "../../../helpers";
43
import { getConfigurationDifferences } from "./utils";
54
import confirm from '@inquirer/confirm';
65

7-
runOnEvmsSequentially("update-owner-assistant-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
6+
evm.runOnEvmsSequentially("update-owner-assistant-token-router", async (chain, signer, log) => {
87
const tokenRouterAddress = getContractAddress("TokenRouterProxy", chain.chainId);
98
const tokenRouter = (await getContractInstance("TokenRouter", tokenRouterAddress, chain)) as TokenRouter;
109
const diff = await getConfigurationDifferences(chain);
1110

12-
1311
log(`TokenRouter configuration differences on chain ${chain.chainId}:`);
1412
logComparision('OwnerAssistant', diff.ownerAssistant, log);
1513

deployment/scripts/evm/TokenRouter/upgrade-token-router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { runOnEvms, ChainInfo, LoggerFn, getContractInstance, getContractAddress, getDependencyAddress, getAddressType } from "../../../helpers";
2-
import { ethers } from "ethers";
1+
import { evm, ChainInfo, getContractInstance, getContractAddress, getDependencyAddress, getAddressType } from "../../../helpers";
32
import { deployImplementation, getTokenRouterConfiguration } from "./utils";
43
import { TokenRouter } from "../../../contract-bindings";
54
import { TokenRouterConfiguration } from "../../../config/config-types";
65
import { UniversalAddress } from "@wormhole-foundation/sdk-definitions";
76

8-
runOnEvms("upgrade-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
7+
evm.runOnEvms("upgrade-token-router", async (chain, signer, log) => {
98
const currentImplementationAddress = getContractAddress("TokenRouterImplementation", chain.chainId);
109
const proxyAddress = getContractAddress("TokenRouterProxy", chain.chainId);
1110
const proxy = (await getContractInstance("TokenRouter", proxyAddress, chain)) as TokenRouter;

0 commit comments

Comments
 (0)