From dc886f998176395c0b2a9ce8811d80bf3cf5c23c Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 25 Aug 2023 22:57:20 +0200 Subject: [PATCH] fix --- tests/test.nim | 5 ++--- web3/ethtypes.nim | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test.nim b/tests/test.nim index 77cf5d3..c38b22b 100644 --- a/tests/test.nim +++ b/tests/test.nim @@ -1,6 +1,6 @@ import pkg/unittest2 import ../web3 -import chronos, options, json, stint, parseutils +import chronos, options, json, stint import test_utils @@ -138,8 +138,7 @@ suite "Contracts": receipt = await web3.deployContract(MetaCoinCode) cc = receipt.contractAddress.get - var deployedAtBlock: uint64 - discard parseHex(receipt.blockNumber, deployedAtBlock) + let deployedAtBlock = distinctBase(receipt.blockNumber) echo "Deployed MetaCoin contract: ", cc, " at block ", deployedAtBlock let ns = web3.contractSender(MetaCoin, cc) diff --git a/web3/ethtypes.nim b/web3/ethtypes.nim index d4619a7..63b1693 100644 --- a/web3/ethtypes.nim +++ b/web3/ethtypes.nim @@ -3,7 +3,7 @@ import stint, stew/[byteutils, results] export - hashes, options + hashes, options, typetraits const web3_consensus_const_preset* {.strdefine.} = "mainnet" @@ -219,7 +219,7 @@ type topics*: Option[seq[string]]#Option[seq[FilterData]] # (optional) list of DATA topics. Topics are order-dependent. Each topic can also be a list of DATA with "or" options. blockhash*: Option[BlockHash] - LogObject* = object + LogObject* = object removed*: bool # true when the log was removed, due to a chain reorganization. false if its a valid log. logIndex*: Quantity # integer of the log index position in the block. null when its pending log. transactionIndex*: Quantity # integer of the transactions index position log was created from. null when its pending log.