Skip to content

Commit

Permalink
Add Whole Project
Browse files Browse the repository at this point in the history
  • Loading branch information
FoodChain1028 committed Jan 4, 2023
1 parent 75425f0 commit 567bc40
Show file tree
Hide file tree
Showing 36 changed files with 65,800 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions LICENSE 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 SWF LAB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@
# Intro
ZKVarCard is a system that can verify anyone's vax records without exposing one's private info by using [Semaphore protocol](https://semaphore.appliedzkp.org/).
![image](https://user-images.githubusercontent.com/78428519/209523685-b51ababf-adb1-43fc-9b42-07cdd81e5e91.png)

# Run frontend
- cd frontend && yarn
- yarn start (may encounter some error happens in snark.js - readline, just find it in node_modules and comment it out)

# Run json server
- yarn global add json-server
- at ./zkVarCard/frontend: type "yarn json-server db.json --port 4000"

# Things need to be solved
- some error pop out when we trying to call verify in useVax, and we deem it might cause due to contract issue, yet haven't solved.

5 changes: 5 additions & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NODE_PATH=./src
ETHEREUM_CHAIN_ID=5
CONTRACT_ADDRESS=0xE93CccAbf176E24297414a6C79b31Ab67eb2aB7B
ETHEREUM_PRIVATE_KEY=c882a3e1d0f9be7952afb9239ed7ba46546477caaef694c77cb618212edaeef2
INFURA_ID=c2df702ef262401691e9e54d8a65b1f2
23 changes: 23 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

22 changes: 22 additions & 0 deletions frontend/db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"vac": [
{
"vacHash": "f098f3d474da03bb081ff792f5ee96ee928d0e6a28d5c68ce39717925c72d49d",
"nonce": 0,
"commitment": "4285692068594754727627695916432184235297769727073757729164985480316530382607",
"id": 1
},
{
"vacHash": "f098f3d474da03bb081ff792f5ee96ee928d0e6a28d5c68ce39717925c72d49d",
"nonce": 0,
"commitment": "4285692068594754727627695916432184235297769727073757729164985480316530382607",
"id": 2
},
{
"vacHash": "dfa57c542fea29ed292cef0ce135d0e22189365fa59abedc7a310b751ace684f",
"nonce": 0,
"commitment": "10518942016405086693591107618816873283684897999479673286562581174701741805517",
"id": 3
}
]
}
Loading

0 comments on commit 567bc40

Please sign in to comment.