Skip to content

Commit 46c2e52

Browse files
committed
refactor(cli-template-contracts-hardhat): update configs
1 parent 9b982f7 commit 46c2e52

File tree

8 files changed

+25
-42
lines changed

8 files changed

+25
-42
lines changed

packages/cli-template-contracts-hardhat/.eslintignore

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ artifacts
1313
cache
1414
typechain-types
1515

16-
# types
17-
types
18-
19-
# circuits
20-
circuits
21-
22-
# production
23-
dist
24-
build
25-
docs
26-
2716
# misc
2817
.DS_Store
2918
*.pem
@@ -32,8 +21,3 @@ docs
3221
npm-debug.log*
3322
yarn-debug.log*
3423
yarn-error.log*
35-
36-
# packages
37-
cli-template-*
38-
39-
snark-artifacts

packages/cli-template-contracts-hardhat/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"parserOptions": {
99
"ecmaVersion": 6,
1010
"sourceType": "module",
11-
"project": ["./tsconfig.json", "./packages/**/tsconfig.json"]
11+
"project": ["./tsconfig.json"]
1212
},
1313
"plugins": ["@typescript-eslint"],
1414
"rules": {

packages/cli-template-contracts-hardhat/.prettierignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ package-lock.json
44
yarn.lock
55
.yarn
66

7-
87
# debug
98
npm-debug.log*
109
yarn-debug.log*
@@ -18,12 +17,6 @@ coverage.json
1817
artifacts
1918
cache
2019
typechain-types
21-
packages/contracts/deployed-contracts/undefined.json
22-
packages/contracts/deployed-contracts/hardhat.json
23-
packages/contracts/deployed-contracts/localhost.json
24-
25-
# contracts
26-
Verifier*.sol
2720

2821
# misc
2922
.DS_Store
@@ -34,4 +27,3 @@ npm-debug.log*
3427
yarn-debug.log*
3528
yarn-error.log*
3629

37-
zk-artifacts

packages/cli-template-contracts-hardhat/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
This project 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.
44

5-
## Usage
5+
## Install
66

77
### Install dependencies
88

99
```bash
1010
yarn
1111
```
1212

13+
## Usage
14+
1315
### Compile contracts
1416

1517
```bash

packages/cli-template-contracts-hardhat/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"files": [
77
"files.tgz",
88
"contracts/",
9-
"scripts/",
109
"tasks/",
1110
"test/",
1211
".editorconfig",
@@ -16,7 +15,10 @@
1615
".prettierignore",
1716
".prettierrc.json",
1817
"hardhat.config.ts",
19-
"tsconfig.json"
18+
"tsconfig.json",
19+
"README.md",
20+
".yarn/",
21+
".yarnrc.yml"
2022
],
2123
"publishConfig": {
2224
"access": "public"
@@ -30,6 +32,7 @@
3032
"test:report-gas": "REPORT_GAS=true hardhat test",
3133
"test:coverage": "hardhat coverage",
3234
"typechain": "hardhat typechain",
35+
"prepublish": "tar -czf files.tgz .gitignore",
3336
"lint": "eslint . --ext .js,.ts && solhint 'contracts/**/*.sol'",
3437
"prettier": "prettier -c --plugin=prettier-plugin-solidity .",
3538
"prettier:write": "prettier -w --plugin=prettier-plugin-solidity ."
@@ -69,7 +72,7 @@
6972
"typescript": "^5.3.3"
7073
},
7174
"dependencies": {
72-
"@semaphore-protocol/contracts": "^4.0.0-alpha.8"
75+
"@semaphore-protocol/contracts": "4.0.0-alpha.8"
7376
},
7477
"packageManager": "yarn@4.1.0"
7578
}

packages/cli-template-contracts-hardhat/test/Feedback.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,26 @@ describe("Feedback", () => {
5959

6060
const feedback = encodeBytes32String("Hello World")
6161

62-
const fullProof = await generateProof(users[1], group, feedback, groupId)
62+
const proof = await generateProof(users[1], group, feedback, groupId)
6363

6464
const transaction = feedbackContract.sendFeedback(
65-
fullProof.merkleTreeDepth,
66-
fullProof.merkleTreeRoot,
67-
fullProof.nullifier,
65+
proof.merkleTreeDepth,
66+
proof.merkleTreeRoot,
67+
proof.nullifier,
6868
feedback,
69-
fullProof.points
69+
proof.points
7070
)
7171

7272
await expect(transaction)
7373
.to.emit(semaphoreContract, "ProofValidated")
7474
.withArgs(
7575
groupId,
76-
fullProof.merkleTreeDepth,
77-
fullProof.merkleTreeRoot,
78-
fullProof.nullifier,
79-
fullProof.message,
76+
proof.merkleTreeDepth,
77+
proof.merkleTreeRoot,
78+
proof.nullifier,
79+
proof.message,
8080
groupId,
81-
fullProof.points
81+
proof.points
8282
)
8383
})
8484
})

packages/cli-template-contracts-hardhat/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77
"strict": true,
88
"skipLibCheck": true,
99
"resolveJsonModule": true
10-
}
10+
},
11+
"include": ["scripts/**/*", "tasks/**/*", "test/**/*", "build/typechain/**/*", "types/**/*"],
12+
"files": ["./hardhat.config.ts"]
1113
}

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8564,7 +8564,7 @@ __metadata:
85648564
"@nomicfoundation/hardhat-network-helpers": ^1.0.0
85658565
"@nomicfoundation/hardhat-toolbox": ^4.0.0
85668566
"@nomicfoundation/hardhat-verify": ^2.0.0
8567-
"@semaphore-protocol/contracts": ^4.0.0-alpha.8
8567+
"@semaphore-protocol/contracts": 4.0.0-alpha.8
85688568
"@semaphore-protocol/core": ^4.0.0-alpha.8
85698569
"@semaphore-protocol/hardhat": ^4.0.0-alpha.8
85708570
"@typechain/ethers-v6": ^0.5.0
@@ -8658,7 +8658,7 @@ __metadata:
86588658
languageName: unknown
86598659
linkType: soft
86608660

8661-
"@semaphore-protocol/contracts@4.0.0-alpha.8, @semaphore-protocol/contracts@^4.0.0-alpha.8, @semaphore-protocol/contracts@workspace:packages/contracts/contracts":
8661+
"@semaphore-protocol/contracts@4.0.0-alpha.8, @semaphore-protocol/contracts@workspace:packages/contracts/contracts":
86628662
version: 0.0.0-use.local
86638663
resolution: "@semaphore-protocol/contracts@workspace:packages/contracts/contracts"
86648664
dependencies:

0 commit comments

Comments
 (0)