Class ContractInterceptor<TContract>

Allows overriding transaction behavior for this contract

Type Parameters

  • TContract extends BaseContract

Hierarchy

  • ContractInterceptor

Constructors

Properties

contractWrapper: ContractWrapper<TContract>

Methods

  • The next transaction executed will add/replace any overrides passed via the passed in hook.

    Parameters

    • hook: (() => CallOverrides)

      the hook to add or replace any CallOverrides (gas limit, gas price, nonce, from, value, etc...)

        • (): CallOverrides
        • Returns CallOverrides

    Returns void

    Remarks

    Overridden values will be applied to the next transaction executed.

    Example

    contract.interceptor.overrideNextTransaction(() => ({
    gasLimit: 3000000,
    }));

Generated using TypeDoc