Skip to content

Commit

Permalink
move eth_callsigs from test_rpc to rpcclient/eth_api
Browse files Browse the repository at this point in the history
  • Loading branch information
jangko committed Mar 22, 2022
1 parent ad51bd6 commit 32915fd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
15 changes: 15 additions & 0 deletions tests/rpcclient/eth_api.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import
strutils,
json_serialization/std/[sets, net], serialization/errors,
json_rpc/[client, jsonmarshal],
web3/conversions,
eth/common,
../../nimbus/rpc/[rpc_types, hexstrings]

export
rpc_types, conversions, hexstrings

from os import DirSep, AltSep
template sourceDir: string = currentSourcePath.rsplit({DirSep, AltSep}, 1)[0]

createRpcSigs(RpcClient, sourceDir & "/ethcallsigs.nim")
18 changes: 3 additions & 15 deletions tests/test_rpc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,16 @@ import
asynctest, json, strformat, strutils, options, tables, os,
nimcrypto, stew/byteutils, times,
json_rpc/[rpcserver, rpcclient], eth/common as eth_common,
eth/[rlp, keys, trie/db, p2p/private/p2p_types], web3/conversions,
../nimbus/rpc/[common, p2p, hexstrings, rpc_types, rpc_utils],
eth/[rlp, keys, trie/db, p2p/private/p2p_types],
../nimbus/rpc/[common, p2p, rpc_utils],
../nimbus/[constants, config, genesis, utils, transaction,
vm_state, vm_types],
../nimbus/db/[accounts_cache, db_chain],
../nimbus/sync/protocol_ethxx,
../nimbus/p2p/[chain, executor, executor/executor_helpers],
../nimbus/utils/[difficulty, tx_pool],
../nimbus/[context, chain_config],
./test_helpers, ./macro_assembler

# Perform checks for hex string validation
#doHexStrTests()

from os import getCurrentDir, DirSep
from strutils import rsplit
template sourceDir: string = currentSourcePath.rsplit(DirSep, 1)[0]

## Generate client convenience marshalling wrappers from forward declarations
## For testing, ethcallsigs needs to be kept in sync with ../nimbus/rpc/[common, p2p]
const sigPath = &"{sourceDir}{DirSep}rpcclient{DirSep}ethcallsigs.nim"
createRpcSigs(RpcSocketClient, sigPath)
./test_helpers, ./macro_assembler, ./rpcclient/eth_api

const
zeroAddress = block:
Expand Down

0 comments on commit 32915fd

Please sign in to comment.