Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add admin/node services #18

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading