mirror of
https://github.com/codex-storage/nim-json-rpc.git
synced 2025-02-24 08:58:18 +00:00
Move ethcallsigs to tests to confirm stand alone rpc setup
This commit is contained in:
parent
a963fed33f
commit
0031068774
@ -1,4 +1,7 @@
|
|||||||
import ../ rpcclient, ../ rpcserver, unittest, asyncdispatch, json, tables
|
import ../ rpcclient, ../ rpcserver
|
||||||
|
import unittest, asyncdispatch, json, tables
|
||||||
|
from os import getCurrentDir, DirSep
|
||||||
|
from strutils import rsplit
|
||||||
|
|
||||||
# TODO: dummy implementations of RPC calls handled in async fashion.
|
# TODO: dummy implementations of RPC calls handled in async fashion.
|
||||||
# TODO: check required json parameters like version are being raised
|
# TODO: check required json parameters like version are being raised
|
||||||
@ -6,6 +9,11 @@ var srv = sharedRpcServer()
|
|||||||
srv.address = "localhost"
|
srv.address = "localhost"
|
||||||
srv.port = Port(8545)
|
srv.port = Port(8545)
|
||||||
|
|
||||||
|
import stint
|
||||||
|
|
||||||
|
# generate all client ethereum rpc calls
|
||||||
|
createRpcSigs(currentSourcePath.rsplit(DirSep, 1)[0] & DirSep & "ethcallsigs.nim")
|
||||||
|
|
||||||
srv.rpc("myProc") do(input: string, data: array[0..3, int]):
|
srv.rpc("myProc") do(input: string, data: array[0..3, int]):
|
||||||
result = %("Hello " & input & " data: " & $data)
|
result = %("Hello " & input & " data: " & $data)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user