From ef20fd1d1a77464068d2d83ed683bcae4b4730c7 Mon Sep 17 00:00:00 2001 From: stubbsta Date: Fri, 13 Jun 2025 09:05:29 +0200 Subject: [PATCH] CLean up onchain group_manager --- waku/waku_rln_relay/group_manager/on_chain/group_manager.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim b/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim index 9433a9687..5a335ca31 100644 --- a/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim +++ b/waku/waku_rln_relay/group_manager/on_chain/group_manager.nim @@ -100,7 +100,7 @@ proc sendEthCallWithChainId*( toAddress: Address, chainId: UInt256, ): Future[Result[UInt256, string]] {.async.} = - ## Generic proc to make contract calls with no arguments and with explicit chainId (workaround for automatic chainId=null with web3 call()) + ## Generic proc to make contract calls with no arguments and with explicit chainId (workaround for automatic chainId=null with web3 call() proc) ## ## Args: ## ethRpc: Web3 instance for making RPC calls @@ -301,7 +301,7 @@ method register*( g.retryWrapper(gasPrice, "Failed to get gas price"): int(await ethRpc.provider.eth_gasPrice()) * 2 let idCommitmentHex = identityCredential.idCommitment.inHex() - debug "identityCredential idCommitmentHex", idCommitmentNoConvert = idCommitmentHex + debug "identityCredential idCommitmentHex", idCommitment = idCommitmentHex let idCommitment = identityCredential.idCommitment.toUInt256() let idCommitmentsToErase: seq[UInt256] = @[] debug "registering the member", @@ -641,6 +641,7 @@ method init*(g: OnchainGroupManager): Future[GroupManagerResult[void]] {.async.} try: # let membershipExists = # await wakuRlnContract.isInMembershipSet(idCommitment).call() + # The above code is not working with the latest web3 version due to chainId being null (specifically on linea-sepolia), below is the workaround # Function signature with parameter type let functionSignature = "isInMembershipSet(uint256)"