Skip to content

Commit aee26c7

Browse files
authored
Remove taurus from auto-drive networks (#489)
* Refactor network constants to remove Taurus network and standardize string quotes * Remove unused subprojects: forge-std and openzeppelin-contracts * Add ESLint and Prettier configuration files; update network constants for consistent quote style
1 parent 071d412 commit aee26c7

File tree

3 files changed

+66
-25
lines changed

3 files changed

+66
-25
lines changed

packages/ui/.eslintrc.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"es2021": true,
5+
"node": true
6+
},
7+
"plugins": ["@typescript-eslint", "prettier", "require-extensions"],
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/eslint-recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:require-extensions/recommended",
13+
"prettier"
14+
],
15+
"parserOptions": {
16+
"ecmaFeatures": {
17+
"jsx": true
18+
},
19+
"ecmaVersion": "latest",
20+
"sourceType": "module"
21+
},
22+
"parser": "@typescript-eslint/parser",
23+
"rules": {
24+
"react/react-in-jsx-scope": "off",
25+
"spaced-comment": "error",
26+
"quotes": ["error", "single"],
27+
"no-duplicate-imports": "error"
28+
},
29+
"ignorePatterns": [
30+
"dist/**/*",
31+
"build/**/*",
32+
"node_modules/**/*",
33+
"migrations/**/*",
34+
"jest.config.ts"
35+
],
36+
"settings": {
37+
"import/resolver": {
38+
"typescript": {
39+
"alwaysTryTypes": true,
40+
"project": "./tsconfig.json"
41+
}
42+
}
43+
}
44+
}

packages/ui/.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": false,
3+
"tabWidth": 2,
4+
"printWidth": 80,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"jsxSingleQuote": true,
8+
"bracketSpacing": true,
9+
"plugins": [],
10+
"extends": ["eslint:recommended", "plugin:prettier/recommended"]
11+
}
Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
export enum NetworkId {
2-
TAURUS = 'taurus',
32
MAINNET = 'mainnet',
43
LOCAL = 'local',
54
}
65

76
export interface Network {
8-
id: NetworkId;
9-
name: string;
10-
download: string;
11-
http: string;
12-
gql: string;
7+
id: NetworkId
8+
name: string
9+
download: string
10+
http: string
11+
gql: string
1312
}
1413

15-
export const defaultNetworkId = NetworkId.MAINNET;
14+
export const defaultNetworkId = NetworkId.MAINNET
1615

1716
export const networks: Partial<Record<NetworkId, Network>> = {
18-
[NetworkId.TAURUS]: {
19-
id: NetworkId.TAURUS,
20-
name: 'Taurus',
21-
http:
22-
process.env.NEXT_PUBLIC_TAURUS_HTTP_URL ||
23-
'https://demo.auto-drive.autonomys.xyz/api',
24-
download:
25-
process.env.NEXT_PUBLIC_TAURUS_DOWNLOAD_URL ||
26-
'https://public.taurus.auto-drive.autonomys.xyz/api',
27-
gql:
28-
process.env.NEXT_PUBLIC_TAURUS_GQL_URL ||
29-
'https://demo.auto-drive.autonomys.xyz/hasura/v1/graphql',
30-
},
3117
[NetworkId.MAINNET]: {
3218
id: NetworkId.MAINNET,
3319
name: 'Mainnet',
@@ -41,7 +27,7 @@ export const networks: Partial<Record<NetworkId, Network>> = {
4127
process.env.NEXT_PUBLIC_MAINNET_GQL_URL ||
4228
'https://mainnet.auto-drive.autonomys.xyz/hasura/v1/graphql',
4329
},
44-
};
30+
}
4531

4632
if (process.env.NEXT_PUBLIC_ENV === 'local') {
4733
networks[NetworkId.LOCAL] = {
@@ -53,12 +39,12 @@ if (process.env.NEXT_PUBLIC_ENV === 'local') {
5339
gql:
5440
process.env.NEXT_PUBLIC_LOCAL_GQL_URL ||
5541
'http://localhost:6565/v1/graphql',
56-
};
42+
}
5743
}
5844

5945
export const getNetwork = (networkId: NetworkId) => {
6046
if (!networks[networkId]) {
61-
throw new Error(`Network ${networkId} not found`);
47+
throw new Error(`Network ${networkId} not found`)
6248
}
63-
return networks[networkId];
64-
};
49+
return networks[networkId]
50+
}

0 commit comments

Comments
 (0)