1 | import { Struct } from '@polkadot/types-codec';
|
2 | import { UNMASK_VERSION } from './constants.js';
|
3 | /**
|
4 | * @name GenericExtrinsicUnknown
|
5 | * @description
|
6 | * A default handler for extrinsics where the version is not known (default throw)
|
7 | */
|
8 | export class GenericExtrinsicUnknown extends Struct {
|
9 | constructor(registry, _value, { isSigned = false, version = 0 } = {}) {
|
10 | super(registry, {});
|
11 | throw new Error(`Unsupported ${isSigned ? '' : 'un'}signed extrinsic version ${version & UNMASK_VERSION}`);
|
12 | }
|
13 | }
|