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

Commit 5c81cb7

Browse files
committed
deploy: adds tsconfig.json and simplifies contract build pipeline
1 parent 3739b5c commit 5c81cb7

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

deployment/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "deployment",
33
"scripts": {
4-
"evm-deps": "forge build --contracts $(dirname $(pwd))/evm/lib/openzeppelin-contracts/contracts/proxy",
5-
"build-evm": "npm run evm-deps && npx typechain --target=ethers-v5 --out-dir=./contract-bindings ../evm/out/*/*.json ../out/*/*.json"
4+
"evm-deps": "forge build --contracts ../evm/lib/openzeppelin-contracts/contracts/proxy && forge build --config-path ../evm/foundry.toml",
5+
"build-evm": "npm run evm-deps && npx typechain --target=ethers-v5 --out-dir=./contract-bindings ../evm/out/*/*.json"
66
},
77
"author": "",
88
"devDependencies": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ethers } from "ethers";
33
import { getConfigurationDifferences, logDiff } from "./utils";
44
import confirm from '@inquirer/confirm';
55
import { TokenRouter } from "../../../contract-bindings";
6-
import { FastTransferParametersStruct } from "../../../contract-bindings/evm/out/ITokenRouter";
6+
import { FastTransferParametersStruct } from "../../../contract-bindings/ITokenRouter";
77

88
runOnEvmsSequentially("config-token-router", async (chain: ChainInfo, signer: ethers.Signer, log: LoggerFn) => {
99
const tokenRouterAddress = getContractAddress("TokenRouterProxy", chain.chainId);

deployment/scripts/evm/TokenRouter/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ethers } from "ethers";
22
import { TokenRouterConfiguration } from "../../../config/config-types";
33
import { TokenRouter, TokenRouter__factory } from "../../../contract-bindings";
44
import { ChainInfo, getChainConfig, LoggerFn, getDependencyAddress, writeDeployedContract, getContractAddress, getContractInstance, logComparision, someoneIsDifferent } from "../../../helpers";
5-
import { ERC20 } from "../../../contract-bindings/out/ERC20";
5+
import { ERC20 } from "../../../contract-bindings/ERC20";
66
import { UniversalAddress } from "@wormhole-foundation/sdk-definitions";
77

88
export function getTokenRouterConfiguration(chain: ChainInfo): Promise<TokenRouterConfiguration> {

deployment/tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["scripts/**/*.ts", "scripts/**/*.json", "helpers/**/*.ts", "config/**/*.ts", "config/**/*.json", "contract-bindings/**/*.ts"],
4+
"references": [
5+
{ "path": "../solana" },
6+
]
7+
}

tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"sourceMap": true,
1414
"skipLibCheck": true,
1515
"noErrorTruncation": true,
16+
"outDir": "ts-build",
17+
"resolveJsonModule": true,
1618
// Strict Checks
1719
// "alwaysStrict": true,
1820
// "noImplicitAny": true,

0 commit comments

Comments
 (0)