Use ExtrinsicV4 by default (#6164)
This commit is contained in:
@@ -330,9 +330,11 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
|
||||
|
||||
constructor (registry: Registry, value?: GenericExtrinsic | ExtrinsicValue | AnyU8a | Call, { preamble, version }: CreateOptions = {}) {
|
||||
const versionsLength = registry.metadata.extrinsic.versions.length;
|
||||
const highestSupportedVersion = versionsLength ? registry.metadata.extrinsic.versions[versionsLength - 1] : undefined;
|
||||
|
||||
super(registry, decodeExtrinsic(registry, value, version || highestSupportedVersion, preamble), undefined, preamble);
|
||||
// TODO: Once ExtrinsicV5 is fully supported update this to use the highest supported verion which is the last item of the array
|
||||
const supportedVersion = versionsLength ? registry.metadata.extrinsic.versions[0] : undefined;
|
||||
|
||||
super(registry, decodeExtrinsic(registry, value, version || supportedVersion, preamble), undefined, preamble);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,8 @@ export const UNMASK_VERSION = 0b01111111;
|
||||
export const DEFAULT_PREAMBLE = 'bare';
|
||||
|
||||
// Latest extrinsic version is v5, which has backwards compatibility for v4 signed extrinsics
|
||||
export const LATEST_EXTRINSIC_VERSION = 5;
|
||||
// However is not fully supported so LATEST_EXTRINSIC_VERSION is configured as 4 in the meantime.
|
||||
export const LATEST_EXTRINSIC_VERSION = 4;
|
||||
|
||||
export const VERSION_MASK = 0b00111111;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user