Skip to content

Commit e847ef9

Browse files
committed
fix
1 parent f792e1b commit e847ef9

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

ccip/cct/hardhat/config/networks.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,39 @@ const networks: Networks = {
1313
[EVMChains.avalancheFuji]: {
1414
type: "http",
1515
...configData.avalancheFuji,
16-
url: process.env.AVALANCHE_FUJI_RPC_URL!,
16+
url: process.env.AVALANCHE_FUJI_RPC_URL || "https://UNSET-PLEASE-SET-AVALANCHE_FUJI_RPC_URL",
1717
gasPrice: undefined,
1818
nonce: undefined,
1919
accounts,
2020
},
2121
[EVMChains.arbitrumSepolia]: {
2222
type: "http",
2323
...configData.arbitrumSepolia,
24-
url: process.env.ARBITRUM_SEPOLIA_RPC_URL!,
24+
url: process.env.ARBITRUM_SEPOLIA_RPC_URL || "https://UNSET-PLEASE-SET-ARBITRUM_SEPOLIA_RPC_URL",
2525
gasPrice: undefined,
2626
nonce: undefined,
2727
accounts,
2828
},
2929
[EVMChains.sepolia]: {
3030
type: "http",
3131
...configData.ethereumSepolia,
32-
url: process.env.ETHEREUM_SEPOLIA_RPC_URL!,
32+
url: process.env.ETHEREUM_SEPOLIA_RPC_URL || "https://UNSET-PLEASE-SET-ETHEREUM_SEPOLIA_RPC_URL",
3333
gasPrice: undefined,
3434
nonce: undefined,
3535
accounts,
3636
},
3737
[EVMChains.baseSepolia]: {
3838
type: "http",
3939
...configData.baseSepolia,
40-
url: process.env.BASE_SEPOLIA_RPC_URL!,
40+
url: process.env.BASE_SEPOLIA_RPC_URL || "https://UNSET-PLEASE-SET-BASE_SEPOLIA_RPC_URL",
4141
gasPrice: undefined,
4242
nonce: undefined,
4343
accounts,
4444
},
4545
[EVMChains.polygonAmoy]: {
4646
type: "http",
4747
...configData.polygonAmoy,
48-
url: process.env.POLYGON_AMOY_RPC_URL!,
48+
url: process.env.POLYGON_AMOY_RPC_URL || "https://UNSET-PLEASE-SET-POLYGON_AMOY_RPC_URL",
4949
gasPrice: undefined,
5050
nonce: undefined,
5151
accounts,

ccip/cct/hardhat/hardhat.config.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ import hardhatVerifyPlugin from "@nomicfoundation/hardhat-verify";
55
import { networks } from "./config";
66
import { tasks, npmFilesToBuild } from "./tasks";
77

8+
// Type adapter to convert Networks type to Hardhat's expected Record<string, NetworkUserConfig>
9+
type HardhatNetworks = Record<string, {
10+
type: "http";
11+
chainId: number;
12+
url: string;
13+
accounts: string[];
14+
gasPrice?: number;
15+
nonce?: number;
16+
}>;
17+
18+
// Type-safe conversion function that ensures networks match Hardhat's expected structure
19+
function toHardhatNetworks(networks: typeof import("./config").networks): HardhatNetworks {
20+
return networks as HardhatNetworks;
21+
}
22+
823
const SOLC_SETTINGS = {
924
optimizer: {
1025
enabled: true,
@@ -51,7 +66,7 @@ const config: HardhatUserConfig = {
5166
enabled: false,
5267
},
5368
},
54-
networks: networks as any
69+
networks: toHardhatNetworks(networks)
5570
};
5671

5772
export default config;

ccip/cct/hardhat/package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ccip/cct/hardhat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
"license": "ISC",
1010
"scripts": {
1111
"compile:hardhat": "hardhat compile",
12-
"compile:typechain": "hardhat typechain",
1312
"compile:typescript": "tsc --noEmit",
1413
"compile": "npm run compile:hardhat && npm run compile:typescript"
1514
},
1615
"devDependencies": {
1716
"@nomicfoundation/hardhat-toolbox-viem": "^5.0.0",
1817
"@solana/web3.js": "^1.98.2",
18+
"@types/bn.js": "^5.2.0",
1919
"@types/chai": "^4.3.16",
2020
"@types/mocha": "^10.0.6",
2121
"@types/node": "^20.12.12",

0 commit comments

Comments
 (0)