mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-05-28 14:19:46 +00:00
pass hardhat port to ethersuite
# Conflicts: # tests/ethertest.nim
This commit is contained in:
parent
f55831a2c8
commit
62e538a596
@ -5,6 +5,8 @@ import pkg/chronos
|
|||||||
import ./asynctest
|
import ./asynctest
|
||||||
import ./checktest
|
import ./checktest
|
||||||
|
|
||||||
|
const HardhatPort {.intdefine.}: int = 8545
|
||||||
|
|
||||||
## Unit testing suite that sets up an Ethereum testing environment.
|
## Unit testing suite that sets up an Ethereum testing environment.
|
||||||
## Injects a `ethProvider` instance, and a list of `accounts`.
|
## Injects a `ethProvider` instance, and a list of `accounts`.
|
||||||
## Calls the `evm_snapshot` and `evm_revert` methods to ensure that any
|
## Calls the `evm_snapshot` and `evm_revert` methods to ensure that any
|
||||||
@ -17,7 +19,7 @@ template ethersuite*(name, body) =
|
|||||||
|
|
||||||
setup:
|
setup:
|
||||||
ethProvider = JsonRpcProvider.new(
|
ethProvider = JsonRpcProvider.new(
|
||||||
"http://127.0.0.1:8545", pollingInterval = chronos.milliseconds(100)
|
"http://127.0.0.1:" & $HardhatPort, pollingInterval = chronos.milliseconds(100)
|
||||||
)
|
)
|
||||||
snapshot = await send(ethProvider, "evm_snapshot")
|
snapshot = await send(ethProvider, "evm_snapshot")
|
||||||
accounts = await ethProvider.listAccounts()
|
accounts = await ethProvider.listAccounts()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user