mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 08:53:06 +00:00
CLean up onchain group_manager
This commit is contained in:
parent
48668aa36e
commit
ef20fd1d1a
@ -100,7 +100,7 @@ proc sendEthCallWithChainId*(
|
|||||||
toAddress: Address,
|
toAddress: Address,
|
||||||
chainId: UInt256,
|
chainId: UInt256,
|
||||||
): Future[Result[UInt256, string]] {.async.} =
|
): 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:
|
## Args:
|
||||||
## ethRpc: Web3 instance for making RPC calls
|
## ethRpc: Web3 instance for making RPC calls
|
||||||
@ -301,7 +301,7 @@ method register*(
|
|||||||
g.retryWrapper(gasPrice, "Failed to get gas price"):
|
g.retryWrapper(gasPrice, "Failed to get gas price"):
|
||||||
int(await ethRpc.provider.eth_gasPrice()) * 2
|
int(await ethRpc.provider.eth_gasPrice()) * 2
|
||||||
let idCommitmentHex = identityCredential.idCommitment.inHex()
|
let idCommitmentHex = identityCredential.idCommitment.inHex()
|
||||||
debug "identityCredential idCommitmentHex", idCommitmentNoConvert = idCommitmentHex
|
debug "identityCredential idCommitmentHex", idCommitment = idCommitmentHex
|
||||||
let idCommitment = identityCredential.idCommitment.toUInt256()
|
let idCommitment = identityCredential.idCommitment.toUInt256()
|
||||||
let idCommitmentsToErase: seq[UInt256] = @[]
|
let idCommitmentsToErase: seq[UInt256] = @[]
|
||||||
debug "registering the member",
|
debug "registering the member",
|
||||||
@ -641,6 +641,7 @@ method init*(g: OnchainGroupManager): Future[GroupManagerResult[void]] {.async.}
|
|||||||
try:
|
try:
|
||||||
# let membershipExists =
|
# let membershipExists =
|
||||||
# await wakuRlnContract.isInMembershipSet(idCommitment).call()
|
# 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
|
# Function signature with parameter type
|
||||||
let functionSignature = "isInMembershipSet(uint256)"
|
let functionSignature = "isInMembershipSet(uint256)"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user