Skip to content

Commit

Permalink
Merge pull request #18 from bobanetwork/souradeep/zkRand-src
Browse files Browse the repository at this point in the history
feat: add admin/node services
  • Loading branch information
kitounliu committed Jul 12, 2024
2 parents 29e4c58 + a404369 commit e534165
Show file tree
Hide file tree
Showing 9 changed files with 1,119 additions and 20 deletions.
9 changes: 9 additions & 0 deletions .env.example.admin
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
L2_NODE_WEB3_URL= <rpc>
POLLING_INTERVAL= <interval of service refreshing>
ZK_RAND_ADDRESS= <contract address>
ADMIN_PRIVATE_KEY= <pk of admin account>
NODE_ONE_ADDRESS= <first node account address>
NODE_TWO_ADDRESS= <second node account address>
NODE_THREE_ADDRESS= <third node account address>
NODE_FOUR_ADDRESS= <fourth node account address>
NODE_FIVE_ADDRESS= <fifth node account address>
9 changes: 9 additions & 0 deletions .env.example.node
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
L2_NODE_WEB3_URL= <rpc>
POLLING_INTERVAL= <interval of service refreshing>
ZK_RAND_ADDRESS= <contract address>
NODE_PRIVATE_KEY= <pk of node account>
NODE_ONE_ADDRESS= <first node account address>
NODE_TWO_ADDRESS= <second node account address>
NODE_THREE_ADDRESS= <third node account address>
NODE_FOUR_ADDRESS= <fourth node account address>
NODE_FIVE_ADDRESS= <fifth node account address>
2 changes: 1 addition & 1 deletion contracts/zkdvrf.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract zkdvrf is Ownable {
uint32 public threshold;
uint32 public ppLength;
// current count of members added
uint32 internal currentIndex;
uint32 public currentIndex;
// current count of members deposited and registered
uint32 internal registeredCount;
uint32 internal ppSubmissionCount;
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"test": "test"
},
"dependencies": {
"@eth-optimism/common-ts": "0.2.2",
"@eth-optimism/core-utils": "0.8.1",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@openzeppelin/contracts": "^5.0.1",
"bcfg": "^0.2.2",
"dotenv": "^16.4.5",
"hardhat": "^2.22.1",
"hardhat-deploy": "^0.11.45"
Expand Down Expand Up @@ -37,7 +40,9 @@
"random": "npx hardhat run scripts/random.ts",
"lottery:deploy": "npx hardhat run scripts/lottery/deploy.ts",
"lottery:admin": "npx hardhat run scripts/lottery/admin.ts",
"lottery:play": "npx hardhat run scripts/lottery/play.ts"
"lottery:play": "npx hardhat run scripts/lottery/play.ts",
"services:admin": "ts-node ./services/exec/run.ts",
"services:node": "ts-node ./services/exec/runNode.ts"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit e534165

Please sign in to comment.