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
|
var tr: TransactionArgs
|
||||||
tr.`from` = Opt.some(web3.defaultAccount)
|
tr.`from` = Opt.some(web3.defaultAccount)
|
||||||
let sData = code & contractInput
|
let sData = code & contractInput
|
||||||
tr.data = Opt.some(sData.toBytes())
|
tr.data = Opt.some(hexToSeqByte(sData))
|
||||||
tr.gas = Opt.some(Quantity(3000000000000))
|
tr.gas = Opt.some(Quantity(3000000000000))
|
||||||
if gasPrice != 0:
|
if gasPrice != 0:
|
||||||
tr.gasPrice = Opt.some(gasPrice.Quantity)
|
tr.gasPrice = Opt.some(gasPrice.Quantity)
|
||||||
|
|
|
@ -191,7 +191,7 @@ method register*(
|
||||||
g.registrationTxHash = some(txHash)
|
g.registrationTxHash = some(txHash)
|
||||||
# the receipt topic holds the hash of signature of the raised events
|
# the receipt topic holds the hash of signature of the raised events
|
||||||
# TODO: make this robust. search within the event list for the event
|
# 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]
|
let firstTopic = tsReceipt.logs[0].topics[0]
|
||||||
# the hash of the signature of MemberRegistered(uint256,uint32) event is equal to the following hex value
|
# the hash of the signature of MemberRegistered(uint256,uint32) event is equal to the following hex value
|
||||||
if firstTopic !=
|
if firstTopic !=
|
||||||
|
@ -299,10 +299,9 @@ proc getRawEvents(
|
||||||
toBlock = Opt.some(toBlock.blockId()),
|
toBlock = Opt.some(toBlock.blockId()),
|
||||||
)
|
)
|
||||||
|
|
||||||
var events: JsonNode
|
var events = newJArray()
|
||||||
if events.len == 0:
|
for eventStr in eventStrs:
|
||||||
for eventStr in eventStrs:
|
events.add(parseJson($eventStr))
|
||||||
events.add(parseJson($eventStr))
|
|
||||||
return events
|
return events
|
||||||
|
|
||||||
proc getBlockTable(
|
proc getBlockTable(
|
||||||
|
|
Loading…
Reference in New Issue