diff --git a/ethers/contract.nim b/ethers/contract.nim index db6e68e..8857522 100644 --- a/ethers/contract.nim +++ b/ethers/contract.nim @@ -1,4 +1,4 @@ -import std/json +import pkg/serde import std/macros import std/sequtils import pkg/chronicles diff --git a/ethers/nimshims/hashes.nim b/ethers/nimshims/hashes.nim index c691d9e..a75052b 100644 --- a/ethers/nimshims/hashes.nim +++ b/ethers/nimshims/hashes.nim @@ -2,7 +2,7 @@ ## `std/json.JsonNode.hash`, eg when using `JsonNode` as a `Table` key. Adds ## {.raises: [].} for proper exception tracking. Copied from the std/json module -import std/json +import pkg/serde import std/hashes {.push raises:[].} diff --git a/ethers/providers/jsonrpc.nim b/ethers/providers/jsonrpc.nim index b1e653e..a070909 100644 --- a/ethers/providers/jsonrpc.nim +++ b/ethers/providers/jsonrpc.nim @@ -17,6 +17,7 @@ export basics export provider export chronicles export errors.JsonRpcProviderError +export subscriptions {.push raises: [].} diff --git a/ethers/providers/jsonrpc/subscriptions.nim b/ethers/providers/jsonrpc/subscriptions.nim index d9ea1dd..95a7a25 100644 --- a/ethers/providers/jsonrpc/subscriptions.nim +++ b/ethers/providers/jsonrpc/subscriptions.nim @@ -3,6 +3,7 @@ import std/sequtils import std/strutils import pkg/chronos import pkg/json_rpc/rpcclient +import pkg/serde import ../../basics import ../../provider include ../../nimshims/hashes @@ -10,6 +11,8 @@ import ./rpccalls import ./conversions import ./looping +export serde + type JsonRpcSubscriptions* = ref object of RootObj client: RpcClient diff --git a/testmodule/hardhat.nim b/testmodule/hardhat.nim index 55bd79f..ba19a31 100644 --- a/testmodule/hardhat.nim +++ b/testmodule/hardhat.nim @@ -1,4 +1,4 @@ -import std/json +import pkg/serde import pkg/ethers/basics type Deployment* = object diff --git a/testmodule/providers/jsonrpc/testErrors.nim b/testmodule/providers/jsonrpc/testErrors.nim index afa9eda..fe8cbed 100644 --- a/testmodule/providers/jsonrpc/testErrors.nim +++ b/testmodule/providers/jsonrpc/testErrors.nim @@ -1,5 +1,5 @@ import std/unittest -import std/json +import pkg/serde import pkg/questionable import pkg/ethers/providers/jsonrpc/errors diff --git a/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim b/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim index d0e2fff..08061a6 100644 --- a/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim +++ b/testmodule/providers/jsonrpc/testJsonRpcSubscriptions.nim @@ -1,4 +1,4 @@ -import std/json +import pkg/serde import std/os import std/sequtils import std/importutils diff --git a/testmodule/testContracts.nim b/testmodule/testContracts.nim index f7ef78e..0981f1d 100644 --- a/testmodule/testContracts.nim +++ b/testmodule/testContracts.nim @@ -1,4 +1,4 @@ -import std/json +import pkg/serde import std/os import std/options import pkg/asynctest diff --git a/testmodule/testCustomErrors.nim b/testmodule/testCustomErrors.nim index e03ed95..9038c5e 100644 --- a/testmodule/testCustomErrors.nim +++ b/testmodule/testCustomErrors.nim @@ -1,5 +1,5 @@ import std/os -import std/json +import pkg/serde import pkg/asynctest import pkg/ethers import ./hardhat diff --git a/testmodule/testErc20.nim b/testmodule/testErc20.nim index 2eea2f7..1ad1f63 100644 --- a/testmodule/testErc20.nim +++ b/testmodule/testErc20.nim @@ -1,5 +1,5 @@ import std/os -import std/json +import pkg/serde import pkg/asynctest import pkg/questionable import pkg/stint