Skip to content

Commit

Permalink
minor improve
Browse files Browse the repository at this point in the history
  • Loading branch information
kitounliu committed Jul 19, 2024
1 parent 151f146 commit df0fad5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .env.example.admin
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ L2_NODE_WEB3_URL= <rpc>
POLLING_INTERVAL= <interval of service refreshing>
#interval of randomness generation (in seconds); default = 3600
RAND_GEN_INTERVAL= <interval of randomness generation>
# UTC time for starting producing randoms, e.g., 2024-07-18T12:00:00Z
RAND_GEN_START_DATE=<date to start producing randoms>
ZK_RAND_ADDRESS= <contract address>
ADMIN_PRIVATE_KEY= <pk of admin account>
ADMIN_PRIVATE_KEY= <private key of admin account>
NODE_ONE_ADDRESS= <first node account address>
NODE_TWO_ADDRESS= <second node account address>
NODE_THREE_ADDRESS= <third node account address>
Expand Down
6 changes: 3 additions & 3 deletions .env.example.deploy
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
L2_NODE_WEB3_URL=http://localhost:7545
ADMIN_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
L2_NODE_WEB3_URL=<rpc>
ADMIN_PRIVATE_KEY=<private key of admin account>
THRESHOLD=3
NUMBER_OF_MEMBERS=5
DEGREE=18
DEPLOY_NO_HELPERS=false # optional
HALO2V=0x26Aa5a7c4CA7D0F81943ea9CbDf97D80c560D6Fa # optional
HALO2VK=0x63311f167b6B07fd0D3d83310c16512701B4Cb2d # optional
HALO2V=0x26Aa5a7c4CA7D0F81943ea9CbDf97D80c560D6Fa # optional
GPP=0xbB9a8f4c3662b6EF4b512E5f358289d1Db63fc81 # optional
PSRAND=0xAecFC1cc68dD9664F2fCF5f2958d5277c5385123 # optional
2 changes: 1 addition & 1 deletion .env.example.node
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ L2_NODE_WEB3_URL= <rpc>
#interval of service refreshing (in milliseconds); default = 12000
POLLING_INTERVAL= <interval of service refreshing>
ZK_RAND_ADDRESS= <contract address>
NODE_PRIVATE_KEY= <pk of node account>
NODE_PRIVATE_KEY= <private key of node account>
2 changes: 1 addition & 1 deletion services/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export class AdminZkRandService extends BaseService<AdminZkRandOptions> {
)
}

let threshold = await this.state.zkRandContract.threshold()
let memberCountFromContract = await this.state.zkRandContract.memberCount()
console.log("memberCountFromContract", memberCountFromContract)
let currentIndexFromContract = await this.state.zkRandContract.currentIndex()
Expand Down Expand Up @@ -176,7 +177,6 @@ export class AdminZkRandService extends BaseService<AdminZkRandOptions> {
// random generation starts from 1
await this.initiateRand()
} else {
let threshold = await this.state.zkRandContract.threshold()
let submissionCount = await this.state.zkRandContract.roundSubmissionCount(currentRoundNum)
let roundToRandom = await this.state.zkRandContract.roundToRandom(currentRoundNum)

Expand Down

0 comments on commit df0fad5

Please sign in to comment.