fix: `items(JsonNode)` symbol not found (#87)

* chore: export subscriptions

This has a knock-on effect of nim-serde not being imported into subscriptions when JsonRpcProvider.new is called from a consumer that does not export nim-serde.

* import/export serde

* Replace all instances of std/json with pkg/serde
This commit is contained in:
Eric 2024-10-28 14:06:20 +11:00 committed by GitHub
parent 765379a662
commit 6523e70eaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 12 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import std/json import pkg/serde
import std/macros import std/macros
import std/sequtils import std/sequtils
import pkg/chronicles import pkg/chronicles

View File

@ -2,7 +2,7 @@
## `std/json.JsonNode.hash`, eg when using `JsonNode` as a `Table` key. Adds ## `std/json.JsonNode.hash`, eg when using `JsonNode` as a `Table` key. Adds
## {.raises: [].} for proper exception tracking. Copied from the std/json module ## {.raises: [].} for proper exception tracking. Copied from the std/json module
import std/json import pkg/serde
import std/hashes import std/hashes
{.push raises:[].} {.push raises:[].}

View File

@ -17,6 +17,7 @@ export basics
export provider export provider
export chronicles export chronicles
export errors.JsonRpcProviderError export errors.JsonRpcProviderError
export subscriptions
{.push raises: [].} {.push raises: [].}

View File

@ -3,6 +3,7 @@ import std/sequtils
import std/strutils import std/strutils
import pkg/chronos import pkg/chronos
import pkg/json_rpc/rpcclient import pkg/json_rpc/rpcclient
import pkg/serde
import ../../basics import ../../basics
import ../../provider import ../../provider
include ../../nimshims/hashes include ../../nimshims/hashes
@ -10,6 +11,8 @@ import ./rpccalls
import ./conversions import ./conversions
import ./looping import ./looping
export serde
type type
JsonRpcSubscriptions* = ref object of RootObj JsonRpcSubscriptions* = ref object of RootObj
client: RpcClient client: RpcClient

View File

@ -1,4 +1,4 @@
import std/json import pkg/serde
import pkg/ethers/basics import pkg/ethers/basics
type Deployment* = object type Deployment* = object

View File

@ -1,5 +1,5 @@
import std/unittest import std/unittest
import std/json import pkg/serde
import pkg/questionable import pkg/questionable
import pkg/ethers/providers/jsonrpc/errors import pkg/ethers/providers/jsonrpc/errors

View File

@ -1,4 +1,4 @@
import std/json import pkg/serde
import std/os import std/os
import std/sequtils import std/sequtils
import std/importutils import std/importutils

View File

@ -1,4 +1,4 @@
import std/json import pkg/serde
import std/os import std/os
import std/options import std/options
import pkg/asynctest import pkg/asynctest

View File

@ -1,5 +1,5 @@
import std/os import std/os
import std/json import pkg/serde
import pkg/asynctest import pkg/asynctest
import pkg/ethers import pkg/ethers
import ./hardhat import ./hardhat

View File

@ -1,5 +1,5 @@
import std/os import std/os
import std/json import pkg/serde
import pkg/asynctest import pkg/asynctest
import pkg/questionable import pkg/questionable
import pkg/stint import pkg/stint