mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-08 16:43:10 +00:00
13 lines
325 B
Nim
13 lines
325 B
Nim
|
|
import ../src/rpcclient, asyncdispatch, json
|
||
|
|
|
||
|
|
when isMainModule:
|
||
|
|
proc main {.async.} =
|
||
|
|
var client = newRpcClient()
|
||
|
|
await client.connect("localhost", Port(8545))
|
||
|
|
var
|
||
|
|
response: Response
|
||
|
|
|
||
|
|
for i in 0..1000:
|
||
|
|
response = waitFor client.web3_clientVersion(newJNull())
|
||
|
|
waitFor main()
|
||
|
|
echo "Finished."
|