diff --git a/eth-rpc/client/clientdispatch.nim b/eth-rpc/client/clientdispatch.nim index a9e8825..1c16f9b 100644 --- a/eth-rpc/client/clientdispatch.nim +++ b/eth-rpc/client/clientdispatch.nim @@ -1,5 +1,5 @@ import asyncnet, asyncdispatch, tables, json, oids, macros -import ../ ethtypes, stint, ../ jsonconverters +import ../jsonconverters type RpcClient* = ref object @@ -186,3 +186,4 @@ macro createRpcSigs*(filePath: static[string]): untyped = ## Inputs are marshalled to json, and results are put into the signature's ## Nim type. result = processRpcSigs(staticRead($filePath).parseStmt()) + echo "**", result.repr diff --git a/rpcclient.nim b/rpcclient.nim index db6a851..4c36611 100644 --- a/rpcclient.nim +++ b/rpcclient.nim @@ -1,3 +1,3 @@ -import eth-rpc / client / clientdispatch, eth-rpc / ethtypes -export clientdispatch, ethtypes +import eth-rpc / client / clientdispatch +export clientdispatch diff --git a/rpcserver.nim b/rpcserver.nim index 446c5c3..ffebe29 100644 --- a/rpcserver.nim +++ b/rpcserver.nim @@ -1,4 +1,3 @@ import - r"eth-rpc/server" / [servertypes, rpcconsts, serverdispatch, ethprocs], - eth-rpc / ethtypes -export servertypes, rpcconsts, serverdispatch, ethprocs, ethtypes + r"eth-rpc/server" / [servertypes, rpcconsts, serverdispatch] +export servertypes, rpcconsts, serverdispatch diff --git a/tests/ethcallsigs.nim b/tests/ethcallsigs.nim index d10ef72..f72d507 100644 --- a/tests/ethcallsigs.nim +++ b/tests/ethcallsigs.nim @@ -1,7 +1,7 @@ ## This module contains signatures for the Ethereum client RPCs. ## The signatures are not imported directly, but read and processed with parseStmt, ## then a procedure body is generated to marshal native Nim parameters to json and visa versa. -import json, stint, eth-rpc / ethtypes +import json, stint, ethtypes proc web3_clientVersion(): string proc web3_sha3(data: string): string diff --git a/eth-rpc/server/ethprocs.nim b/tests/ethprocs.nim similarity index 99% rename from eth-rpc/server/ethprocs.nim rename to tests/ethprocs.nim index 9c2129e..f8a561c 100644 --- a/eth-rpc/server/ethprocs.nim +++ b/tests/ethprocs.nim @@ -1,4 +1,4 @@ -import servertypes, nimcrypto, json, stint, ../ethtypes.nim, strutils +import ../rpcserver, nimcrypto, json, stint, strutils, ethtypes #[ For details on available RPC calls, see: https://github.com/ethereum/wiki/wiki/JSON-RPC diff --git a/eth-rpc/ethtypes.nim b/tests/ethtypes.nim similarity index 100% rename from eth-rpc/ethtypes.nim rename to tests/ethtypes.nim diff --git a/tests/testserverclient.nim b/tests/testserverclient.nim index 83d302d..a085c6f 100644 --- a/tests/testserverclient.nim +++ b/tests/testserverclient.nim @@ -9,7 +9,7 @@ var srv = sharedRpcServer() srv.address = "localhost" srv.port = Port(8545) -import stint +import stint, ethtypes, ethprocs # generate all client ethereum rpc calls createRpcSigs(currentSourcePath.rsplit(DirSep, 1)[0] & DirSep & "ethcallsigs.nim")