Skip to content

Commit

Permalink
fix: repo and ts configs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjei committed Aug 12, 2024
1 parent cc7182b commit a0d7428
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
/* eslint-disable @typescript-eslint/no-var-requires */
require("@nomicfoundation/hardhat-toolbox");
const dotenv = require("dotenv");
import "@nomicfoundation/hardhat-toolbox";
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/types";

const path = require("path");
import * as path from "path";

dotenv.config();

const parentDir = __dirname.includes("build") ? ".." : "";
const TEST_MNEMONIC = "test test test test test test test test test test test junk";

module.exports = {
const config: HardhatUserConfig = {
defaultNetwork: "localhost",
networks: {
localhost: {
url: process.env.COORDINATOR_RPC_URL,
url: process.env.COORDINATOR_RPC_URL || "",
accounts: {
mnemonic: TEST_MNEMONIC,
path: "m/44'/60'/0'/0",
Expand All @@ -31,3 +32,5 @@ module.exports = {
artifacts: path.resolve(__dirname, parentDir, "./node_modules/maci-contracts/build/artifacts"),
},
};

export default config;
3 changes: 1 addition & 2 deletions packages/coordinator/tests/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import {
mergeMessages,
mergeSignups,
} from "maci-cli";
import { Proof, TallyData } from "maci-contracts";
import { Poll__factory as PollFactory } from "maci-contracts/typechain-types";
import { Proof, TallyData, Poll__factory as PollFactory } from "maci-contracts";
import { Keypair } from "maci-domainobjs";
import { io, Socket } from "socket.io-client";
import request from "supertest";
Expand Down
2 changes: 1 addition & 1 deletion packages/coordinator/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"allowJs": true
},
"include": ["./ts", "./scripts", "./tests"],
"files": ["./hardhat.config.js"]
"files": ["./hardhat.config.ts"]
}
2 changes: 1 addition & 1 deletion packages/coordinator/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"experimentalDecorators": true
},
"include": ["./ts", "./scripts", "./tests"],
"files": ["hardhat.config.js"]
"files": ["hardhat.config.ts"]
}
12 changes: 5 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "Node16",
"lib": ["ESNext", "DOM"],
"strict": true,
"target": "ES2020",
"module": "commonjs",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node16",
"allowJs": true
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
},
"exclude": ["node_modules"],
"include": ["packages/coordinator/ts", "packages/coordinator/scripts", "./packages/interface/src"]
Expand Down

0 comments on commit a0d7428

Please sign in to comment.