1 | // Copyright 2017-2022 @polkadot/types authors & contributors
|
2 | // SPDX-License-Identifier: Apache-2.0
|
3 | import { Struct } from '@polkadot/types-codec';
|
4 | import { UNMASK_VERSION } from "./constants.js";
|
5 | /**
|
6 | * @name GenericExtrinsicUnknown
|
7 | * @description
|
8 | * A default handler for extrinsics where the version is not known (default throw)
|
9 | */
|
10 |
|
11 | export class GenericExtrinsicUnknown extends Struct {
|
12 | constructor(registry, value, {
|
13 | isSigned = false,
|
14 | version = 0
|
15 | } = {}) {
|
16 | super(registry, {});
|
17 | throw new Error(`Unsupported ${isSigned ? '' : 'un'}signed extrinsic version ${version & UNMASK_VERSION}`);
|
18 | }
|
19 |
|
20 | } |
\ | No newline at end of file |