These functions interact with the consensus network itself.
Returns a Promise for the current consensus network time, represented as a BigNumber.
Returns a Promise that will only be resolved after the specified consensus network time. In isolated testing modes, this will also force time to pass on the network, usually by sending trivial transactions. An isolated testing mode is a REACH_CONNECTOR_MODE that matches $NET-devnet for all valid $NET, or when REACH_ISOLATED_NETWORK is set.
You may provide an optional
onProgress callback, used for reporting progress,
which may be called many times up until the specified network time.
It will receive an object with keys
Returns a Promise that will only be resolved after the specified time delta has elapsed.
await wait(delta, onProgress) is the same as
await waitUntilTime(add(await getNetworkTime(), delta), onProgress).
onProgress callback is optional.
connector : Connector
Sets the lower bound on querying the network for events.
The argument to this function is a network time.
By default, Reach will query for events from time 0.
This default is usually fine, but on certain networks like Conflux,
it can be very slow.
You can use this function to tell Reach to only query from a given network time onwards,
which can speed up event log querying significantly on Conflux.
If you use the reach stdlib to
attach to a contract,
the specified lower bound must be no later than the time at which the contract was deployed.
Sets the maximum width of the query windows used to query the network for event logs.
true indicates that no window size should be used, and queries may span arbitrarily large window sizes.
While each connector has a default value that works for most common cases, tweaking this setting may be useful when dealing with layer two networks or custom endpoints that are more restrictive than normal nodes on the network.