This class is a wrapper for the VeChainProvider that Hardhat uses.

It exposes the interface that Hardhat expects, and uses the VeChainProvider as wrapped provider.

Hierarchy (view full)

Constructors

Properties

buildHardhatErrorFunctionCallback: BuildHardhatErrorFunction

The function to use to build Hardhat errors.

debug: boolean

Debug mode.

enableDelegation: boolean = false

Enable fee delegation or not.

rpcConfiguration: {
    ethGetTransactionCountMustReturn0: boolean;
}

RPC configuration.

subscriptionManager: SubscriptionManager = ...
thorClient: ThorClient

ThorClient instance.

ProviderInternalWallet instance. It is optional because the majority of the methods do not require a wallet.

Methods

  • Overload of the sendAsync method. It is the same of the send method, but with a callback. Instead of returning the result, it calls the callback with the result.

    Parameters

    • payload: JsonRpcRequest

      The request payload (it contains method and params as 'send' method).

    • callback: ((error: unknown, response: JsonRpcResponse) => void)

      The callback to call with the result.

        • (error, response): void
        • Parameters

          Returns void

    Returns Promise<void>

  • Initializes and starts the polling mechanism for subscription events. This method sets up an event poll that periodically checks for new events related to active subscriptions, such as 'newHeads' or log subscriptions. When new data is available, it emits these events to listeners.

    This method leverages the Poll.createEventPoll utility to create the polling mechanism, which is then started by invoking startListen on the poll instance.

    Returns boolean