Move ethprocs and ethtypes into tests, remove external imports

This commit is contained in:
coffeepots 2018-05-29 19:21:30 +01:00
parent 42ec728b35
commit 964436c9e3
7 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -1,3 +1,3 @@
import eth-rpc / client / clientdispatch, eth-rpc / ethtypes
export clientdispatch, ethtypes
import eth-rpc / client / clientdispatch
export clientdispatch

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")