UNPKG

521 BJavaScriptView Raw
1// Copyright 2017-2022 @polkadot/types authors & contributors
2// SPDX-License-Identifier: Apache-2.0
3import { Struct } from '@polkadot/types-codec';
4/**
5 * @name GenericExtrinsicPayloadUnknown
6 * @description
7 * A default handler for payloads where the version is not known (default throw)
8 */
9
10export class GenericExtrinsicPayloadUnknown extends Struct {
11 constructor(registry, value, {
12 version = 0
13 } = {}) {
14 super(registry, {});
15 throw new Error(`Unsupported extrinsic payload version ${version}`);
16 }
17
18}
\No newline at end of file