mirror of https://github.com/waku-org/nwaku.git
Fix chrash in group_manager on_chain
This commit is contained in:
parent
0a91ab6eb5
commit
d35f15738f
|
@ -23,7 +23,7 @@ proc deployContract*(
|
|||
var tr: TransactionArgs
|
||||
tr.`from` = Opt.some(web3.defaultAccount)
|
||||
let sData = code & contractInput
|
||||
tr.data = Opt.some(sData.toBytes())
|
||||
tr.data = Opt.some(hexToSeqByte(sData))
|
||||
tr.gas = Opt.some(Quantity(3000000000000))
|
||||
if gasPrice != 0:
|
||||
tr.gasPrice = Opt.some(gasPrice.Quantity)
|
||||
|
|
|
@ -191,7 +191,7 @@ method register*(
|
|||
g.registrationTxHash = some(txHash)
|
||||
# the receipt topic holds the hash of signature of the raised events
|
||||
# TODO: make this robust. search within the event list for the event
|
||||
# debug "ts receipt", tsReceipt
|
||||
debug "ts receipt", receipt = tsReceipt[]
|
||||
let firstTopic = tsReceipt.logs[0].topics[0]
|
||||
# the hash of the signature of MemberRegistered(uint256,uint32) event is equal to the following hex value
|
||||
if firstTopic !=
|
||||
|
@ -299,10 +299,9 @@ proc getRawEvents(
|
|||
toBlock = Opt.some(toBlock.blockId()),
|
||||
)
|
||||
|
||||
var events: JsonNode
|
||||
if events.len == 0:
|
||||
for eventStr in eventStrs:
|
||||
events.add(parseJson($eventStr))
|
||||
var events = newJArray()
|
||||
for eventStr in eventStrs:
|
||||
events.add(parseJson($eventStr))
|
||||
return events
|
||||
|
||||
proc getBlockTable(
|
||||
|
|
Loading…
Reference in New Issue