Skip to content

Commit e534165

Browse files
authored
Merge pull request #18 from bobanetwork/souradeep/zkRand-src
feat: add admin/node services
2 parents 29e4c58 + a404369 commit e534165

File tree

9 files changed

+1119
-20
lines changed

9 files changed

+1119
-20
lines changed

.env.example.admin

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
L2_NODE_WEB3_URL= <rpc>
2+
POLLING_INTERVAL= <interval of service refreshing>
3+
ZK_RAND_ADDRESS= <contract address>
4+
ADMIN_PRIVATE_KEY= <pk of admin account>
5+
NODE_ONE_ADDRESS= <first node account address>
6+
NODE_TWO_ADDRESS= <second node account address>
7+
NODE_THREE_ADDRESS= <third node account address>
8+
NODE_FOUR_ADDRESS= <fourth node account address>
9+
NODE_FIVE_ADDRESS= <fifth node account address>

.env.example.node

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
L2_NODE_WEB3_URL= <rpc>
2+
POLLING_INTERVAL= <interval of service refreshing>
3+
ZK_RAND_ADDRESS= <contract address>
4+
NODE_PRIVATE_KEY= <pk of node account>
5+
NODE_ONE_ADDRESS= <first node account address>
6+
NODE_TWO_ADDRESS= <second node account address>
7+
NODE_THREE_ADDRESS= <third node account address>
8+
NODE_FOUR_ADDRESS= <fourth node account address>
9+
NODE_FIVE_ADDRESS= <fifth node account address>

contracts/zkdvrf.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ contract zkdvrf is Ownable {
4343
uint32 public threshold;
4444
uint32 public ppLength;
4545
// current count of members added
46-
uint32 internal currentIndex;
46+
uint32 public currentIndex;
4747
// current count of members deposited and registered
4848
uint32 internal registeredCount;
4949
uint32 internal ppSubmissionCount;

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
"test": "test"
99
},
1010
"dependencies": {
11+
"@eth-optimism/common-ts": "0.2.2",
12+
"@eth-optimism/core-utils": "0.8.1",
1113
"@nomiclabs/hardhat-waffle": "^2.0.6",
1214
"@openzeppelin/contracts": "^5.0.1",
15+
"bcfg": "^0.2.2",
1316
"dotenv": "^16.4.5",
1417
"hardhat": "^2.22.1",
1518
"hardhat-deploy": "^0.11.45"
@@ -37,7 +40,9 @@
3740
"random": "npx hardhat run scripts/random.ts",
3841
"lottery:deploy": "npx hardhat run scripts/lottery/deploy.ts",
3942
"lottery:admin": "npx hardhat run scripts/lottery/admin.ts",
40-
"lottery:play": "npx hardhat run scripts/lottery/play.ts"
43+
"lottery:play": "npx hardhat run scripts/lottery/play.ts",
44+
"services:admin": "ts-node ./services/exec/run.ts",
45+
"services:node": "ts-node ./services/exec/runNode.ts"
4146
},
4247
"repository": {
4348
"type": "git",

0 commit comments

Comments
 (0)