From 4097cfaf95c2f3d7d13fe41889d01f215334296f Mon Sep 17 00:00:00 2001 From: jangko Date: Wed, 15 Jul 2020 15:41:22 +0700 Subject: [PATCH] fix tests --- tests/test.nim | 2 +- tests/test_deposit_contract.nim | 2 +- tests/test_logs.nim | 2 +- tests/test_signed_tx.nim | 2 +- web3.nim | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test.nim b/tests/test.nim index cc17f34..7924d14 100644 --- a/tests/test.nim +++ b/tests/test.nim @@ -59,7 +59,7 @@ const MetaCoinCode = "608060405234801561001057600080fd5b503260009081526020819052 proc test() {.async.} = - let web3 = await newWeb3("ws://127.0.0.1:8545") + let web3 = await newWeb3("ws://127.0.0.1:8545/") let accounts = await web3.provider.eth_accounts() echo "accounts: ", accounts web3.defaultAccount = accounts[0] diff --git a/tests/test_deposit_contract.nim b/tests/test_deposit_contract.nim index a71c1df..5eb328b 100644 --- a/tests/test_deposit_contract.nim +++ b/tests/test_deposit_contract.nim @@ -12,7 +12,7 @@ const contractCode = "0x740100000000000000000000000000000000000000006020526f7fff var contractAddress = Address.fromHex("e9d8d67ec115e8345606b3ab59fc71cec46761e4") proc test() {.async.} = - let web3 = await newWeb3("ws://localhost:8545") + let web3 = await newWeb3("ws://localhost:8545/") let accounts = await web3.provider.eth_accounts() web3.defaultAccount = accounts[0] diff --git a/tests/test_logs.nim b/tests/test_logs.nim index 36b42d2..72c2230 100644 --- a/tests/test_logs.nim +++ b/tests/test_logs.nim @@ -28,7 +28,7 @@ const LoggerContractCode = "6080604052348015600f57600080fd5b5060bc8061001e600039 var contractAddress = Address.fromHex("0xEA255DeA28c84F698Fa195f87fC83D1d4125ef9C") proc test() {.async.} = - let web3 = await newWeb3("ws://localhost:8545") + let web3 = await newWeb3("ws://localhost:8545/") let accounts = await web3.provider.eth_accounts() echo "accounts: ", accounts web3.defaultAccount = accounts[0] diff --git a/tests/test_signed_tx.nim b/tests/test_signed_tx.nim index 4555f94..0ad6be6 100644 --- a/tests/test_signed_tx.nim +++ b/tests/test_signed_tx.nim @@ -25,7 +25,7 @@ contract(NumberStorage): const NumberStorageCode = "6060604052341561000f57600080fd5b60bb8061001d6000396000f30060606040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fb5c1cb8114604d578063f2c9ecd8146062575b600080fd5b3415605757600080fd5b60606004356084565b005b3415606c57600080fd5b60726089565b60405190815260200160405180910390f35b600055565b600054905600a165627a7a7230582023e722f35009f12d5698a4ab22fb9d55a6c0f479fc43875c65be46fbdd8db4310029" proc test() {.async.} = - let web3 = await newWeb3("ws://127.0.0.1:8545") + let web3 = await newWeb3("ws://127.0.0.1:8545/") let accounts = await web3.provider.eth_accounts() web3.defaultAccount = accounts[0] diff --git a/web3.nim b/web3.nim index 4365233..b4126ec 100644 --- a/web3.nim +++ b/web3.nim @@ -44,7 +44,7 @@ type historicalEventsProcessed: bool removed: bool - ContractCallBase {.pure, inheritable.} = object + ContractCallBase = object of RootObj web3: Web3 data: string to: Address