Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
souradeep-das committed Jul 12, 2024
1 parent 62b4217 commit a404369
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export class AdminZkRandService extends BaseService<AdminZkRandOptions> {
await this.listenNidkg()
}

// TODO: need an if here to allow skipping on the second pass
const eventGpp = `GlobalPublicParamsCreated`
this.state.zkRandContract.on(eventGpp, async (event) => {
await this.initiateRand();
Expand Down
3 changes: 3 additions & 0 deletions services/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export class NodeZkRandService extends BaseService<NodeZkRandOptions> {
})

this.state.gasOverride = { gasLimit: 10000000 }
// TODO: check the last round from the contract and set
this.state.lastRoundSubmitted = 0
}

Expand Down Expand Up @@ -123,6 +124,8 @@ export class NodeZkRandService extends BaseService<NodeZkRandOptions> {
const mpk = data[`pk`]

const res = await this.state.zkRandContract.registerNode(mpk)
// const receipt = await res.wait()
// receipt.status
const receipt = await this.options.l2RpcProvider.getTransactionReceipt(res.hash);
// Check if the transaction was successful
if (receipt.status === 1) {
Expand Down

0 comments on commit a404369

Please sign in to comment.