Class ContractInstantiateDispatchError<ContractApi>

Represents an error that occurred during the dispatch phase of contract instantiation. This class extends ContractInstantiateError and includes a DispatchError property.

Type Parameters

Hierarchy (view full)

Constructors

  • Constructs a new ContractInstantiateDispatchError instance.

    Type Parameters

    Parameters

    • err:
          | {
              type: "CannotLookup";
          }
          | {
              type: "Other";
          }
          | {
              type: "BadOrigin";
          }
          | {
              type: "Module";
              value: {
                  error: `0x${string}`;
                  index: number;
              };
          }
          | {
              type: "ConsumerRemaining";
          }
          | {
              type: "NoProviders";
          }
          | {
              type: "TooManyConsumers";
          }
          | {
              type: "Token";
              value:
                  | "FundsUnavailable"
                  | "OnlyProvider"
                  | "BelowMinimum"
                  | "CannotCreate"
                  | "UnknownAsset"
                  | "Frozen"
                  | "Unsupported"
                  | "CannotCreateHold"
                  | "NotExpendable"
                  | "Blocked";
          }
          | {
              type: "Arithmetic";
              value: "Underflow" | "Overflow" | "DivisionByZero";
          }
          | {
              type: "Transactional";
              value: "LimitReached" | "NoLayer";
          }
          | {
              type: "Exhausted";
          }
          | {
              type: "Corruption";
          }
          | {
              type: "Unavailable";
          }
          | {
              type: "RootNotAllowed";
          }

      The DispatchError that occurred during the dispatch phase.

    • raw: ContractInstantiateResult<ContractApi["types"]["ChainApi"]>

      The raw result of the contract instantiation.

    Returns ContractInstantiateDispatchError<ContractApi>

Properties

cause?: unknown
dispatchError:
    | {
        type: "CannotLookup";
    }
    | {
        type: "Other";
    }
    | {
        type: "BadOrigin";
    }
    | {
        type: "Module";
        value: {
            error: `0x${string}`;
            index: number;
        };
    }
    | {
        type: "ConsumerRemaining";
    }
    | {
        type: "NoProviders";
    }
    | {
        type: "TooManyConsumers";
    }
    | {
        type: "Token";
        value:
            | "FundsUnavailable"
            | "OnlyProvider"
            | "BelowMinimum"
            | "CannotCreate"
            | "UnknownAsset"
            | "Frozen"
            | "Unsupported"
            | "CannotCreateHold"
            | "NotExpendable"
            | "Blocked";
    }
    | {
        type: "Arithmetic";
        value: "Underflow" | "Overflow" | "DivisionByZero";
    }
    | {
        type: "Transactional";
        value: "LimitReached" | "NoLayer";
    }
    | {
        type: "Exhausted";
    }
    | {
        type: "Corruption";
    }
    | {
        type: "Unavailable";
    }
    | {
        type: "RootNotAllowed";
    }

The error that occurred during the dispatch phase.

message: string
name: string = 'ContractInstantiateDispatchError'
raw: Awaited<ReturnType<ContractApi["types"]["ChainApi"]["call"]["contractsApi"]["instantiate"]>>

The raw result of the contract instantiation.

stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void