Polkadot master specVersion bump (#932)
* Polkadot master specVersion bump * EventRecord_0_76
This commit is contained in:
@@ -4,9 +4,12 @@
|
||||
|
||||
import { Constructor } from '@polkadot/types/types';
|
||||
|
||||
import { EventRecord77, RuntimeVersion, getTypeRegistry } from '@polkadot/types';
|
||||
import { EventRecord_0_76, RuntimeVersion, getTypeRegistry } from '@polkadot/types';
|
||||
|
||||
type Compat = {
|
||||
// an array of the spec-name and spec_version that denotes the first version that
|
||||
// does not support this feature. i.e. for EventRecord between 0-76, the new version
|
||||
// went live at 77 - hence the version here denotes 77
|
||||
nodeSpecs: Array<[string, number]>,
|
||||
types: {
|
||||
[index: string]: Constructor
|
||||
@@ -19,12 +22,12 @@ const types: Array<Compat> = [
|
||||
{
|
||||
nodeSpecs: [
|
||||
['node', 77],
|
||||
['polkadot', 1000],
|
||||
['node-template', ANY_VERSION],
|
||||
['polkadot', ANY_VERSION],
|
||||
['edgeware', ANY_VERSION]
|
||||
],
|
||||
types: {
|
||||
'EventRecord': EventRecord77
|
||||
'EventRecord': EventRecord_0_76
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -75,12 +75,13 @@ export class Phase extends Enum {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name EventRecord77
|
||||
* @name EventRecord_0_76
|
||||
* @description
|
||||
* A record for an [[Event]] (as specified by [[Metadata]]) with the specific [[Phase]] of
|
||||
* application.
|
||||
*/
|
||||
export class EventRecord77 extends Struct {
|
||||
// tslint:disable-next-line
|
||||
export class EventRecord_0_76 extends Struct {
|
||||
constructor (value: any) {
|
||||
super({
|
||||
phase: Phase,
|
||||
@@ -125,7 +126,7 @@ export default class EventRecord extends Struct {
|
||||
}, value);
|
||||
}
|
||||
|
||||
static Fallback = EventRecord77;
|
||||
static Fallback = EventRecord_0_76;
|
||||
|
||||
/**
|
||||
* @description The [[Event]] this record refers to
|
||||
|
||||
@@ -15,7 +15,7 @@ export { default as AccountIndex } from './AccountIndex';
|
||||
export { default as AccountInfo } from './AccountInfo';
|
||||
export { default as Address } from './Address';
|
||||
export { default as Event, EventIndex } from './Event';
|
||||
export { default as EventRecord, EventRecord77 } from './EventRecord';
|
||||
export { default as EventRecord, EventRecord_0_76 } from './EventRecord';
|
||||
export { default as Bool, default as bool } from './Bool';
|
||||
export { default as Bytes } from './Bytes';
|
||||
export { default as Data } from './Data';
|
||||
|
||||
Reference in New Issue
Block a user