diff --git a/.env.example.admin b/.env.example.admin index f4334c8..8b36830 100644 --- a/.env.example.admin +++ b/.env.example.admin @@ -3,8 +3,10 @@ L2_NODE_WEB3_URL= POLLING_INTERVAL= #interval of randomness generation (in seconds); default = 3600 RAND_GEN_INTERVAL= +# UTC time for starting producing randoms, e.g., 2024-07-18T12:00:00Z +RAND_GEN_START_DATE= ZK_RAND_ADDRESS= -ADMIN_PRIVATE_KEY= +ADMIN_PRIVATE_KEY= NODE_ONE_ADDRESS= NODE_TWO_ADDRESS= NODE_THREE_ADDRESS= diff --git a/.env.example.deploy b/.env.example.deploy index 46847a8..5a60c3d 100644 --- a/.env.example.deploy +++ b/.env.example.deploy @@ -1,10 +1,10 @@ -L2_NODE_WEB3_URL=http://localhost:7545 -ADMIN_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 +L2_NODE_WEB3_URL= +ADMIN_PRIVATE_KEY= 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 \ No newline at end of file diff --git a/.env.example.node b/.env.example.node index 62b151f..e938830 100644 --- a/.env.example.node +++ b/.env.example.node @@ -2,4 +2,4 @@ L2_NODE_WEB3_URL= #interval of service refreshing (in milliseconds); default = 12000 POLLING_INTERVAL= ZK_RAND_ADDRESS= -NODE_PRIVATE_KEY= \ No newline at end of file +NODE_PRIVATE_KEY= \ No newline at end of file diff --git a/services/admin.ts b/services/admin.ts index 01a1e8e..361f7e9 100644 --- a/services/admin.ts +++ b/services/admin.ts @@ -110,6 +110,7 @@ export class AdminZkRandService extends BaseService { ) } + 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() @@ -176,7 +177,6 @@ export class AdminZkRandService extends BaseService { // 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)