@semaphore-protocol/cli-template-monorepo-subgraph 4.0.0-alpha.8 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +0 -4
- package/.prettierignore +5 -1
- package/README.md +8 -8
- package/files.tgz +0 -0
- package/package.json +9 -22
- package/.eslintignore +0 -45
- package/.eslintrc.json +0 -36
- package/tsconfig.json +0 -3
package/.env.example
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
DEFAULT_NETWORK=localhost
|
|
2
2
|
INFURA_API_KEY=
|
|
3
3
|
ETHEREUM_PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
|
|
4
|
-
FEEDBACK_CONTRACT_ADDRESS=0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9
|
|
5
|
-
SEMAPHORE_CONTRACT_ADDRESS=0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0
|
|
6
|
-
OPENZEPPELIN_AUTOTASK_WEBHOOK=
|
|
7
|
-
GROUP_ID=42
|
|
8
4
|
REPORT_GAS=false
|
|
9
5
|
COINMARKETCAP_API_KEY=
|
|
10
6
|
ETHERSCAN_API_KEY=
|
package/.prettierignore
CHANGED
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# Semaphore Hardhat + Next.js +
|
|
1
|
+
# Semaphore Hardhat + Next.js + SemaphoreSubgraph template
|
|
2
2
|
|
|
3
3
|
This project is a complete application that demonstrates a basic Semaphore use case. It comes with a sample contract, a test for that contract and a sample task that deploys that contract. It also contains a frontend to play around with the contract.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Install dependencies
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
yarn
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## 📜 Usage
|
|
14
14
|
|
|
15
15
|
### Local server
|
|
16
16
|
|
|
@@ -30,7 +30,7 @@ yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitru
|
|
|
30
30
|
|
|
31
31
|
2. Update your `.env` file with your new contract address, the group id and the semaphore contract address.
|
|
32
32
|
|
|
33
|
-
3. Copy your contract artifacts from `apps/contracts/
|
|
33
|
+
3. Copy your contract artifacts from `apps/contracts/artifacts/contracts/` folder to `apps/web-app/contract-artifacts` folder manually.
|
|
34
34
|
|
|
35
35
|
> **Note**
|
|
36
36
|
> Check the Semaphore contract addresses [here](https://docs.semaphore.pse.dev/deployed-contracts).
|
|
@@ -40,7 +40,7 @@ yarn deploy --semaphore <semaphore-address> --group <group-id> --network arbitru
|
|
|
40
40
|
|
|
41
41
|
### Code quality and formatting
|
|
42
42
|
|
|
43
|
-
Run [ESLint](https://eslint.org/) to analyze the code and catch bugs:
|
|
43
|
+
Run [ESLint](https://eslint.org/) and [solhint](https://github.com/protofire/solhint) to analyze the code and catch bugs:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
yarn lint
|
|
@@ -52,7 +52,7 @@ Run [Prettier](https://prettier.io/) to check formatting rules:
|
|
|
52
52
|
yarn prettier
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Or to automatically format the code:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
58
|
yarn prettier:write
|
package/files.tgz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,43 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semaphore-protocol/cli-template-monorepo-subgraph",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"description": "Semaphore Hardhat + Next.js + SemaphoreSubgraph template.",
|
|
5
5
|
"license": "Unlicense",
|
|
6
6
|
"files": [
|
|
7
7
|
"files.tgz",
|
|
8
|
-
"scripts/",
|
|
9
8
|
".editorconfig",
|
|
10
9
|
".env.example",
|
|
11
|
-
".eslintignore",
|
|
12
|
-
".eslintrc.json",
|
|
13
10
|
".prettierignore",
|
|
14
11
|
".prettierrc.json",
|
|
15
|
-
"tsconfig.json",
|
|
16
12
|
"README.md"
|
|
17
13
|
],
|
|
18
14
|
"scripts": {
|
|
19
|
-
"dev": "yarn workspaces foreach -pi run dev",
|
|
20
|
-
"dev:web-app": "yarn workspace monorepo-
|
|
21
|
-
"dev:contracts": "yarn workspace monorepo-
|
|
22
|
-
"lint": "
|
|
23
|
-
"prettier": "prettier -c .",
|
|
24
|
-
"prettier:write": "prettier -w .",
|
|
15
|
+
"dev": "yarn workspaces foreach -A -pi run dev",
|
|
16
|
+
"dev:web-app": "yarn workspace monorepo-ethers-web-app dev",
|
|
17
|
+
"dev:contracts": "yarn workspace monorepo-ethers-contracts dev",
|
|
18
|
+
"lint": "yarn workspaces foreach -A -pi run lint",
|
|
19
|
+
"prettier": "prettier -c . && yarn workspaces foreach -A -pi run prettier",
|
|
20
|
+
"prettier:write": "prettier -w . && yarn workspaces foreach -A -pi run prettier:write",
|
|
25
21
|
"prepublish": "tar -czf files.tgz .gitignore .yarn .yarnrc.yml apps"
|
|
26
22
|
},
|
|
27
23
|
"workspaces": [
|
|
28
24
|
"apps/*"
|
|
29
25
|
],
|
|
26
|
+
"packageManager": "yarn@4.1.0",
|
|
30
27
|
"devDependencies": {
|
|
31
|
-
"
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
33
|
-
"@typescript-eslint/parser": "^5.9.1",
|
|
34
|
-
"eslint": "^8.2.0",
|
|
35
|
-
"eslint-config-airbnb-base": "15.0.0",
|
|
36
|
-
"eslint-config-airbnb-typescript": "^16.1.0",
|
|
37
|
-
"eslint-config-prettier": "^8.3.0",
|
|
38
|
-
"eslint-plugin-import": "^2.25.2",
|
|
39
|
-
"prettier": "^2.5.1",
|
|
40
|
-
"ts-node": "^10.8.1",
|
|
41
|
-
"typescript": "^4.7.3"
|
|
28
|
+
"prettier": "^3.2.5"
|
|
42
29
|
}
|
|
43
30
|
}
|
package/.eslintignore
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# dependencies
|
|
2
|
-
node_modules
|
|
3
|
-
package-lock.json
|
|
4
|
-
yarn.lock
|
|
5
|
-
.yarn
|
|
6
|
-
|
|
7
|
-
# testing
|
|
8
|
-
coverage
|
|
9
|
-
coverage.json
|
|
10
|
-
|
|
11
|
-
# docs
|
|
12
|
-
docs
|
|
13
|
-
|
|
14
|
-
# types
|
|
15
|
-
types
|
|
16
|
-
|
|
17
|
-
# production
|
|
18
|
-
dist
|
|
19
|
-
build
|
|
20
|
-
cache
|
|
21
|
-
contract-artifacts
|
|
22
|
-
|
|
23
|
-
# misc
|
|
24
|
-
.DS_Store
|
|
25
|
-
*.pem
|
|
26
|
-
|
|
27
|
-
# debug
|
|
28
|
-
npm-debug.log*
|
|
29
|
-
yarn-debug.log*
|
|
30
|
-
yarn-error.log*
|
|
31
|
-
|
|
32
|
-
# Next.js
|
|
33
|
-
.next/
|
|
34
|
-
out/
|
|
35
|
-
|
|
36
|
-
# The Graph
|
|
37
|
-
generated
|
|
38
|
-
|
|
39
|
-
# Auto Generated PWA files
|
|
40
|
-
**/public/sw.js
|
|
41
|
-
**/public/workbox-*.js
|
|
42
|
-
**/public/worker-*.js
|
|
43
|
-
**/public/sw.js.map
|
|
44
|
-
**/public/workbox-*.js.map
|
|
45
|
-
**/public/worker-*.js.map
|
package/.eslintrc.json
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"env": {
|
|
4
|
-
"es6": true
|
|
5
|
-
},
|
|
6
|
-
"extends": ["airbnb-base", "airbnb-typescript/base", "prettier"],
|
|
7
|
-
"parser": "@typescript-eslint/parser",
|
|
8
|
-
"parserOptions": {
|
|
9
|
-
"ecmaVersion": 6,
|
|
10
|
-
"sourceType": "module",
|
|
11
|
-
"project": ["./**/tsconfig.json"]
|
|
12
|
-
},
|
|
13
|
-
"plugins": ["@typescript-eslint"],
|
|
14
|
-
"rules": {
|
|
15
|
-
"no-underscore-dangle": "off",
|
|
16
|
-
"no-alert": "off",
|
|
17
|
-
"no-nested-ternary": "off",
|
|
18
|
-
"import/no-extraneous-dependencies": "off",
|
|
19
|
-
"import/extensions": "off",
|
|
20
|
-
"import/no-relative-packages": "off",
|
|
21
|
-
"no-await-in-loop": "off",
|
|
22
|
-
"no-bitwise": "off",
|
|
23
|
-
"no-restricted-syntax": "off",
|
|
24
|
-
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
|
|
25
|
-
"@typescript-eslint/lines-between-class-members": "off",
|
|
26
|
-
"no-param-reassign": "off",
|
|
27
|
-
"@typescript-eslint/naming-convention": [
|
|
28
|
-
"error",
|
|
29
|
-
{
|
|
30
|
-
"selector": "variable",
|
|
31
|
-
"format": ["camelCase", "PascalCase", "UPPER_CASE", "snake_case"],
|
|
32
|
-
"leadingUnderscore": "allow"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
}
|
package/tsconfig.json
DELETED