diff --git a/ethers.nimble b/ethers.nimble index f9b1c5c..2217dfb 100644 --- a/ethers.nimble +++ b/ethers.nimble @@ -4,6 +4,7 @@ description = "library for interacting with Ethereum" license = "MIT" requires "nim >= 1.6.0" +requires "chronicles >= 0.10.3 & < 0.10.4" requires "chronos >= 3.0.0 & < 4.0.0" requires "contractabi >= 0.6.0 & < 0.7.0" requires "questionable >= 0.10.2 & < 0.11.0" diff --git a/ethers/contract.nim b/ethers/contract.nim index 2a7fca1..bdec859 100644 --- a/ethers/contract.nim +++ b/ethers/contract.nim @@ -1,6 +1,7 @@ import std/json import std/macros import std/sequtils +import pkg/chronicles import pkg/chronos import pkg/contractabi import ./basics diff --git a/ethers/providers/jsonrpc.nim b/ethers/providers/jsonrpc.nim index ab72bae..5e56f0b 100644 --- a/ethers/providers/jsonrpc.nim +++ b/ethers/providers/jsonrpc.nim @@ -1,6 +1,8 @@ import std/json import std/tables import std/uri +import pkg/chronicles +import pkg/eth/common/eth_types_json_serialization import pkg/json_rpc/rpcclient import pkg/json_rpc/errors import ../basics @@ -43,12 +45,14 @@ template convertError(nonce = none UInt256, body) = try: body except JsonRpcError as error: - trace "jsonrpc error", nonce, error = error.msg + echo "nonce for error below: ", nonce + trace "jsonrpc error", error = error.msg raiseProviderError(error.msg, nonce) # Catch all ValueErrors for now, at least until JsonRpcError is actually # raised. PR created: https://github.com/status-im/nim-json-rpc/pull/151 except ValueError as error: - trace "jsonrpc error (from rpc client)", nonce, error = error.msg + echo "nonce for error below: ", nonce + trace "jsonrpc error (from rpc client)", error = error.msg raiseProviderError(error.msg, nonce) template convertError(body) =