Skip to content

Commit e5394e4

Browse files
committed
fix npm file paths
1 parent b1f7d16 commit e5394e4

File tree

3 files changed

+7
-24
lines changed

3 files changed

+7
-24
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@open-ibc/vibc-core-smart-contracts",
3-
"version": "3.0.5",
3+
"version": "3.0.6",
44
"main": "dist/index.js",
55
"bin": {
66
"verify-vibc-core-smart-contracts": "./dist/scripts/verify-contract-script.js",

src/utils/constants.ts

+6-16
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ export const DEFAULT_CHAIN_ID = "31337";
99
export const DEFAULT_CHAIN_NAME = "local";
1010
export const DEFAULT_VERIFIER = "blockscout";
1111
export const MODULE_ROOT_PATH =
12-
process.env.MODULE_ROOT_PATH ||
13-
path.resolve(__dirname, '../'); // Note: this is impacted by the tsup config since that can potential change where this file ends up being built to
12+
process.env.MODULE_ROOT_PATH || path.resolve(__dirname, "..", ".."); // Note: this is impacted by the tsup config since that can potential change where this file ends up being built to
13+
export const PARENT_MODULE_ROOT_PATH = path.dirname(path.resolve("package.json")); // Path of module using this package; path.resolve uses cwd so this should typically be the root of the module that's running the bin
1414
const DEFAULT_ARTIFACTS_PATH = path.resolve(MODULE_ROOT_PATH, "out");
15-
const DEFAULT_DEPLOYMENTS_PATH = path.resolve(MODULE_ROOT_PATH, "./deployments");
15+
const DEFAULT_DEPLOYMENTS_PATH = path.resolve(
16+
PARENT_MODULE_ROOT_PATH,
17+
"deployments"
18+
);
1619
const DEFAULT_SPECS_PATH = path.resolve(MODULE_ROOT_PATH, "./specs");
1720
const DEFAULT_DEPLOYMENT_ENVIRONMENT = "local"; // Deployment Environment disambiguates between deployment environments on the same chains (e.g. staging testnet vs prod testnet) This should be one of the following: local, staging, prod, mainnet
1821

@@ -37,23 +40,10 @@ const SPECS_BASE_PATH = process.env.SPECS_BASE_PATH
3740
? process.env.SPECS_BASE_PATH
3841
: DEFAULT_SPECS_PATH;
3942

40-
export const DEPLOY_SPECS_PATH = process.env.DEPLOY_SPECS_PATH
41-
? process.env.DEPLOY_SPECS_PATH
42-
: path.resolve(SPECS_BASE_PATH, "contracts.spec.yaml");
43-
44-
export const UPGRADE_SPECS_PATH = process.env.UPGRADE_SPECS_PATH
45-
? process.env.UPGRADE_SPECS_PATH
46-
: path.resolve(SPECS_BASE_PATH, "upgrade.spec.yaml");
47-
4843
export const UPDATE_SPECS_PATH = process.env.UPDATE_SPECS_PATH
4944
? process.env.UPDATE_SPECS_PATH
5045
: path.resolve(SPECS_BASE_PATH, "update.spec.yaml");
5146

5247
export const ACCOUNTS_SPECS_PATH = process.env.ACCOUNTS_SPECS_PATH
5348
? process.env.ACCOUNTS_SPECS_PATH
5449
: path.resolve(SPECS_BASE_PATH, "evm.accounts.yaml");
55-
56-
export const DISPATCHER_SETUP_SPECS_PATH = process.env
57-
.DISPATCHER_SETUP_SPECS_PATH
58-
? process.env.DISPATCHER_SETUP_SPECS_PATH
59-
: path.resolve(SPECS_BASE_PATH, "contracts.setup.spec.yaml");

src/utils/io.ts

-7
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ import {
1515
CHAIN_NAME,
1616
CHAIN_ID,
1717
RPC_URL,
18-
DEPLOY_SPECS_PATH,
1918
PACKAGE_VERSION,
2019
DEPLOYMENT_ENVIRONMENT,
2120
ANVIL_PORT,
22-
UPGRADE_SPECS_PATH,
2321
UPDATE_SPECS_PATH,
2422
} from "./constants";
2523
import yargs from "yargs/yargs";
@@ -365,9 +363,6 @@ export async function parseArgsFromCLI() {
365363
const accountSpecs =
366364
(argv1.ACCOUNT_SPECS_PATH as string) || ACCOUNTS_SPECS_PATH;
367365

368-
const deploySpecs = (argv1.DEPLOY_SPECS_PATH as string) || DEPLOY_SPECS_PATH;
369-
const upgradeSpecs =
370-
(argv1.UPGRADE_SPECS_PATH as string) || UPGRADE_SPECS_PATH;
371366
const updateSpecs = (argv1.UPDATE_SPECS_PATH as string) || UPDATE_SPECS_PATH;
372367
const anvilPort = (argv1.ANVIL_PORT as string) || ANVIL_PORT;
373368

@@ -394,9 +389,7 @@ export async function parseArgsFromCLI() {
394389
chain: chainParse.data,
395390
accounts,
396391
accountSpecs,
397-
upgradeSpecs,
398392
updateSpecs,
399-
deploySpecs,
400393
args: argv1,
401394
anvilPort,
402395
};

0 commit comments

Comments
 (0)