diff --git a/CHANGELOG.md b/CHANGELOG.md index d831af9b05..d53eb4bf17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.41.1 + +- Support the V1 metadata specification from Substrate in addition to the currently testnet-active V0 version + # 0.40.1 - The API interfaces now require a WS-compatible provider, e.g. subscription support is a must. Previously the HTTPProvider could be use (although it was very limited in the interactions). diff --git a/lerna.json b/lerna.json index c66ea12890..d6ab01033b 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ "packages": [ "packages/*" ], - "version": "0.40.26" + "version": "0.41.0" } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index ab9e557986..b8fa1f7c4b 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api-derive", - "version": "0.40.26", + "version": "0.41.0", "description": "Common functions used across Polkadot, derived from RPC calls and storage queries.", "main": "index.js", "keywords": [ @@ -31,8 +31,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/api": "^0.40.26", - "@polkadot/types": "^0.40.26", + "@polkadot/api": "^0.41.0", + "@polkadot/types": "^0.41.0", "@types/memoizee": "^0.4.2", "@types/rx": "^4.1.1", "memoizee": "^0.4.14", diff --git a/packages/api/package.json b/packages/api/package.json index 2a8447e06c..18e57d52df 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/api", - "version": "0.40.26", + "version": "0.41.0", "description": "An RxJS wrapper around the Polkadot JS RPC", "main": "index.js", "keywords": [ @@ -30,12 +30,12 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/api-derive": "^0.40.26", - "@polkadot/extrinsics": "^0.40.26", - "@polkadot/rpc-provider": "^0.40.26", - "@polkadot/rpc-rx": "^0.40.26", - "@polkadot/storage": "^0.40.26", - "@polkadot/types": "^0.40.26", + "@polkadot/api-derive": "^0.41.0", + "@polkadot/extrinsics": "^0.41.0", + "@polkadot/rpc-provider": "^0.41.0", + "@polkadot/rpc-rx": "^0.41.0", + "@polkadot/storage": "^0.41.0", + "@polkadot/types": "^0.41.0", "@types/rx": "^4.1.1", "rxjs": "^6.3.3" } diff --git a/packages/api/src/Base.ts b/packages/api/src/Base.ts index 879b282162..26fc7dceb1 100644 --- a/packages/api/src/Base.ts +++ b/packages/api/src/Base.ts @@ -300,8 +300,8 @@ export default abstract class ApiBase implements ApiBaseInterface implements ApiBaseInterface { it('subscribes to queries (default)', (done) => { api.query.staking.validatorPreferences(keyring.ferdie.address(), (prefs) => { - expect(prefs.unstakeThreshold.toNumber()).toBe(12); + expect(prefs.unstakeThreshold.toNumber()).toBe(3); done(); }); diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index a0d1db8691..a2c6b4e390 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-core", - "version": "0.40.26", + "version": "0.41.0", "description": "A JavaScript wrapper for the Polkadot JsonRPC interface", "main": "index.js", "keywords": [ @@ -30,9 +30,9 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/jsonrpc": "^0.40.26", - "@polkadot/rpc-provider": "^0.40.26", - "@polkadot/types": "^0.40.26", + "@polkadot/jsonrpc": "^0.41.0", + "@polkadot/rpc-provider": "^0.41.0", + "@polkadot/types": "^0.41.0", "@polkadot/util": "^0.33.36" } } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 555ff79282..49672ceea6 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-provider", - "version": "0.40.26", + "version": "0.41.0", "description": "Transport providers for the API", "main": "index.js", "keywords": [ @@ -31,7 +31,7 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/keyring": "^0.33.36", - "@polkadot/storage": "^0.40.26", + "@polkadot/storage": "^0.41.0", "@polkadot/util": "^0.33.36", "@polkadot/util-crypto": "^0.33.36", "@types/nock": "^9.3.0", diff --git a/packages/rpc-provider/src/mock/index.ts b/packages/rpc-provider/src/mock/index.ts index 1d7b4de70a..95ea769846 100644 --- a/packages/rpc-provider/src/mock/index.ts +++ b/packages/rpc-provider/src/mock/index.ts @@ -11,7 +11,7 @@ import interfaces from '@polkadot/jsonrpc/index'; import testKeyring from '@polkadot/keyring/testing'; import storage from '@polkadot/storage/static'; import { Codec } from '@polkadot/types/types'; -import metadata from '@polkadot/types/Metadata/static'; +import metadata from '@polkadot/types/Metadata/v0/static'; import { Header } from '@polkadot/types/index'; import { bnToU8a, logger, u8aToHex } from '@polkadot/util'; import { randomAsU8a } from '@polkadot/util-crypto'; diff --git a/packages/rpc-rx/package.json b/packages/rpc-rx/package.json index dab2e908e3..7dce7b2284 100644 --- a/packages/rpc-rx/package.json +++ b/packages/rpc-rx/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/rpc-rx", - "version": "0.40.26", + "version": "0.41.0", "description": "An RxJs wrapper around the Polkadot JS API", "main": "index.js", "keywords": [ @@ -30,8 +30,8 @@ "homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-rx#readme", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/rpc-core": "^0.40.26", - "@polkadot/rpc-provider": "^0.40.26", + "@polkadot/rpc-core": "^0.41.0", + "@polkadot/rpc-provider": "^0.41.0", "@types/rx": "^4.1.1", "rxjs": "^6.3.3" } diff --git a/packages/type-extrinsics/package.json b/packages/type-extrinsics/package.json index b20c0b6dce..75b269bf31 100644 --- a/packages/type-extrinsics/package.json +++ b/packages/type-extrinsics/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/extrinsics", - "version": "0.40.26", + "version": "0.41.0", "main": "index.js", "repository": "https://github.com/polkadot-js/api.git", "author": "Jaco Greeff ", @@ -11,7 +11,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/types": "^0.40.26", + "@polkadot/types": "^0.41.0", "@polkadot/util": "^0.33.36" } } diff --git a/packages/type-extrinsics/src/fromMetadata.spec.ts b/packages/type-extrinsics/src/fromMetadata.spec.ts index ecd48e3e88..5e5bee3c4b 100644 --- a/packages/type-extrinsics/src/fromMetadata.spec.ts +++ b/packages/type-extrinsics/src/fromMetadata.spec.ts @@ -3,12 +3,12 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { Extrinsic, Metadata } from '@polkadot/types/index'; -import json from '@polkadot/types/Metadata/static'; +import json from '@polkadot/types/Metadata/v0/static'; import fromMetadata from './fromMetadata'; // Use the pre-generated metadata -const metadata = new Metadata(json); +const metadata = new Metadata(json).asV0; const newExtrinsics = fromMetadata(metadata); describe('fromMetadata', () => { diff --git a/packages/type-extrinsics/src/fromMetadata.ts b/packages/type-extrinsics/src/fromMetadata.ts index b36a0e8474..7141ffd05a 100644 --- a/packages/type-extrinsics/src/fromMetadata.ts +++ b/packages/type-extrinsics/src/fromMetadata.ts @@ -2,9 +2,9 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { RuntimeModuleMetadata } from '@polkadot/types/Metadata/Modules'; +import { RuntimeModuleMetadata } from '@polkadot/types/Metadata/v0/Modules'; import { Methods, ModulesWithMethods } from '@polkadot/types/Method'; -import { Metadata } from '@polkadot/types/index'; +import MetadataV0 from '@polkadot/types/Metadata/v0'; import { stringCamelCase } from '@polkadot/util'; @@ -18,7 +18,7 @@ import extrinsics from './index'; * @param extrinsics - An extrinsics object to be extended. * @param metadata - The metadata to extend the storage object against. */ -export default function fromMetadata (metadata: Metadata): ModulesWithMethods { +export default function fromMetadata (metadata: MetadataV0): ModulesWithMethods { let indexCount = -1; const findIndex = (prefix: string): number => { diff --git a/packages/type-extrinsics/src/static.ts b/packages/type-extrinsics/src/static.ts index d8b2c5e0b3..f21cd32404 100644 --- a/packages/type-extrinsics/src/static.ts +++ b/packages/type-extrinsics/src/static.ts @@ -2,11 +2,11 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import metadataRpc from '@polkadot/types/Metadata/static'; -import Metadata from '@polkadot/types/Metadata'; +import { Metadata } from '@polkadot/types/index'; +import metadataRpc from '@polkadot/types/Metadata/v0/static'; import fromMetadata from './fromMetadata'; export default fromMetadata( - new Metadata(metadataRpc) + new Metadata(metadataRpc).asV0 ); diff --git a/packages/type-extrinsics/src/utils/createUnchecked.ts b/packages/type-extrinsics/src/utils/createUnchecked.ts index 5a350690a1..bbbed1a5b2 100644 --- a/packages/type-extrinsics/src/utils/createUnchecked.ts +++ b/packages/type-extrinsics/src/utils/createUnchecked.ts @@ -2,7 +2,7 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { FunctionMetadata } from '@polkadot/types/Metadata/Modules'; +import { FunctionMetadata } from '@polkadot/types/Metadata/v0/Modules'; import { MethodFunction } from '@polkadot/types/Method'; import { Method } from '@polkadot/types/index'; import { assert } from '@polkadot/util'; diff --git a/packages/type-jsonrpc/package.json b/packages/type-jsonrpc/package.json index f3b386169f..8807360e1f 100644 --- a/packages/type-jsonrpc/package.json +++ b/packages/type-jsonrpc/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/jsonrpc", - "version": "0.40.26", + "version": "0.41.0", "description": "Method definitions for the Polkadot RPC layer", "main": "index.js", "engines": { diff --git a/packages/type-storage/package.json b/packages/type-storage/package.json index 3933c2ff5b..ce22d9c4ca 100644 --- a/packages/type-storage/package.json +++ b/packages/type-storage/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/storage", - "version": "0.40.26", + "version": "0.41.0", "description": "Generic wrapper wrapper around state storage", "main": "index.js", "engines": { @@ -31,7 +31,7 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/keyring": "^0.33.36", - "@polkadot/types": "^0.40.26", + "@polkadot/types": "^0.41.0", "@polkadot/util": "^0.33.36", "@polkadot/util-crypto": "^0.33.36" } diff --git a/packages/type-storage/src/fromMetadata.spec.ts b/packages/type-storage/src/fromMetadata.spec.ts index 45ea5d07b7..67130bb622 100644 --- a/packages/type-storage/src/fromMetadata.spec.ts +++ b/packages/type-storage/src/fromMetadata.spec.ts @@ -2,13 +2,13 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import Metadata from '@polkadot/types/Metadata'; -import json from '@polkadot/types/Metadata/static'; +import { Metadata } from '@polkadot/types/index'; +import json from '@polkadot/types/Metadata/v0/static'; import fromMetadata from './fromMetadata'; // Use the pre-generated metadata -const metadata = new Metadata(json); +const metadata = new Metadata(json).asV0; const newStorage = fromMetadata(metadata); describe('fromMetadata', () => { diff --git a/packages/type-storage/src/fromMetadata.ts b/packages/type-storage/src/fromMetadata.ts index dad4838b75..c6019a98e1 100644 --- a/packages/type-storage/src/fromMetadata.ts +++ b/packages/type-storage/src/fromMetadata.ts @@ -4,7 +4,7 @@ import { ModuleStorage, Storage } from './types'; -import Metadata from '@polkadot/types/Metadata'; +import MetadataV0 from '@polkadot/types/Metadata/v0'; import { stringLowerFirst } from '@polkadot/util'; import createFunction from './utils/createFunction'; @@ -17,7 +17,7 @@ import storage from './index'; * @param storage - A storage object to be extended. * @param metadata - The metadata to extend the storage object against. */ -export default function fromMetadata (metadata: Metadata): Storage { +export default function fromMetadata (metadata: MetadataV0): Storage { return metadata.modules.reduce((result, moduleMetadata) => { if (moduleMetadata.storage.isNone) { return result; diff --git a/packages/type-storage/src/static.ts b/packages/type-storage/src/static.ts index 6580a3624a..c83e302302 100644 --- a/packages/type-storage/src/static.ts +++ b/packages/type-storage/src/static.ts @@ -2,11 +2,11 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import metadataRpc from '@polkadot/types/Metadata/static'; -import Metadata from '@polkadot/types/Metadata'; +import { Metadata } from '@polkadot/types/index'; +import metadataRpc from '@polkadot/types/Metadata/v0/static'; import fromMetadata from './fromMetadata'; export default fromMetadata( - new Metadata(metadataRpc) + new Metadata(metadataRpc).asV0 ); diff --git a/packages/type-storage/src/substrate.ts b/packages/type-storage/src/substrate.ts index 728116f2ae..a21fadfb78 100644 --- a/packages/type-storage/src/substrate.ts +++ b/packages/type-storage/src/substrate.ts @@ -2,7 +2,7 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { StorageFunctionMetadata, StorageFunctionModifier, StorageFunctionType } from '@polkadot/types/Metadata/Modules'; +import { StorageFunctionMetadata, StorageFunctionModifier, StorageFunctionType } from '@polkadot/types/Metadata/v0/Modules'; import { StorageFunction } from '@polkadot/types/StorageKey'; import Text from '@polkadot/types/Text'; import Vector from '@polkadot/types/codec/Vector'; diff --git a/packages/type-storage/src/utils/createFunction.ts b/packages/type-storage/src/utils/createFunction.ts index 2f330d9eef..73544a0389 100644 --- a/packages/type-storage/src/utils/createFunction.ts +++ b/packages/type-storage/src/utils/createFunction.ts @@ -4,7 +4,7 @@ import Compact from '@polkadot/types/codec/Compact'; import { createType } from '@polkadot/types/codec'; -import { StorageFunctionMetadata } from '@polkadot/types/Metadata/Modules'; +import { StorageFunctionMetadata } from '@polkadot/types/Metadata/v0/Modules'; import { StorageFunction } from '@polkadot/types/StorageKey'; import { Text } from '@polkadot/types/index'; import { assert, isNull, isUndefined, stringLowerFirst, stringToU8a, u8aConcat } from '@polkadot/util'; diff --git a/packages/types/package.json b/packages/types/package.json index 500460d684..bef03d5147 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/types", - "version": "0.40.26", + "version": "0.41.0", "description": "Implementation of the Parity codec", "main": "index.js", "keywords": [ diff --git a/packages/types/src/Event.ts b/packages/types/src/Event.ts index bfcebfcc3f..eaa37b207e 100644 --- a/packages/types/src/Event.ts +++ b/packages/types/src/Event.ts @@ -10,8 +10,8 @@ import Struct from './codec/Struct'; import Tuple from './codec/Tuple'; import U8aFixed from './codec/U8aFixed'; import { TypeDef, getTypeClass, getTypeDef } from './codec/createType'; -import Metadata from './Metadata'; -import { EventMetadata } from './Metadata/Events'; +import MetadataV0 from './Metadata/v0'; +import { EventMetadata } from './Metadata/v0/Events'; import Null from './Null'; const EventTypes: { [index: string]: Constructor } = {}; @@ -119,7 +119,7 @@ export default class Event extends Struct { // This is called/injected by the API on init, allowing a snapshot of // the available system events to be used in lookups - static injectMetadata (metadata: Metadata): void { + static injectMetadata (metadata: MetadataV0): void { metadata.events.forEach((section, sectionIndex) => { const sectionName = stringCamelCase(section.name.toString()); diff --git a/packages/types/src/EventRecord.spec.ts b/packages/types/src/EventRecord.spec.ts index 8d525fa8e4..980ea53668 100644 --- a/packages/types/src/EventRecord.spec.ts +++ b/packages/types/src/EventRecord.spec.ts @@ -10,12 +10,12 @@ import AccountId from './AccountId'; import Event from './Event'; import EventRecord from './EventRecord'; import Metadata from './Metadata'; -import metadataRpc from './Metadata/static'; +import metadataRpc from './Metadata/v0/static'; describe('EventRecord', () => { beforeEach(() => { Event.injectMetadata( - new Metadata(metadataRpc) + new Metadata(metadataRpc).asV0 ); }); diff --git a/packages/types/src/Extrinsic.ts b/packages/types/src/Extrinsic.ts index 14c2f9426e..709733df85 100644 --- a/packages/types/src/Extrinsic.ts +++ b/packages/types/src/Extrinsic.ts @@ -13,7 +13,7 @@ import Struct from './codec/Struct'; import Address from './Address'; import ExtrinsicSignature from './ExtrinsicSignature'; import Hash from './Hash'; -import { FunctionMetadata } from './Metadata/Modules'; +import { FunctionMetadata } from './Metadata/v0/Modules'; import Method from './Method'; type ExtrinsicValue = { diff --git a/packages/types/src/Metadata/MagicNumber.spec.ts b/packages/types/src/Metadata/MagicNumber.spec.ts new file mode 100644 index 0000000000..15edfbfed8 --- /dev/null +++ b/packages/types/src/Metadata/MagicNumber.spec.ts @@ -0,0 +1,15 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import MagicNumber, { MAGIC_NUMBER } from './MagicNumber'; + +describe('MagicNumber', () => { + it('succeeds when the magic number matches', () => { + expect(() => new MagicNumber(MAGIC_NUMBER)).not.toThrow(); + }); + + it('fails when the magic number missmatches', () => { + expect(() => new MagicNumber(0x12345)).toThrow(/MagicNumber/); + }); +}); diff --git a/packages/types/src/Metadata/MagicNumber.ts b/packages/types/src/Metadata/MagicNumber.ts new file mode 100644 index 0000000000..2012ac6417 --- /dev/null +++ b/packages/types/src/Metadata/MagicNumber.ts @@ -0,0 +1,17 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import U32 from '../U32'; +import { assert } from '@polkadot/util'; + +export const MAGIC_NUMBER = new U32(0x6174656d); // `meta`, reversed for LE encoding +export const MAGIC_ERROR = -61746; + +export default class MagicNumber extends U32 { + constructor (value?: any) { + super(value); + + assert(this.eq(MAGIC_NUMBER), `MagicNumber: expected ${MAGIC_NUMBER.toHex()}, found ${this.toHex()}`, MAGIC_ERROR); + } +} diff --git a/packages/types/src/Metadata/Metadata.spec.ts b/packages/types/src/Metadata/Metadata.spec.ts index 89b292a7ca..3b2d310b54 100644 --- a/packages/types/src/Metadata/Metadata.spec.ts +++ b/packages/types/src/Metadata/Metadata.spec.ts @@ -8,27 +8,27 @@ import createType from '../codec/createType'; import Method from '../Method'; import Metadata from './index'; -import latestParsed from './latest.substrate.json'; +import latestParsed from './v1/latest.substrate.v1.json'; import rpcData from './static'; describe('Metadata', () => { + const metadata = new Metadata(rpcData); + it('decodes latest properly', () => { - const metadata = new Metadata(rpcData); const str = JSON.stringify(metadata.toJSON()); console.error(str); console.error(metadata.getUniqTypes()); - expect(metadata.events.length).not.toBe(0); + expect(metadata.version).toBe(1); + expect(metadata.asV1.modules.length).not.toBe(0); expect(str).toEqual(JSON.stringify(latestParsed)); }); describe('storage with default values', () => { - const metadata = new Metadata(rpcData); + Method.injectMethods(extrinsicsFromMeta(metadata.asV0)); - Method.injectMethods(extrinsicsFromMeta(metadata)); - - metadata.modules.forEach((mod) => { + metadata.asV1.modules.forEach((mod) => { if (mod.storage.isNone) { return; } @@ -42,4 +42,13 @@ describe('Metadata', () => { }); }); }); + + it('converts v1 to V0', () => { + const v0 = metadata.asV0; + const str = JSON.stringify(metadata.toJSON()); + + console.error(str); + + expect(metadata.getUniqTypes()).toEqual(v0.getUniqTypes()); + }); }); diff --git a/packages/types/src/Metadata/MetadataVersioned.ts b/packages/types/src/Metadata/MetadataVersioned.ts new file mode 100644 index 0000000000..b3db44d5ea --- /dev/null +++ b/packages/types/src/Metadata/MetadataVersioned.ts @@ -0,0 +1,112 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { MetadataInterface } from './types'; + +import { assert, isUndefined } from '@polkadot/util'; + +import EnumType from '../codec/EnumType'; +import Struct from '../codec/Struct'; +import Null from '../Null'; +import MetadataV0 from './v0'; +import MetadataV1 from './v1'; +import v1ToV0 from './v1/toV0'; +import MagicNumber from './MagicNumber'; + +class MetadataEnum extends EnumType { + constructor (value?: any) { + super({ + MetadataV0, // once rolled-out, can replace this with Null + MetadataV1 + }, value); + } + + /** + * @description Returns the wrapped values as a V0 object + */ + get asV0 (): MetadataV0 { + return this.value as MetadataV0; + } + + /** + * @description Returns the wrapped values as a V1 object + */ + get asV1 (): MetadataV1 { + return this.value as MetadataV1; + } + + /** + * @description The version this metadata represents + */ + get version (): number { + return this.index; + } +} + +/** + * @name MetadataVersioned + * @description + * The versioned runtime metadata as a decoded structure + */ +export default class MetadataVersioned extends Struct implements MetadataInterface { + private _convertedV0?: MetadataV0; + + constructor (value?: any) { + super({ + magicNumber: MagicNumber, + metadata: MetadataEnum + }, value); + } + + /** + * @description + */ + get magicNumber (): MagicNumber { + return this.get('magicNumber') as MagicNumber; + } + + /** + * @description the metadata wrapped + */ + private get metadata (): MetadataEnum { + return this.get('metadata') as MetadataEnum; + } + + /** + * @description the metadata version this structure represents + */ + get version (): number { + return this.metadata.index; + } + + /** + * @description Returns the wrapped metadata as a V0 object + */ + get asV0 (): MetadataV0 { + if (this.metadata.version === 0) { + return this.metadata.asV0; + } + + assert(this.metadata.version === 1, `Cannot convert metadata from v${this.metadata.version} to v0`); + + if (isUndefined(this._convertedV0)) { + this._convertedV0 = v1ToV0(this.metadata.asV1); + } + + return this._convertedV0; + } + + /** + * @description Returns the wrapped values as a V1 object + */ + get asV1 (): MetadataV1 { + assert(this.metadata.version === 1, `Cannot convert metadata from v${this.metadata.version} to v1`); + + return this.metadata.asV1; + } + + getUniqTypes (): Array { + return (this.metadata.value as any as MetadataInterface).getUniqTypes(); + } +} diff --git a/packages/types/src/Metadata/index.ts b/packages/types/src/Metadata/index.ts index 32ba543b55..d2727e4426 100644 --- a/packages/types/src/Metadata/index.ts +++ b/packages/types/src/Metadata/index.ts @@ -2,161 +2,43 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { assert, hexToU8a, isHex, isU8a, isUndefined } from '@polkadot/util'; +import { isHex, hexToU8a, u8aConcat } from '@polkadot/util'; -import { getTypeDef, TypeDef, TypeDefInfo } from '../codec/createType'; -import Compact from '../codec/Compact'; -import Struct from '../codec/Struct'; -import Vector from '../codec/Vector'; -import { OuterDispatchMetadata, OuterDispatchCall } from './Calls'; -import { OuterEventMetadata, OuterEventMetadataEvent } from './Events'; -import { RuntimeModuleMetadata } from './Modules'; - -// Decodes the runtime metadata as passed through from the `state_getMetadata` call. This -// file is probably best understood from the bottom-up, i.e. start reading right at the -// end and work up. (Just so we don't use before definition) - -// Quick and dirty flatten (.flat() not available) -function flattenUniq (list: Array): Array { - const flat = list.reduce((result, entry) => { - return result.concat( - Array.isArray(entry) - ? flattenUniq(entry) - : entry - ); - }, []); - - return [...new Set(flat)] - .filter((value: any) => value) - .sort(); -} +import { MAGIC_ERROR, MAGIC_NUMBER } from './MagicNumber'; +import MetadataVersioned from './MetadataVersioned'; /** * @name Metadata * @description - * The runtime metadata as a decoded structure + * The versioned runtime metadata as a decoded structure */ -export default class Metadata extends Struct { - constructor (value?: any) { - super({ - outerEvent: OuterEventMetadata, - modules: Vector.with(RuntimeModuleMetadata), - outerDispatch: OuterDispatchMetadata - }, Metadata.decodeMetadata(value)); +export default class Metadata extends MetadataVersioned { + constructor (value?: Uint8Array | string) { + super(Metadata.decodeMetadata(value)); } - static decodeMetadata (value: string | Uint8Array | object): object | Uint8Array { - if (isHex(value)) { - // We receive this as an hex in the JSON output from the Node. - // Convert to u8a and use the U8a version to do the actual parsing. - return Metadata.decodeMetadata(hexToU8a(value)); - } else if (isU8a(value)) { - // HACK 13 Oct 2018 - For current running BBQ nodes, Metadata is not properly - // encoded, it does not have a length prefix. For latest substrate master, it - // is properly encoded. Here we pull the prefix, check it agianst the length - - // if matches, then we have the length, otherwise we assume it is an older node - // and use the whole buffer - const [offset, length] = Compact.decodeU8a(value); + // first we try and parse using the versioned structure, if this does fail, + // we adjust with the magic number and a manual version and re-try. As soon as + // we remove support for V0, we will just do a new here + private static decodeMetadata (_value: Uint8Array | string = new Uint8Array()): MetadataVersioned { + const value = isHex(_value) + ? hexToU8a(_value) + : _value; - return value.length === (offset + length.toNumber()) - ? value.subarray(offset) - : value; + try { + return new MetadataVersioned(value); + } catch (error) { + if (error.code !== MAGIC_ERROR) { + throw error; + } } - // Decode as normal struct - return value; - } - - /** - * @description Wrapped [[OuterDispatchCall]] - */ - get calls (): Vector { - return (this.get('outerDispatch') as OuterDispatchMetadata).calls; - } - - /** - * @description Wrapped [[OuterEventMetadataEvent]] - */ - get events (): Vector { - return (this.get('outerEvent') as OuterEventMetadata).events; - } - - /** - * @description Wrapped [[RuntimeModuleMetadata]] - */ - get modules (): Vector { - return this.get('modules') as Vector; - } - - private get argNames () { - return this.modules.map((module) => - module.module.call.functions.map((fn) => - fn.arguments.map((argument) => argument.type.toString()) + return new MetadataVersioned( + u8aConcat( + MAGIC_NUMBER.toU8a(), // manually add the magic number + Uint8Array.from([0]), // add the version for the original + value // the actual data as retrieved ) ); } - - private get eventNames () { - return this.events.map((module) => - module.events.map((event) => - event.arguments.map((argument) => argument.toString()) - ) - ); - } - - private get storageNames () { - return this.modules.map((module) => - module.storage.isSome - ? module.storage.unwrap().functions.map((fn) => - fn.type.isMap - ? [fn.type.asMap.key.toString(), fn.type.asMap.value.toString()] - : [fn.type.asType.toString()] - ) - : [] - ); - } - - /** - * @description Helper to retrieve a list of all type that are found, sorted and de-deuplicated - */ - getUniqTypes (): Array { - const types = flattenUniq([this.argNames, this.eventNames, this.storageNames]); - - this.validateTypes(types); - - return types; - } - - private validateTypes (types: Array): void { - const extractTypes = (types: Array): Array => { - return types.map((type) => { - const decoded = getTypeDef(type); - - switch (decoded.info) { - case TypeDefInfo.Plain: - return decoded.type; - - case TypeDefInfo.Compact: - case TypeDefInfo.Option: - case TypeDefInfo.Vector: - return extractTypes([(decoded.sub as TypeDef).type]); - - case TypeDefInfo.Tuple: - return extractTypes( - (decoded.sub as Array).map((sub) => sub.type) - ); - - default: - throw new Error('Unreachable'); - } - }); - }; - - const allTypes = require('../index'); - const missing = flattenUniq(extractTypes(types)).filter((type) => - isUndefined(allTypes[type]) - ); - - assert(missing.length === 0, `Unknown types found, no types for ${missing}`); - } } diff --git a/packages/types/src/Metadata/static.ts b/packages/types/src/Metadata/static.ts index b7a7edeb78..4debabcbe2 100644 --- a/packages/types/src/Metadata/static.ts +++ b/packages/types/src/Metadata/static.ts @@ -2,7 +2,6 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -const meta = '0x144576656e74341873797374656d084045787472696e7369635375636365737300049420416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c656400045420416e2065787472696e736963206661696c65642e1c696e6469636573043c4e65774163636f756e74496e64657808244163636f756e744964304163636f756e74496e646578046c2041206e6577206163636f756e742077617320637265617465642e2062616c616e6365730c284e65774163636f756e7408244163636f756e7449641c42616c616e6365046c2041206e6577206163636f756e742077617320637265617465642e345265617065644163636f756e7404244163636f756e744964045c20416e206163636f756e7420776173207265617065642e205472616e7366657210244163636f756e744964244163636f756e7449641c42616c616e63651c42616c616e636504b0205472616e7366657220737563636565646564202866726f6d2c20746f2c2076616c75652c2066656573292e1c73657373696f6e04284e657753657373696f6e042c426c6f636b4e756d626572085501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e1c7374616b696e670c18526577617264041c42616c616e636504e020416c6c2076616c696461746f72732068617665206265656e2072657761726465642062792074686520676976656e2062616c616e63652e384f66666c696e655761726e696e6708244163636f756e7449640c753332085501204f6e652076616c696461746f722028616e64207468656972206e6f6d696e61746f72732920686173206265656e20676976656e2061206f66666c696e652d7761726e696e67202874686579277265207374696c6c15012077697468696e207468656972206772616365292e205468652061636372756564206e756d626572206f6620736c6173686573206973207265636f726465642c20746f6f2e304f66666c696e65536c61736808244163636f756e7449641c42616c616e6365042d01204f6e652076616c696461746f722028616e64207468656972206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e2464656d6f637261637918185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e001c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c640018506173736564043c5265666572656e64756d496e64657800244e6f74506173736564043c5265666572656e64756d496e646578002443616e63656c6c6564043c5265666572656e64756d496e64657800204578656375746564083c5265666572656e64756d496e64657810626f6f6c001c636f756e63696c102c566f74657252656170656408244163636f756e744964244163636f756e74496404542072656170656420766f7465722c2072656170657240426164526561706572536c617368656404244163636f756e744964043c20736c6173686564207265617065723054616c6c7953746172746564040c75333204f420412074616c6c792028666f7220617070726f76616c20766f746573206f6620636f756e63696c2073656174287329292068617320737461727465642e3854616c6c7946696e616c6973656408385665633c4163636f756e7449643e385665633c4163636f756e7449643e04690120412074616c6c792028666f7220617070726f76616c20766f746573206f6620636f756e63696c2073656174287329292068617320656e646564202877697468206f6e65206f72206d6f7265206e6577206d656d62657273292e38636f756e63696c5f766f74696e67084054616c6c7943616e63656c6174696f6e1010486173680c7533320c7533320c753332080101204120766f74696e672074616c6c79206861732068617070656e656420666f722061207265666572656e64756d2063616e63656c6c6174696f6e20766f74652ea0204c61737420746872656520617265207965732c206e6f2c206162737461696e20636f756e74732e3c54616c6c795265666572656e64756d1010486173680c7533320c7533320c75333208cc204120766f74696e672074616c6c79206861732068617070656e656420666f722061207265666572656e64756d20766f74652ea0204c61737420746872656520617265207965732c206e6f2c206162737461696e20636f756e74732e3c636f756e63696c5f6d6f74696f6e73142050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173680c7533320465012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e20753332292e14566f74656414244163636f756e744964104861736810626f6f6c0c7533320c7533320809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67f420612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e206173207533327320726573706563746976656c79292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e1c6772616e64706104384e6577417574686f72697469657304585665633c2853657373696f6e4b65792c20753634293e0490204e657720617574686f726974792073657420686173206265656e206170706c6965642e207472656173757279142050726f706f736564043450726f706f73616c496e6465780438204e65772070726f706f73616c2e205370656e64696e67041c42616c616e636504e8205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964048020536f6d652066756e64732068617665206265656e20616c6c6f63617465642e144275726e74041c42616c616e6365048c20536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572041c42616c616e6365043101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e20636f6e747261637408205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e6365047501205472616e736665722068617070656e6564206066726f6d60202d3e2060746f60207769746820676976656e206076616c7565602061732070617274206f66206120606d6573736167652d63616c6c60206f722060637265617465602e1c4372656174656408244163636f756e744964244163636f756e74496404dc20436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e107375646f081453756469640410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e284b65794368616e67656404244163636f756e74496404f020546865207375646f6572206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e401873797374656d184d6f64756c651043616c6c00011853797374656d28304163636f756e744e6f6e6365010130543a3a4163636f756e74496420543a3a496e646578200000000000000000003845787472696e736963436f756e7400000c75333204000024426c6f636b48617368010138543a3a426c6f636b4e756d6265721c543a3a48617368800000000000000000000000000000000000000000000000000000000000000000003445787472696e7369634461746101010c7533321c5665633c75383e0400002852616e646f6d5365656401001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000000184e756d626572010038543a3a426c6f636b4e756d626572200000000000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a48617368800000000000000000000000000000000000000000000000000000000000000000003845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000018446967657374010024543a3a446967657374040000184576656e74730100685665633c4576656e745265636f72643c543a3a4576656e743e3e0400001061757261184d6f64756c651043616c6c00002474696d657374616d70184d6f64756c651043616c6c0400000c736574040c6e6f777c3c543a3a4d6f6d656e7420617320486173436f6d706163743e3a3a54797065205820536574207468652063757272656e742074696d652e0055012045787472696e736963207769746820746869732063616c6c2073686f756c6420626520706c616365642061742074686520737065636966696320706f736974696f6e20696e20746865206561636820626c6f636b6d012028737065636966696564206279207468652054726169743a3a54494d455354414d505f5345545f504f534954494f4e29207479706963616c6c7920617420746865207374617274206f6620746865206561636820626c6f636b2e750120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6e2070686173652cbc20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e008501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062792060626c6f636b5f706572696f64602e012454696d657374616d700c0c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e2c426c6f636b506572696f64010024543a3a4d6f6d656e7420050000000000000004c420546865206d696e696d756d2028616e6420616476697365642920706572696f64206265747765656e20626c6f636b732e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f24636f6e73656e737573184d6f64756c651043616c6c180000487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0468205265706f727420736f6d65206d69736265686176696f75722e0100306e6f74655f6f66666c696e65041c6f66666c696e65f43c543a3a496e686572656e744f66666c696e655265706f727420617320496e686572656e744f66666c696e655265706f72743e3a3a496e686572656e74044501204e6f7465207468652070726576696f757320626c6f636b27732076616c696461746f72206d6973736564207468656972206f70706f7274756e69747920746f2070726f706f7365206120626c6f636b2e02001872656d61726b041c5f72656d61726b1c5665633c75383e046c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e0300387365745f686561705f7061676573041470616765730c75363404fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e0400207365745f636f6465040c6e65771c5665633c75383e04482053657420746865206e657720636f64652e05002c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e046c2053657420736f6d65206974656d73206f662073746f726167652e0124436f6e73656e737573044c4f726967696e616c417574686f7269746965730000485665633c543a3a53657373696f6e4b65793e0400001c696e6469636573184d6f64756c651043616c6c00011c496e6469636573082c4e657874456e756d53657401003c543a3a4163636f756e74496e6465781000000000047c20546865206e657874206672656520656e756d65726174696f6e207365742e1c456e756d53657401013c543a3a4163636f756e74496e646578445665633c543a3a4163636f756e7449643e040004582054686520656e756d65726174696f6e20736574732e2062616c616e636573184d6f64756c651043616c6c080000207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706504d4205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572207374616b65722e01002c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651066726565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065207265736572766564803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065049420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e012042616c616e6365732034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004a42054686520746f74616c20616d6f756e74206f66207374616b65206f6e207468652073797374656d2e484578697374656e7469616c4465706f736974010028543a3a42616c616e6365400000000000000000000000000000000004d020546865206d696e696d756d20616d6f756e7420616c6c6f77656420746f206b65657020616e206163636f756e74206f70656e2e2c5472616e73666572466565010028543a3a42616c616e636540000000000000000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e466565010028543a3a42616c616e63654000000000000000000000000000000000042501205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e204174206c6561737420617320626967206173205265636c61696d5265626174652e2c4672656542616c616e6365010130543a3a4163636f756e74496428543a3a42616c616e636540000000000000000000000000000000002c9c20546865202766726565272062616c616e6365206f66206120676976656e206163636f756e742e004d01205468697320697320746865206f6e6c792062616c616e63652074686174206d61747465727320696e207465726d73206f66206d6f7374206f7065726174696f6e73206f6e20746f6b656e732e204974206973690120616c6f6e65207573656420746f2064657465726d696e65207468652062616c616e6365207768656e20696e2074686520636f6e747261637420657865637574696f6e20656e7669726f6e6d656e742e205768656e207468697355012062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e20746865202763757272656e74206163636f756e74272069733d012064656c657465643a207370656369666963616c6c7920604672656542616c616e6365602e20467572746865726d6f72652c20604f6e4672656542616c616e63655a65726f602063616c6c6261636b410120697320696e766f6b65642c20676976696e672061206368616e636520746f2065787465726e616c206d6f64756c657320746f20636c65616e75702064617461206173736f636961746564207769746854207468652064656c65746564206163636f756e742e005d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c657465642069662060526573657276656442616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e3c526573657276656442616c616e6365010130543a3a4163636f756e74496428543a3a42616c616e636540000000000000000000000000000000003075012054686520616d6f756e74206f66207468652062616c616e6365206f66206120676976656e206163636f756e7420746861742069732065787465726e616c6c792072657365727665643b20746869732063616e207374696c6c206765749c20736c61736865642c20627574206765747320736c6173686564206c617374206f6620616c6c2e006d0120546869732062616c616e63652069732061202772657365727665272062616c616e63652074686174206f746865722073756273797374656d732075736520696e206f7264657220746f2073657420617369646520746f6b656e737101207468617420617265207374696c6c20276f776e65642720627920746865206163636f756e7420686f6c6465722c20627574207768696368206172652073757370656e6461626c652e20285468697320697320646966666572656e74290120616e642077686f6c6c7920756e72656c6174656420746f207468652060426f6e64616765602073797374656d207573656420696e20746865207374616b696e67206d6f64756c652e29007501205768656e20746869732062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e2074686973202772657365727665206163636f756e7427b42069732064656c657465643a207370656369666963616c6c792c2060526573657276656442616c616e6365602e004d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c6574656420696620604672656542616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e485472616e73616374696f6e42617365466565010028543a3a42616c616e6365400000000000000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e42797465466565010028543a3a42616c616e63654000000000000000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e1c73657373696f6e184d6f64756c651043616c6c0c00001c7365745f6b6579040c6b657934543a3a53657373696f6e4b65790861012053657473207468652073657373696f6e206b6579206f6620605f76616c696461746f726020746f20605f6b6579602e205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e657874242073657373696f6e2e0100287365745f6c656e677468040c6e6577903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065046d01205365742061206e65772073657373696f6e206c656e6774682e20576f6e2774206b69636b20696e20756e74696c20746865206e6578742073657373696f6e206368616e6765202861742063757272656e74206c656e677468292e020044666f7263655f6e65775f73657373696f6e04346170706c795f7265776172647310626f6f6c045820466f726365732061206e65772073657373696f6e2e011c53657373696f6e202856616c696461746f72730100445665633c543a3a4163636f756e7449643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3453657373696f6e4c656e677468010038543a3a426c6f636b4e756d62657220e803000000000000047c2043757272656e74206c656e677468206f66207468652073657373696f6e2e3043757272656e74496e646578010038543a3a426c6f636b4e756d62657220000000000000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e3043757272656e745374617274010024543a3a4d6f6d656e7420000000000000000004a02054696d657374616d70207768656e2063757272656e742073657373696f6e20737461727465642e44466f7263696e674e657753657373696f6e000010626f6f6c0400087901204e65772073657373696f6e206973206265696e6720666f72636564206973207468697320656e747279206578697374733b20696e20776869636820636173652c2074686520626f6f6c65616e2076616c75652069732077686574686572810120746865206e65772073657373696f6e2073686f756c6420626520636f6e736964657265642061206e6f726d616c20726f746174696f6e202872657761726461626c6529206f7220657863657074696f6e616c2028736c61736861626c65292e404c6173744c656e6774684368616e6765000038543a3a426c6f636b4e756d626572040004c020426c6f636b206174207768696368207468652073657373696f6e206c656e677468206c617374206368616e6765642e284e6578744b6579466f72000130543a3a4163636f756e74496434543a3a53657373696f6e4b65790400049020546865206e657874206b657920666f72206120676976656e2076616c696461746f722e444e65787453657373696f6e4c656e677468000038543a3a426c6f636b4e756d6265720400046420546865206e6578742073657373696f6e206c656e6774682e1c7374616b696e67184d6f64756c651043616c6c2c0000147374616b65000cc0204465636c617265207468652064657369726520746f207374616b6520666f7220746865207472616e736163746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e01001c756e7374616b650440696e74656e74696f6e735f696e64657830436f6d706163743c7533323e0cc02052657472616374207468652064657369726520746f207374616b6520666f7220746865207472616e736163746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e0200206e6f6d696e61746504187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500030028756e6e6f6d696e61746504307461726765745f696e64657830436f6d706163743c7533323e0811012057696c6c2070616e69632069662063616c6c6564207768656e20736f757263652069736e27742063757272656e746c79206e6f6d696e6174696e67207461726765742ee42055706461746573204e6f6d696e6174696e672c204e6f6d696e61746f7273466f7220616e64204e6f6d696e6174696f6e42616c616e63652e04005072656769737465725f707265666572656e6365730840696e74656e74696f6e735f696e64657830436f6d706163743c7533323e1470726566736856616c696461746f7250726566733c543a3a42616c616e63653e0c5901205365742074686520676976656e206163636f756e74277320707265666572656e636520666f7220736c617368696e67206265686176696f75722073686f756c64207468657920626520612076616c696461746f722e00190120416e206572726f7220286e6f2d6f7029206966206053656c663a3a696e74656e74696f6e7328295b696e74656e74696f6e735f696e6465785d20213d206f726967696e602e0500507365745f73657373696f6e735f7065725f657261040c6e6577903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706504982053657420746865206e756d626572206f662073657373696f6e7320696e20616e206572612e0600507365745f626f6e64696e675f6475726174696f6e040c6e6577903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706504b020546865206c656e677468206f662074686520626f6e64696e67206475726174696f6e20696e20657261732e07004c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e04802054686520696465616c206e756d626572206f662076616c696461746f72732e080034666f7263655f6e65775f65726104346170706c795f7265776172647310626f6f6c083d0120466f72636520746865726520746f2062652061206e6577206572612e205468697320616c736f20666f726365732061206e65772073657373696f6e20696d6d6564696174656c792061667465722e250120606170706c795f72657761726473602073686f756c64206265207472756520666f722076616c696461746f727320746f20676574207468652073657373696f6e207265776172642e09005c7365745f6f66666c696e655f736c6173685f6772616365040c6e657730436f6d706163743c7533323e04902053657420746865206f66666c696e6520736c61736820677261636520706572696f642e0a00447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e04cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e011c5374616b696e67583856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321004000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e3853657373696f6e73506572457261010038543a3a426c6f636b4e756d62657220e80300000000000004a420546865206c656e677468206f662061207374616b696e672065726120696e2073657373696f6e732e3453657373696f6e52657761726401001c50657262696c6c103c000000042101204d6178696d756d207265776172642c207065722076616c696461746f722c20746861742069732070726f7669646564207065722061636365707461626c652073657373696f6e2e304f66666c696e65536c61736801001c50657262696c6c1040420f0004510120536c6173682c207065722076616c696461746f7220746861742069732074616b656e20666f72207468652066697273742074696d6520746865792061726520666f756e6420746f206265206f66666c696e652e444f66666c696e65536c617368477261636501000c7533321000000000043901204e756d626572206f6620696e7374616e636573206f66206f66666c696e65207265706f727473206265666f726520736c617368696e6720626567696e7320666f722076616c696461746f72732e3c426f6e64696e674475726174696f6e010038543a3a426c6f636b4e756d62657220e80300000000000004b820546865206c656e677468206f662074686520626f6e64696e67206475726174696f6e20696e20626c6f636b732e30496e76756c657261626c65730100445665633c543a3a4163636f756e7449643e040008a50120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c65206b69636b65642e20497427732061205665632073696e63652074686579277265206561737920746f20696e697469616c697365ad0120616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f757220696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e2843757272656e74457261010038543a3a426c6f636b4e756d626572200000000000000000045c205468652063757272656e742065726120696e6465782e5056616c696461746f72507265666572656e636573010130543a3a4163636f756e7449646856616c696461746f7250726566733c543a3a42616c616e63653e080c00048820507265666572656e636573207468617420612076616c696461746f72206861732e28496e74656e74696f6e730100445665633c543a3a4163636f756e7449643e040004a420416c6c20746865206163636f756e7473207769746820612064657369726520746f207374616b652e284e6f6d696e6174696e67000130543a3a4163636f756e74496430543a3a4163636f756e744964040004a020416c6c206e6f6d696e61746f72202d3e206e6f6d696e65652072656c6174696f6e73686970732e344e6f6d696e61746f7273466f72010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e04000494204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e742e5043757272656e744e6f6d696e61746f7273466f72010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e0400040501204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e74207468617420697320696e20616374696f6e207269676874206e6f772e5043757272656e7453657373696f6e526577617264010028543a3a42616c616e63654000000000000000000000000000000000042101204d6178696d756d207265776172642c207065722076616c696461746f722c20746861742069732070726f7669646564207065722061636365707461626c652073657373696f6e2e4c43757272656e744f66666c696e65536c617368010028543a3a42616c616e6365400000000000000000000000000000000004510120536c6173682c207065722076616c696461746f7220746861742069732074616b656e20666f72207468652066697273742074696d6520746865792061726520666f756e6420746f206265206f66666c696e652e484e65787453657373696f6e73506572457261000038543a3a426c6f636b4e756d6265720400049020546865206e6578742076616c7565206f662073657373696f6e7320706572206572612e4c4c6173744572614c656e6774684368616e6765010038543a3a426c6f636b4e756d62657220000000000000000004e0205468652073657373696f6e20696e6465782061742077686963682074686520657261206c656e677468206c617374206368616e6765642e285374616b6552616e6765010048506169724f663c543a3a42616c616e63653e80000000000000000000000000000000000000000000000000000000000000000004f020546865206869676865737420616e64206c6f77657374207374616b65642076616c696461746f7220736c61736861626c652062616c616e6365732e1c426f6e64616765010130543a3a4163636f756e74496438543a3a426c6f636b4e756d62657220000000000000000004f42054686520626c6f636b20617420776869636820746865206077686f6027732066756e6473206265636f6d6520656e746972656c79206c69717569642e28536c617368436f756e74010130543a3a4163636f756e7449640c753332100000000004d10120546865206e756d626572206f662074696d6573206120676976656e2076616c696461746f7220686173206265656e207265706f72746564206f66666c696e652e205468697320676574732064656372656d656e746564206279206f6e652065616368206572612074686174207061737365732e34466f7263696e674e65774572610000082829040004682057652061726520666f7263696e672061206e6577206572612e2464656d6f6372616379184d6f64756c651043616c6c1800001c70726f706f7365082070726f706f73616c40426f783c543a3a50726f706f73616c3e1476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706504a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e0100187365636f6e64042070726f706f73616c48436f6d706163743c50726f70496e6465783e04a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e020010766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f746508350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e03004073746172745f7265666572656e64756d0c2070726f706f73616c40426f783c543a3a50726f706f73616c3e247468726573686f6c6434566f74655468726573686f6c641464656c617938543a3a426c6f636b4e756d62657204502053746172742061207265666572656e64756d2e04004463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e04542052656d6f76652061207265666572656e64756d2e05003463616e63656c5f71756575656408107768656e903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706514776869636830436f6d706163743c7533323e04a02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e012444656d6f63726163793c3c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f70730100ac5665633c2850726f70496e6465782c20543a3a50726f706f73616c2c20543a3a4163636f756e744964293e0400048020546865207075626c69632070726f706f73616c732e20556e736f727465642e244465706f7369744f6600012450726f70496e6465787c28543a3a42616c616e63652c205665633c543a3a4163636f756e7449643e29040004842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e304c61756e6368506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e384d696e696d756d4465706f736974010028543a3a42616c616e6365400000000000000000000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e2c5075626c696344656c6179010038543a3a426c6f636b4e756d62657220000000000000000004d4205468652064656c6179206265666f726520656e6163746d656e7420666f7220616c6c207075626c6963207265666572656e64612e384d61784c6f636b506572696f647301002c4c6f636b506572696f6473040004d90120546865206d6178696d756d206e756d626572206f66206164646974696f6e616c206c6f636b20706572696f6473206120766f746572206d6179206f6666657220746f20737472656e677468656e20746865697220766f74652e204d756c7469706c6573206f6620605075626c696344656c6179602e30566f74696e67506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004390120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e64756d73207374617274656420736f206661722e244e65787454616c6c7901003c5265666572656e64756d496e646578100000000004c820546865206e657874207265666572656e64756d20696e64657820746861742073686f756c642062652074616c6c6965642e405265666572656e64756d496e666f4f6600013c5265666572656e64756d496e646578b4285265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a50726f706f73616c3e29040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e3444697370617463685175657565010138543a3a426c6f636b4e756d626572ac5665633c4f7074696f6e3c28543a3a50726f706f73616c2c205265666572656e64756d496e646578293e3e040004c0205175657565206f66207375636365737366756c207265666572656e646120746f20626520646973706174636865642e1c426f6e64616765010130543a3a4163636f756e74496438543a3a426c6f636b4e756d62657220000000000000000004d02054686520626c6f636b20617420776869636820746865206077686f6027732066756e6473206265636f6d65206c69717569642e24566f74657273466f7201013c5265666572656e64756d496e646578445665633c543a3a4163636f756e7449643e040004a4204765742074686520766f7465727320666f72207468652063757272656e742070726f706f73616c2e18566f74654f6601017c285265666572656e64756d496e6465782c20543a3a4163636f756e7449642910566f746504000cd501204765742074686520766f746520696e206120676976656e207265666572656e64756d206f66206120706172746963756c617220766f7465722e2054686520726573756c74206973206d65616e696e6766756c206f6e6c792069662060766f746572735f666f726020696e636c7564657320746865c90120766f746572207768656e2063616c6c6564207769746820746865207265666572656e64756d2028796f75276c6c20676574207468652064656661756c742060566f7465602076616c7565206f7468657277697365292e20496620796f7520646f6e27742077616e7420746f20636865636b61012060766f746572735f666f72602c207468656e20796f752063616e20616c736f20636865636b20666f722073696d706c65206578697374656e636520776974682060566f74654f663a3a657869737473602066697273742e1c636f756e63696c184d6f64756c651043616c6c240000347365745f617070726f76616c730814766f746573245665633c626f6f6c3e14696e64657848436f6d706163743c566f7465496e6465783e086101205365742063616e64696461746520617070726f76616c732e20417070726f76616c20736c6f747320737461792076616c6964206173206c6f6e672061732063616e6469646174657320696e2074686f736520736c6f7473402061726520726567697374657265642e01004c726561705f696e6163746976655f766f74657210387265706f727465725f696e64657830436f6d706163743c7533323e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652477686f5f696e64657830436f6d706163743c7533323e48617373756d65645f766f74655f696e64657848436f6d706163743c566f7465496e6465783e1461012052656d6f7665206120766f7465722e20466f72206974206e6f7420746f206265206120626f6e642d636f6e73756d696e67206e6f2d6f702c20616c6c20617070726f7665642063616e64696461746520696e64696365737101206d757374206e6f772062652065697468657220756e72656769737465726564206f72207265676973746572656420746f20612063616e646964617465207468617420726567697374657265642074686520736c6f74206166746572a02074686520766f7465722067617665207468656972206c61737420617070726f76616c207365742e000101204d61792062652063616c6c656420627920616e796f6e652e2052657475726e732074686520766f746572206465706f73697420746f20607369676e6564602e020034726574726163745f766f7465720414696e64657830436f6d706163743c7533323e042d012052656d6f7665206120766f7465722e20416c6c20766f746573206172652063616e63656c6c656420616e642074686520766f746572206465706f7369742069732072657475726e65642e0300407375626d69745f63616e6469646163790410736c6f7430436f6d706163743c7533323e0c78205375626d6974206f6e6573656c6620666f722063616e6469646163792e001101204163636f756e74206d757374206861766520656e6f756768207472616e736665727261626c652066756e647320696e20697420746f207061792074686520626f6e642e04003870726573656e745f77696e6e65720c2463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636514746f74616c803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706514696e64657848436f6d706163743c566f7465496e6465783e0c650120436c61696d207468617420607369676e656460206973206f6e65206f662074686520746f702053656c663a3a63617272795f636f756e742829202b2063757272656e745f766f746528292e312063616e646964617465732ea501204f6e6c7920776f726b73206966207468652060626c6f636b5f6e756d626572203e3d2063757272656e745f766f746528292e306020616e6420603c2063757272656e745f766f746528292e30202b2070726573656e746174696f6e5f6475726174696f6e282960607820607369676e6564602073686f756c642068617665206174206c656173740500447365745f646573697265645f73656174730414636f756e7430436f6d706163743c7533323e0c650120536574207468652064657369726564206d656d62657220636f756e743b206966206c6f776572207468616e207468652063757272656e7420636f756e742c207468656e2073656174732077696c6c206e6f74206265207570690120656c656374696f6e207768656e2074686579206578706972652e204966206d6f72652c207468656e2061206e657720766f74652077696c6c2062652073746172746564206966206f6e65206973206e6f7420616c72656164793420696e2070726f67726573732e06003472656d6f76655f6d656d626572040c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c71012052656d6f7665206120706172746963756c6172206d656d6265722e20412074616c6c792077696c6c2068617070656e20696e7374616e746c7920286966206e6f7420616c726561647920696e20612070726573656e746174696f6e410120706572696f642920746f2066696c6c2074686520736561742069662072656d6f76616c206d65616e732074686174207468652064657369726564206d656d6265727320617265206e6f74206d65742e7c20546869732069732065666665637469766520696d6d6564696174656c792e0700647365745f70726573656e746174696f6e5f6475726174696f6e0414636f756e74903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706508590120536574207468652070726573656e746174696f6e206475726174696f6e2e2049662074686572652069732063757272656e746c79206120766f7465206265696e672070726573656e74656420666f722c2077696c6c6020696e766f6b65206066696e616c6973655f766f7465602e0800447365745f7465726d5f6475726174696f6e0414636f756e74903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706508510120536574207468652070726573656e746174696f6e206475726174696f6e2e2049662074686572652069732063757272656e74206120766f7465206265696e672070726573656e74656420666f722c2077696c6c6020696e766f6b65206066696e616c6973655f766f7465602e011c436f756e63696c503443616e646964616379426f6e64010028543a3a42616c616e6365400900000000000000000000000000000004050120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f207375626d6974206f6e6527732063616e6469646163792e28566f74696e67426f6e64010028543a3a42616c616e6365400000000000000000000000000000000004090120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f2062652061626c6520746f207375626d697420766f7465732e5050726573656e74536c617368506572566f746572010028543a3a42616c616e63654001000000000000000000000000000000040d01205468652070756e6973686d656e742c2070657220766f7465722c20696620796f752070726f7669646520616e20696e76616c69642070726573656e746174696f6e2e284361727279436f756e7401000c753332100200000004350120486f77206d616e792072756e6e6572732d75702073686f756c64206861766520746865697220617070726f76616c73207065727369737420756e74696c20746865206e65787420766f74652e5050726573656e746174696f6e4475726174696f6e010038543a3a426c6f636b4e756d62657220e803000000000000043d0120486f77206c6f6e6720746f2067697665206561636820746f702063616e64696461746520746f2070726573656e74207468656d73656c7665732061667465722074686520766f746520656e64732e4c496e6163746976654772616365506572696f64010024566f7465496e646578100100000008a10120486f77206d616e7920766f746520696e6465786573206e65656420746f20676f20627920616674657220612074617267657420766f7465722773206c61737420766f7465206265666f726520746865792063616e206265207265617065642069662074686569725020617070726f76616c7320617265206d6f6f742e30566f74696e67506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e305465726d4475726174696f6e010038543a3a426c6f636b4e756d626572200500000000000000049820486f77206c6f6e67206561636820706f736974696f6e2069732061637469766520666f722e3044657369726564536561747301000c753332100000000004e8204e756d626572206f66206163636f756e747320746861742073686f756c642062652073697474696e67206f6e2074686520636f756e63696c2e34416374697665436f756e63696c01008c5665633c28543a3a4163636f756e7449642c20543a3a426c6f636b4e756d626572293e0400106d01205468652063757272656e7420636f756e63696c2e205768656e2074686572652773206120766f746520676f696e67206f6e2c20746869732073686f756c64207374696c6c206265207573656420666f72206578656375746976657101206d6174746572732e2054686520626c6f636b206e756d62657220287365636f6e6420656c656d656e7420696e20746865207475706c65292069732074686520626c6f636b207468617420746865697220706f736974696f6e20697371012061637469766520756e74696c202863616c63756c61746564206279207468652073756d206f662074686520626c6f636b206e756d626572207768656e2074686520636f756e63696c206d656d6265722077617320656c65637465646820616e64207468656972207465726d206475726174696f6e292e24566f7465436f756e74010024566f7465496e64657810000000000405012054686520746f74616c206e756d626572206f6620766f746573207468617420686176652068617070656e6564206f722061726520696e2070726f67726573732e2c417070726f76616c734f66010130543a3a4163636f756e744964245665633c626f6f6c3e0400086d012041206c697374206f6620766f74657320666f72206561636820766f7465722c2072657370656374696e6720746865206c61737420636c656172656420766f746520696e6465782074686174207468697320766f7465722077617340206c617374206163746976652061742e385265676973746572496e666f4f66000130543a3a4163636f756e7449644028566f7465496e6465782c20753332290400087d012054686520766f746520696e64657820616e64206c69737420736c6f742074686174207468652063616e646964617465206077686f60207761732072656769737465726564206f7220604e6f6e6560206966207468657920617265206e6f74582063757272656e746c7920726567697374657265642e304c6173744163746976654f66000130543a3a4163636f756e74496424566f7465496e646578040004010120546865206c61737420636c656172656420766f746520696e6465782074686174207468697320766f74657220776173206c617374206163746976652061742e18566f746572730100445665633c543a3a4163636f756e7449643e04000460205468652070726573656e7420766f746572206c6973742e2843616e646964617465730100445665633c543a3a4163636f756e7449643e04000470205468652070726573656e742063616e646964617465206c6973742e3843616e646964617465436f756e7401000c753332100000000000304e65787446696e616c6973650000a028543a3a426c6f636b4e756d6265722c207533322c205665633c543a3a4163636f756e7449643e29040004210120546865206163636f756e747320686f6c64696e672074686520736561747320746861742077696c6c206265636f6d652066726565206f6e20746865206e6578742074616c6c792e40536e617073686f7465645374616b657301003c5665633c543a3a42616c616e63653e040004e820546865207374616b6573206173207468657920776572652061742074686520706f696e7420746861742074686520766f746520656e6465642e2c4c6561646572626f61726400007c5665633c28543a3a42616c616e63652c20543a3a4163636f756e744964293e040004e02047657420746865206c6561646572626f6172642069662077653b726520696e207468652070726573656e746174696f6e2070686173652e38636f756e63696c5f766f74696e67184d6f64756c651043616c6c1400001c70726f706f7365042070726f706f73616c40426f783c543a3a50726f706f73616c3e00010010766f7465082070726f706f73616c1c543a3a486173681c617070726f766510626f6f6c000200107665746f043470726f706f73616c5f686173681c543a3a48617368000300487365745f636f6f6c6f66665f706572696f640418626c6f636b73903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065000400447365745f766f74696e675f706572696f640418626c6f636b73903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065000134436f756e63696c566f74696e672034436f6f6c6f6666506572696f64010038543a3a426c6f636b4e756d62657220e8030000000000000030566f74696e67506572696f64010038543a3a426c6f636b4e756d6265722003000000000000000040456e61637444656c6179506572696f64010038543a3a426c6f636b4e756d62657220000000000000000004cd01204e756d626572206f6620626c6f636b7320627920776869636820746f2064656c617920656e6163746d656e74206f66207375636365737366756c2c206e6f6e2d756e616e696d6f75732d636f756e63696c2d696e7374696761746564207265666572656e64756d2070726f706f73616c732e2450726f706f73616c730100785665633c28543a3a426c6f636b4e756d6265722c20543a3a48617368293e0400002850726f706f73616c4f6600011c543a3a486173682c543a3a50726f706f73616c0400003850726f706f73616c566f7465727301011c543a3a48617368445665633c543a3a4163636f756e7449643e04000034436f756e63696c566f74654f6600015c28543a3a486173682c20543a3a4163636f756e7449642910626f6f6c040000385665746f656450726f706f73616c00011c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290400003c636f756e63696c5f6d6f74696f6e73184d6f64756c651043616c6c0800001c70726f706f736508247468726573686f6c6430436f6d706163743c7533323e2070726f706f73616c6c426f783c3c542061732054726169743e3a3a50726f706f73616c3e00010010766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c000138436f756e63696c4d6f74696f6e73102450726f706f73616c730100305665633c543a3a486173683e04000498205468652028686173686573206f662920746865206163746976652070726f706f73616c732e2850726f706f73616c4f6600011c543a3a48617368583c542061732054726169743e3a3a50726f706f73616c040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e6700011c543a3a48617368e82850726f706f73616c496e6465782c207533322c205665633c543a3a4163636f756e7449643e2c205665633c543a3a4163636f756e7449643e29040004250120566f74657320666f72206120676976656e2070726f706f73616c3a202872657175697265645f7965735f766f7465732c207965735f766f746572732c206e6f5f766f74657273292e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c6772616e647061184d6f64756c651043616c6c040000487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0468205265706f727420736f6d65206d69736265686176696f75722e013c4772616e64706146696e616c697479043450656e64696e674368616e67650000c853746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265722c20543a3a53657373696f6e4b65793e040000207472656173757279184d6f64756c651043616c6c1400003470726f706f73655f7370656e64081476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a547970652c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c2d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e01001c7365745f706f74041c6e65775f706f74803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706504b420536574207468652062616c616e6365206f662066756e647320617661696c61626c6520746f207370656e642e020024636f6e666967757265103470726f706f73616c5f626f6e641c5065726d696c6c5470726f706f73616c5f626f6e645f6d696e696d756d803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065307370656e645f706572696f64903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065106275726e1c5065726d696c6c0470202852652d29636f6e6669677572652074686973206d6f64756c652e03003c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e04fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e040040617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e085d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e01205472656173757279203050726f706f73616c426f6e6401001c5065726d696c6c10000000000851012050726f706f7274696f6e206f662066756e647320746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c61636520612070726f706f73616c2e20416e206163636570746564dc2070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f65736e27742e4c50726f706f73616c426f6e644d696e696d756d010028543a3a42616c616e63654000000000000000000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f64010038543a3a426c6f636b4e756d626572200100000000000000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e01001c5065726d696c6c10000000000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e0c506f74010028543a3a42616c616e6365400000000000000000000000000000000004cc20546f74616c2066756e647320617661696c61626c6520746f2074686973206d6f64756c6520666f72207370656e64696e672e3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c7300013450726f706f73616c496e6465788850726f706f73616c3c543a3a4163636f756e7449642c20543a3a42616c616e63653e0400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e20636f6e7472616374184d6f64756c651043616c6c0800001063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065246761735f6c696d6974703c543a3a47617320617320486173436f6d706163743e3a3a5479706510646174611c5665633c75383e082901204d616b6520612063616c6c20746f206120737065636966696564206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e2901204d616b6520612063616c6c20746f206120737065636966696564206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e0100186372656174651024656e646f776d656e74803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065246761735f6c696d6974703c543a3a47617320617320486173436f6d706163743e3a3a547970652463746f725f636f64651c5665633c75383e10646174611c5665633c75383e244d01204372656174652061206e657720636f6e74726163742c206f7074696f6e616c6c79207472616e73666572696e6720736f6d652062616c616e636520746f207468652063726561746564206163636f756e742e0084204372656174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d207468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652eb8202d206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20746865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792063726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564b420202075706f6e20616e79206d6573736167652072656365697665642062792074686973206163636f756e742e00107375646f184d6f64756c651043616c6c080000107375646f042070726f706f73616c40426f783c543a3a50726f706f73616c3e0001001c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650001105375646f040c4b6579010030543a3a4163636f756e744964800000000000000000000000000000000000000000000000000000000000000000001043616c6c382454696d657374616d702474696d657374616d70000024436f6e73656e73757324636f6e73656e73757301001c496e64696365731c696e646963657302002042616c616e6365732062616c616e63657303001c53657373696f6e1c73657373696f6e04001c5374616b696e671c7374616b696e6705002444656d6f63726163792464656d6f637261637906001c436f756e63696c1c636f756e63696c070034436f756e63696c566f74696e6738636f756e63696c5f766f74696e67080038436f756e63696c4d6f74696f6e733c636f756e63696c5f6d6f74696f6e7309001c4772616e6470611c6772616e6470610a002054726561737572792074726561737572790b0020436f6e747261637420636f6e74726163740c00105375646f107375646f0d00'; +import meta from './v1/static'; -// Export the latest RPC response for metadata export default meta; diff --git a/packages/types/src/Metadata/types.ts b/packages/types/src/Metadata/types.ts new file mode 100644 index 0000000000..f4fd430ac4 --- /dev/null +++ b/packages/types/src/Metadata/types.ts @@ -0,0 +1,7 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export interface MetadataInterface { + getUniqTypes (): Array; +} diff --git a/packages/types/src/Metadata/util/flattenUniq.ts b/packages/types/src/Metadata/util/flattenUniq.ts new file mode 100644 index 0000000000..0c3fbdb244 --- /dev/null +++ b/packages/types/src/Metadata/util/flattenUniq.ts @@ -0,0 +1,18 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +// Quick and dirty flatten (.flat() not available) +export default function flattenUniq (list: Array): Array { + const flat = list.reduce((result, entry) => { + return result.concat( + Array.isArray(entry) + ? flattenUniq(entry) + : entry + ); + }, []); + + return [...new Set(flat)] + .filter((value: any) => value) + .sort(); +} diff --git a/packages/types/src/Metadata/util/index.ts b/packages/types/src/Metadata/util/index.ts new file mode 100644 index 0000000000..ebc1c56f00 --- /dev/null +++ b/packages/types/src/Metadata/util/index.ts @@ -0,0 +1,6 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export { default as flattenUniq } from './flattenUniq'; +export { default as validateTypes } from './validateTypes'; diff --git a/packages/types/src/Metadata/util/validateTypes.ts b/packages/types/src/Metadata/util/validateTypes.ts new file mode 100644 index 0000000000..e5dba42a90 --- /dev/null +++ b/packages/types/src/Metadata/util/validateTypes.ts @@ -0,0 +1,41 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { assert, isUndefined } from '@polkadot/util'; + +import { getTypeDef, TypeDef, TypeDefInfo } from '../../codec/createType'; +import flattenUniq from './flattenUniq'; + +export default function validateTypes (types: Array): void { + const extractTypes = (types: Array): Array => { + return types.map((type) => { + const decoded = getTypeDef(type); + + switch (decoded.info) { + case TypeDefInfo.Plain: + return decoded.type; + + case TypeDefInfo.Compact: + case TypeDefInfo.Option: + case TypeDefInfo.Vector: + return extractTypes([(decoded.sub as TypeDef).type]); + + case TypeDefInfo.Tuple: + return extractTypes( + (decoded.sub as Array).map((sub) => sub.type) + ); + + default: + throw new Error('Unreachable'); + } + }); + }; + + const allTypes = require('../../index'); + const missing = flattenUniq(extractTypes(types)).filter((type) => + isUndefined(allTypes[type]) + ); + + assert(missing.length === 0, `Unknown types found, no types for ${missing}`); +} diff --git a/packages/types/src/Metadata/Calls.ts b/packages/types/src/Metadata/v0/Calls.ts similarity index 89% rename from packages/types/src/Metadata/Calls.ts rename to packages/types/src/Metadata/v0/Calls.ts index 8af2091156..92c3755cc1 100644 --- a/packages/types/src/Metadata/Calls.ts +++ b/packages/types/src/Metadata/v0/Calls.ts @@ -2,10 +2,10 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import Struct from '../codec/Struct'; -import Vector from '../codec/Vector'; -import Text from '../Text'; -import U16 from '../U16'; +import Struct from '../../codec/Struct'; +import Vector from '../../codec/Vector'; +import Text from '../../Text'; +import U16 from '../../U16'; export class OuterDispatchCall extends Struct { constructor (value?: any) { diff --git a/packages/types/src/Metadata/Events.ts b/packages/types/src/Metadata/v0/Events.ts similarity index 90% rename from packages/types/src/Metadata/Events.ts rename to packages/types/src/Metadata/v0/Events.ts index 4102955685..37f145d243 100644 --- a/packages/types/src/Metadata/Events.ts +++ b/packages/types/src/Metadata/v0/Events.ts @@ -2,11 +2,11 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import Struct from '../codec/Struct'; -import Tuple from '../codec/Tuple'; -import Vector from '../codec/Vector'; -import Text from '../Text'; -import Type from '../Type'; +import Struct from '../../codec/Struct'; +import Tuple from '../../codec/Tuple'; +import Vector from '../../codec/Vector'; +import Text from '../../Text'; +import Type from '../../Type'; export class EventMetadata extends Struct { constructor (value?: any) { diff --git a/packages/types/src/Metadata/v0/Metadata.spec.ts b/packages/types/src/Metadata/v0/Metadata.spec.ts new file mode 100644 index 0000000000..d0cddbd9f4 --- /dev/null +++ b/packages/types/src/Metadata/v0/Metadata.spec.ts @@ -0,0 +1,45 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import extrinsicsFromMeta from '@polkadot/extrinsics/fromMetadata'; + +import createType from '../../codec/createType'; +import Method from '../../Method'; + +import Metadata from './index'; +import latestParsed from './latest.substrate.json'; +import rpcData from './static'; + +describe('Metadata', () => { + it('decodes latest properly', () => { + const metadata = new Metadata(rpcData); + const str = JSON.stringify(metadata.toJSON()); + + console.error(str); + console.error(metadata.getUniqTypes()); + + expect(metadata.events.length).not.toBe(0); + expect(str).toEqual(JSON.stringify(latestParsed)); + }); + + describe('storage with default values', () => { + const metadata = new Metadata(rpcData); + + Method.injectMethods(extrinsicsFromMeta(metadata)); + + metadata.modules.forEach((mod) => { + if (mod.storage.isNone) { + return; + } + + mod.storage.unwrap().functions.forEach((fn) => { + it(`creates default types for ${mod.prefix}.${fn.name}, type ${fn.type}`, () => { + expect( + () => createType(fn.type.toString(), fn.default) + ).not.toThrow(); + }); + }); + }); + }); +}); diff --git a/packages/types/src/Metadata/Modules.ts b/packages/types/src/Metadata/v0/Modules.ts similarity index 94% rename from packages/types/src/Metadata/Modules.ts rename to packages/types/src/Metadata/v0/Modules.ts index cd3ee4b547..9ddecf720e 100644 --- a/packages/types/src/Metadata/Modules.ts +++ b/packages/types/src/Metadata/v0/Modules.ts @@ -2,17 +2,17 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { AnyNumber } from '../types'; +import { AnyNumber } from '../../types'; -import Bytes from '../Bytes'; -import Enum from '../codec/Enum'; -import EnumType from '../codec/EnumType'; -import Option from '../codec/Option'; -import Struct from '../codec/Struct'; -import Vector from '../codec/Vector'; -import Text from '../Text'; -import Type from '../Type'; -import U16 from '../U16'; +import Bytes from '../../Bytes'; +import Enum from '../../codec/Enum'; +import EnumType from '../../codec/EnumType'; +import Option from '../../codec/Option'; +import Struct from '../../codec/Struct'; +import Vector from '../../codec/Vector'; +import Text from '../../Text'; +import Type from '../../Type'; +import U16 from '../../U16'; export class FunctionArgumentMetadata extends Struct { constructor (value?: any) { diff --git a/packages/types/src/Metadata/v0/index.ts b/packages/types/src/Metadata/v0/index.ts new file mode 100644 index 0000000000..d77f402df1 --- /dev/null +++ b/packages/types/src/Metadata/v0/index.ts @@ -0,0 +1,116 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { MetadataInterface } from '../types'; + +import { hexToU8a, isHex, isU8a } from '@polkadot/util'; + +import Compact from '../../codec/Compact'; +import Struct from '../../codec/Struct'; +import Vector from '../../codec/Vector'; +import { flattenUniq, validateTypes } from '../util'; +import { OuterDispatchMetadata, OuterDispatchCall } from './Calls'; +import { OuterEventMetadata, OuterEventMetadataEvent } from './Events'; +import { RuntimeModuleMetadata } from './Modules'; + +// Decodes the runtime metadata as passed through from the `state_getMetadata` call. This +// file is probably best understood from the bottom-up, i.e. start reading right at the +// end and work up. (Just so we don't use before definition) + +/** + * @name MetadataV0 + * @description + * The runtime metadata as a decoded structure + */ +export default class MetadataV0 extends Struct implements MetadataInterface { + constructor (value?: any) { + super({ + outerEvent: OuterEventMetadata, + modules: Vector.with(RuntimeModuleMetadata), + outerDispatch: OuterDispatchMetadata + }, MetadataV0.decodeMetadata(value)); + } + + static decodeMetadata (value: string | Uint8Array | object): object | Uint8Array { + if (isHex(value)) { + // We receive this as an hex in the JSON output from the Node. + // Convert to u8a and use the U8a version to do the actual parsing. + return MetadataV0.decodeMetadata(hexToU8a(value)); + } else if (isU8a(value)) { + // HACK 13 Oct 2018 - For current running BBQ nodes, Metadata is not properly + // encoded, it does not have a length prefix. For latest substrate master, it + // is properly encoded. Here we pull the prefix, check it agianst the length - + // if matches, then we have the length, otherwise we assume it is an older node + // and use the whole buffer + const [offset, length] = Compact.decodeU8a(value); + + return value.length === (offset + length.toNumber()) + ? value.subarray(offset) + : value; + } + + // Decode as normal struct + return value; + } + + /** + * @description Wrapped [[OuterDispatchCall]] + */ + get calls (): Vector { + return (this.get('outerDispatch') as OuterDispatchMetadata).calls; + } + + /** + * @description Wrapped [[OuterEventMetadataEvent]] + */ + get events (): Vector { + return (this.get('outerEvent') as OuterEventMetadata).events; + } + + /** + * @description Wrapped [[RuntimeModuleMetadata]] + */ + get modules (): Vector { + return this.get('modules') as Vector; + } + + private get argNames () { + return this.modules.map((module) => + module.module.call.functions.map((fn) => + fn.arguments.map((argument) => argument.type.toString()) + ) + ); + } + + private get eventNames () { + return this.events.map((module) => + module.events.map((event) => + event.arguments.map((argument) => argument.toString()) + ) + ); + } + + private get storageNames () { + return this.modules.map((module) => + module.storage.isSome + ? module.storage.unwrap().functions.map((fn) => + fn.type.isMap + ? [fn.type.asMap.key.toString(), fn.type.asMap.value.toString()] + : [fn.type.asType.toString()] + ) + : [] + ); + } + + /** + * @description Helper to retrieve a list of all type that are found, sorted and de-deuplicated + */ + getUniqTypes (): Array { + const types = flattenUniq([this.argNames, this.eventNames, this.storageNames]); + + validateTypes(types); + + return types; + } +} diff --git a/packages/types/src/Metadata/latest.polkadot.json b/packages/types/src/Metadata/v0/latest.polkadot.json similarity index 100% rename from packages/types/src/Metadata/latest.polkadot.json rename to packages/types/src/Metadata/v0/latest.polkadot.json diff --git a/packages/types/src/Metadata/latest.substrate.json b/packages/types/src/Metadata/v0/latest.substrate.json similarity index 100% rename from packages/types/src/Metadata/latest.substrate.json rename to packages/types/src/Metadata/v0/latest.substrate.json diff --git a/packages/types/src/Metadata/v0/static.ts b/packages/types/src/Metadata/v0/static.ts new file mode 100644 index 0000000000..b7a7edeb78 --- /dev/null +++ b/packages/types/src/Metadata/v0/static.ts @@ -0,0 +1,8 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +const meta = '0x144576656e74341873797374656d084045787472696e7369635375636365737300049420416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c656400045420416e2065787472696e736963206661696c65642e1c696e6469636573043c4e65774163636f756e74496e64657808244163636f756e744964304163636f756e74496e646578046c2041206e6577206163636f756e742077617320637265617465642e2062616c616e6365730c284e65774163636f756e7408244163636f756e7449641c42616c616e6365046c2041206e6577206163636f756e742077617320637265617465642e345265617065644163636f756e7404244163636f756e744964045c20416e206163636f756e7420776173207265617065642e205472616e7366657210244163636f756e744964244163636f756e7449641c42616c616e63651c42616c616e636504b0205472616e7366657220737563636565646564202866726f6d2c20746f2c2076616c75652c2066656573292e1c73657373696f6e04284e657753657373696f6e042c426c6f636b4e756d626572085501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e1c7374616b696e670c18526577617264041c42616c616e636504e020416c6c2076616c696461746f72732068617665206265656e2072657761726465642062792074686520676976656e2062616c616e63652e384f66666c696e655761726e696e6708244163636f756e7449640c753332085501204f6e652076616c696461746f722028616e64207468656972206e6f6d696e61746f72732920686173206265656e20676976656e2061206f66666c696e652d7761726e696e67202874686579277265207374696c6c15012077697468696e207468656972206772616365292e205468652061636372756564206e756d626572206f6620736c6173686573206973207265636f726465642c20746f6f2e304f66666c696e65536c61736808244163636f756e7449641c42616c616e6365042d01204f6e652076616c696461746f722028616e64207468656972206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e2464656d6f637261637918185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e001c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c640018506173736564043c5265666572656e64756d496e64657800244e6f74506173736564043c5265666572656e64756d496e646578002443616e63656c6c6564043c5265666572656e64756d496e64657800204578656375746564083c5265666572656e64756d496e64657810626f6f6c001c636f756e63696c102c566f74657252656170656408244163636f756e744964244163636f756e74496404542072656170656420766f7465722c2072656170657240426164526561706572536c617368656404244163636f756e744964043c20736c6173686564207265617065723054616c6c7953746172746564040c75333204f420412074616c6c792028666f7220617070726f76616c20766f746573206f6620636f756e63696c2073656174287329292068617320737461727465642e3854616c6c7946696e616c6973656408385665633c4163636f756e7449643e385665633c4163636f756e7449643e04690120412074616c6c792028666f7220617070726f76616c20766f746573206f6620636f756e63696c2073656174287329292068617320656e646564202877697468206f6e65206f72206d6f7265206e6577206d656d62657273292e38636f756e63696c5f766f74696e67084054616c6c7943616e63656c6174696f6e1010486173680c7533320c7533320c753332080101204120766f74696e672074616c6c79206861732068617070656e656420666f722061207265666572656e64756d2063616e63656c6c6174696f6e20766f74652ea0204c61737420746872656520617265207965732c206e6f2c206162737461696e20636f756e74732e3c54616c6c795265666572656e64756d1010486173680c7533320c7533320c75333208cc204120766f74696e672074616c6c79206861732068617070656e656420666f722061207265666572656e64756d20766f74652ea0204c61737420746872656520617265207965732c206e6f2c206162737461696e20636f756e74732e3c636f756e63696c5f6d6f74696f6e73142050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173680c7533320465012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e20753332292e14566f74656414244163636f756e744964104861736810626f6f6c0c7533320c7533320809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67f420612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e206173207533327320726573706563746976656c79292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e1c6772616e64706104384e6577417574686f72697469657304585665633c2853657373696f6e4b65792c20753634293e0490204e657720617574686f726974792073657420686173206265656e206170706c6965642e207472656173757279142050726f706f736564043450726f706f73616c496e6465780438204e65772070726f706f73616c2e205370656e64696e67041c42616c616e636504e8205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964048020536f6d652066756e64732068617665206265656e20616c6c6f63617465642e144275726e74041c42616c616e6365048c20536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572041c42616c616e6365043101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e20636f6e747261637408205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e6365047501205472616e736665722068617070656e6564206066726f6d60202d3e2060746f60207769746820676976656e206076616c7565602061732070617274206f66206120606d6573736167652d63616c6c60206f722060637265617465602e1c4372656174656408244163636f756e744964244163636f756e74496404dc20436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e107375646f081453756469640410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e284b65794368616e67656404244163636f756e74496404f020546865207375646f6572206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e401873797374656d184d6f64756c651043616c6c00011853797374656d28304163636f756e744e6f6e6365010130543a3a4163636f756e74496420543a3a496e646578200000000000000000003845787472696e736963436f756e7400000c75333204000024426c6f636b48617368010138543a3a426c6f636b4e756d6265721c543a3a48617368800000000000000000000000000000000000000000000000000000000000000000003445787472696e7369634461746101010c7533321c5665633c75383e0400002852616e646f6d5365656401001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000000184e756d626572010038543a3a426c6f636b4e756d626572200000000000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a48617368800000000000000000000000000000000000000000000000000000000000000000003845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000018446967657374010024543a3a446967657374040000184576656e74730100685665633c4576656e745265636f72643c543a3a4576656e743e3e0400001061757261184d6f64756c651043616c6c00002474696d657374616d70184d6f64756c651043616c6c0400000c736574040c6e6f777c3c543a3a4d6f6d656e7420617320486173436f6d706163743e3a3a54797065205820536574207468652063757272656e742074696d652e0055012045787472696e736963207769746820746869732063616c6c2073686f756c6420626520706c616365642061742074686520737065636966696320706f736974696f6e20696e20746865206561636820626c6f636b6d012028737065636966696564206279207468652054726169743a3a54494d455354414d505f5345545f504f534954494f4e29207479706963616c6c7920617420746865207374617274206f6620746865206561636820626c6f636b2e750120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6e2070686173652cbc20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e008501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062792060626c6f636b5f706572696f64602e012454696d657374616d700c0c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e2c426c6f636b506572696f64010024543a3a4d6f6d656e7420050000000000000004c420546865206d696e696d756d2028616e6420616476697365642920706572696f64206265747765656e20626c6f636b732e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f24636f6e73656e737573184d6f64756c651043616c6c180000487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0468205265706f727420736f6d65206d69736265686176696f75722e0100306e6f74655f6f66666c696e65041c6f66666c696e65f43c543a3a496e686572656e744f66666c696e655265706f727420617320496e686572656e744f66666c696e655265706f72743e3a3a496e686572656e74044501204e6f7465207468652070726576696f757320626c6f636b27732076616c696461746f72206d6973736564207468656972206f70706f7274756e69747920746f2070726f706f7365206120626c6f636b2e02001872656d61726b041c5f72656d61726b1c5665633c75383e046c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e0300387365745f686561705f7061676573041470616765730c75363404fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e0400207365745f636f6465040c6e65771c5665633c75383e04482053657420746865206e657720636f64652e05002c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e046c2053657420736f6d65206974656d73206f662073746f726167652e0124436f6e73656e737573044c4f726967696e616c417574686f7269746965730000485665633c543a3a53657373696f6e4b65793e0400001c696e6469636573184d6f64756c651043616c6c00011c496e6469636573082c4e657874456e756d53657401003c543a3a4163636f756e74496e6465781000000000047c20546865206e657874206672656520656e756d65726174696f6e207365742e1c456e756d53657401013c543a3a4163636f756e74496e646578445665633c543a3a4163636f756e7449643e040004582054686520656e756d65726174696f6e20736574732e2062616c616e636573184d6f64756c651043616c6c080000207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706504d4205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572207374616b65722e01002c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651066726565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065207265736572766564803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065049420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e012042616c616e6365732034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004a42054686520746f74616c20616d6f756e74206f66207374616b65206f6e207468652073797374656d2e484578697374656e7469616c4465706f736974010028543a3a42616c616e6365400000000000000000000000000000000004d020546865206d696e696d756d20616d6f756e7420616c6c6f77656420746f206b65657020616e206163636f756e74206f70656e2e2c5472616e73666572466565010028543a3a42616c616e636540000000000000000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e466565010028543a3a42616c616e63654000000000000000000000000000000000042501205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e204174206c6561737420617320626967206173205265636c61696d5265626174652e2c4672656542616c616e6365010130543a3a4163636f756e74496428543a3a42616c616e636540000000000000000000000000000000002c9c20546865202766726565272062616c616e6365206f66206120676976656e206163636f756e742e004d01205468697320697320746865206f6e6c792062616c616e63652074686174206d61747465727320696e207465726d73206f66206d6f7374206f7065726174696f6e73206f6e20746f6b656e732e204974206973690120616c6f6e65207573656420746f2064657465726d696e65207468652062616c616e6365207768656e20696e2074686520636f6e747261637420657865637574696f6e20656e7669726f6e6d656e742e205768656e207468697355012062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e20746865202763757272656e74206163636f756e74272069733d012064656c657465643a207370656369666963616c6c7920604672656542616c616e6365602e20467572746865726d6f72652c20604f6e4672656542616c616e63655a65726f602063616c6c6261636b410120697320696e766f6b65642c20676976696e672061206368616e636520746f2065787465726e616c206d6f64756c657320746f20636c65616e75702064617461206173736f636961746564207769746854207468652064656c65746564206163636f756e742e005d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c657465642069662060526573657276656442616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e3c526573657276656442616c616e6365010130543a3a4163636f756e74496428543a3a42616c616e636540000000000000000000000000000000003075012054686520616d6f756e74206f66207468652062616c616e6365206f66206120676976656e206163636f756e7420746861742069732065787465726e616c6c792072657365727665643b20746869732063616e207374696c6c206765749c20736c61736865642c20627574206765747320736c6173686564206c617374206f6620616c6c2e006d0120546869732062616c616e63652069732061202772657365727665272062616c616e63652074686174206f746865722073756273797374656d732075736520696e206f7264657220746f2073657420617369646520746f6b656e737101207468617420617265207374696c6c20276f776e65642720627920746865206163636f756e7420686f6c6465722c20627574207768696368206172652073757370656e6461626c652e20285468697320697320646966666572656e74290120616e642077686f6c6c7920756e72656c6174656420746f207468652060426f6e64616765602073797374656d207573656420696e20746865207374616b696e67206d6f64756c652e29007501205768656e20746869732062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e2074686973202772657365727665206163636f756e7427b42069732064656c657465643a207370656369666963616c6c792c2060526573657276656442616c616e6365602e004d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c6574656420696620604672656542616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e485472616e73616374696f6e42617365466565010028543a3a42616c616e6365400000000000000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e42797465466565010028543a3a42616c616e63654000000000000000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e1c73657373696f6e184d6f64756c651043616c6c0c00001c7365745f6b6579040c6b657934543a3a53657373696f6e4b65790861012053657473207468652073657373696f6e206b6579206f6620605f76616c696461746f726020746f20605f6b6579602e205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e657874242073657373696f6e2e0100287365745f6c656e677468040c6e6577903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065046d01205365742061206e65772073657373696f6e206c656e6774682e20576f6e2774206b69636b20696e20756e74696c20746865206e6578742073657373696f6e206368616e6765202861742063757272656e74206c656e677468292e020044666f7263655f6e65775f73657373696f6e04346170706c795f7265776172647310626f6f6c045820466f726365732061206e65772073657373696f6e2e011c53657373696f6e202856616c696461746f72730100445665633c543a3a4163636f756e7449643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3453657373696f6e4c656e677468010038543a3a426c6f636b4e756d62657220e803000000000000047c2043757272656e74206c656e677468206f66207468652073657373696f6e2e3043757272656e74496e646578010038543a3a426c6f636b4e756d62657220000000000000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e3043757272656e745374617274010024543a3a4d6f6d656e7420000000000000000004a02054696d657374616d70207768656e2063757272656e742073657373696f6e20737461727465642e44466f7263696e674e657753657373696f6e000010626f6f6c0400087901204e65772073657373696f6e206973206265696e6720666f72636564206973207468697320656e747279206578697374733b20696e20776869636820636173652c2074686520626f6f6c65616e2076616c75652069732077686574686572810120746865206e65772073657373696f6e2073686f756c6420626520636f6e736964657265642061206e6f726d616c20726f746174696f6e202872657761726461626c6529206f7220657863657074696f6e616c2028736c61736861626c65292e404c6173744c656e6774684368616e6765000038543a3a426c6f636b4e756d626572040004c020426c6f636b206174207768696368207468652073657373696f6e206c656e677468206c617374206368616e6765642e284e6578744b6579466f72000130543a3a4163636f756e74496434543a3a53657373696f6e4b65790400049020546865206e657874206b657920666f72206120676976656e2076616c696461746f722e444e65787453657373696f6e4c656e677468000038543a3a426c6f636b4e756d6265720400046420546865206e6578742073657373696f6e206c656e6774682e1c7374616b696e67184d6f64756c651043616c6c2c0000147374616b65000cc0204465636c617265207468652064657369726520746f207374616b6520666f7220746865207472616e736163746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e01001c756e7374616b650440696e74656e74696f6e735f696e64657830436f6d706163743c7533323e0cc02052657472616374207468652064657369726520746f207374616b6520666f7220746865207472616e736163746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e0200206e6f6d696e61746504187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500030028756e6e6f6d696e61746504307461726765745f696e64657830436f6d706163743c7533323e0811012057696c6c2070616e69632069662063616c6c6564207768656e20736f757263652069736e27742063757272656e746c79206e6f6d696e6174696e67207461726765742ee42055706461746573204e6f6d696e6174696e672c204e6f6d696e61746f7273466f7220616e64204e6f6d696e6174696f6e42616c616e63652e04005072656769737465725f707265666572656e6365730840696e74656e74696f6e735f696e64657830436f6d706163743c7533323e1470726566736856616c696461746f7250726566733c543a3a42616c616e63653e0c5901205365742074686520676976656e206163636f756e74277320707265666572656e636520666f7220736c617368696e67206265686176696f75722073686f756c64207468657920626520612076616c696461746f722e00190120416e206572726f7220286e6f2d6f7029206966206053656c663a3a696e74656e74696f6e7328295b696e74656e74696f6e735f696e6465785d20213d206f726967696e602e0500507365745f73657373696f6e735f7065725f657261040c6e6577903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706504982053657420746865206e756d626572206f662073657373696f6e7320696e20616e206572612e0600507365745f626f6e64696e675f6475726174696f6e040c6e6577903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706504b020546865206c656e677468206f662074686520626f6e64696e67206475726174696f6e20696e20657261732e07004c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e04802054686520696465616c206e756d626572206f662076616c696461746f72732e080034666f7263655f6e65775f65726104346170706c795f7265776172647310626f6f6c083d0120466f72636520746865726520746f2062652061206e6577206572612e205468697320616c736f20666f726365732061206e65772073657373696f6e20696d6d6564696174656c792061667465722e250120606170706c795f72657761726473602073686f756c64206265207472756520666f722076616c696461746f727320746f20676574207468652073657373696f6e207265776172642e09005c7365745f6f66666c696e655f736c6173685f6772616365040c6e657730436f6d706163743c7533323e04902053657420746865206f66666c696e6520736c61736820677261636520706572696f642e0a00447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e04cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e011c5374616b696e67583856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321004000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e3853657373696f6e73506572457261010038543a3a426c6f636b4e756d62657220e80300000000000004a420546865206c656e677468206f662061207374616b696e672065726120696e2073657373696f6e732e3453657373696f6e52657761726401001c50657262696c6c103c000000042101204d6178696d756d207265776172642c207065722076616c696461746f722c20746861742069732070726f7669646564207065722061636365707461626c652073657373696f6e2e304f66666c696e65536c61736801001c50657262696c6c1040420f0004510120536c6173682c207065722076616c696461746f7220746861742069732074616b656e20666f72207468652066697273742074696d6520746865792061726520666f756e6420746f206265206f66666c696e652e444f66666c696e65536c617368477261636501000c7533321000000000043901204e756d626572206f6620696e7374616e636573206f66206f66666c696e65207265706f727473206265666f726520736c617368696e6720626567696e7320666f722076616c696461746f72732e3c426f6e64696e674475726174696f6e010038543a3a426c6f636b4e756d62657220e80300000000000004b820546865206c656e677468206f662074686520626f6e64696e67206475726174696f6e20696e20626c6f636b732e30496e76756c657261626c65730100445665633c543a3a4163636f756e7449643e040008a50120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c65206b69636b65642e20497427732061205665632073696e63652074686579277265206561737920746f20696e697469616c697365ad0120616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f757220696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e2843757272656e74457261010038543a3a426c6f636b4e756d626572200000000000000000045c205468652063757272656e742065726120696e6465782e5056616c696461746f72507265666572656e636573010130543a3a4163636f756e7449646856616c696461746f7250726566733c543a3a42616c616e63653e080c00048820507265666572656e636573207468617420612076616c696461746f72206861732e28496e74656e74696f6e730100445665633c543a3a4163636f756e7449643e040004a420416c6c20746865206163636f756e7473207769746820612064657369726520746f207374616b652e284e6f6d696e6174696e67000130543a3a4163636f756e74496430543a3a4163636f756e744964040004a020416c6c206e6f6d696e61746f72202d3e206e6f6d696e65652072656c6174696f6e73686970732e344e6f6d696e61746f7273466f72010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e04000494204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e742e5043757272656e744e6f6d696e61746f7273466f72010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e0400040501204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e74207468617420697320696e20616374696f6e207269676874206e6f772e5043757272656e7453657373696f6e526577617264010028543a3a42616c616e63654000000000000000000000000000000000042101204d6178696d756d207265776172642c207065722076616c696461746f722c20746861742069732070726f7669646564207065722061636365707461626c652073657373696f6e2e4c43757272656e744f66666c696e65536c617368010028543a3a42616c616e6365400000000000000000000000000000000004510120536c6173682c207065722076616c696461746f7220746861742069732074616b656e20666f72207468652066697273742074696d6520746865792061726520666f756e6420746f206265206f66666c696e652e484e65787453657373696f6e73506572457261000038543a3a426c6f636b4e756d6265720400049020546865206e6578742076616c7565206f662073657373696f6e7320706572206572612e4c4c6173744572614c656e6774684368616e6765010038543a3a426c6f636b4e756d62657220000000000000000004e0205468652073657373696f6e20696e6465782061742077686963682074686520657261206c656e677468206c617374206368616e6765642e285374616b6552616e6765010048506169724f663c543a3a42616c616e63653e80000000000000000000000000000000000000000000000000000000000000000004f020546865206869676865737420616e64206c6f77657374207374616b65642076616c696461746f7220736c61736861626c652062616c616e6365732e1c426f6e64616765010130543a3a4163636f756e74496438543a3a426c6f636b4e756d62657220000000000000000004f42054686520626c6f636b20617420776869636820746865206077686f6027732066756e6473206265636f6d6520656e746972656c79206c69717569642e28536c617368436f756e74010130543a3a4163636f756e7449640c753332100000000004d10120546865206e756d626572206f662074696d6573206120676976656e2076616c696461746f7220686173206265656e207265706f72746564206f66666c696e652e205468697320676574732064656372656d656e746564206279206f6e652065616368206572612074686174207061737365732e34466f7263696e674e65774572610000082829040004682057652061726520666f7263696e672061206e6577206572612e2464656d6f6372616379184d6f64756c651043616c6c1800001c70726f706f7365082070726f706f73616c40426f783c543a3a50726f706f73616c3e1476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706504a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e0100187365636f6e64042070726f706f73616c48436f6d706163743c50726f70496e6465783e04a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e020010766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f746508350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e03004073746172745f7265666572656e64756d0c2070726f706f73616c40426f783c543a3a50726f706f73616c3e247468726573686f6c6434566f74655468726573686f6c641464656c617938543a3a426c6f636b4e756d62657204502053746172742061207265666572656e64756d2e04004463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e04542052656d6f76652061207265666572656e64756d2e05003463616e63656c5f71756575656408107768656e903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706514776869636830436f6d706163743c7533323e04a02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e012444656d6f63726163793c3c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f70730100ac5665633c2850726f70496e6465782c20543a3a50726f706f73616c2c20543a3a4163636f756e744964293e0400048020546865207075626c69632070726f706f73616c732e20556e736f727465642e244465706f7369744f6600012450726f70496e6465787c28543a3a42616c616e63652c205665633c543a3a4163636f756e7449643e29040004842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e304c61756e6368506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e384d696e696d756d4465706f736974010028543a3a42616c616e6365400000000000000000000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e2c5075626c696344656c6179010038543a3a426c6f636b4e756d62657220000000000000000004d4205468652064656c6179206265666f726520656e6163746d656e7420666f7220616c6c207075626c6963207265666572656e64612e384d61784c6f636b506572696f647301002c4c6f636b506572696f6473040004d90120546865206d6178696d756d206e756d626572206f66206164646974696f6e616c206c6f636b20706572696f6473206120766f746572206d6179206f6666657220746f20737472656e677468656e20746865697220766f74652e204d756c7469706c6573206f6620605075626c696344656c6179602e30566f74696e67506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004390120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e64756d73207374617274656420736f206661722e244e65787454616c6c7901003c5265666572656e64756d496e646578100000000004c820546865206e657874207265666572656e64756d20696e64657820746861742073686f756c642062652074616c6c6965642e405265666572656e64756d496e666f4f6600013c5265666572656e64756d496e646578b4285265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a50726f706f73616c3e29040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e3444697370617463685175657565010138543a3a426c6f636b4e756d626572ac5665633c4f7074696f6e3c28543a3a50726f706f73616c2c205265666572656e64756d496e646578293e3e040004c0205175657565206f66207375636365737366756c207265666572656e646120746f20626520646973706174636865642e1c426f6e64616765010130543a3a4163636f756e74496438543a3a426c6f636b4e756d62657220000000000000000004d02054686520626c6f636b20617420776869636820746865206077686f6027732066756e6473206265636f6d65206c69717569642e24566f74657273466f7201013c5265666572656e64756d496e646578445665633c543a3a4163636f756e7449643e040004a4204765742074686520766f7465727320666f72207468652063757272656e742070726f706f73616c2e18566f74654f6601017c285265666572656e64756d496e6465782c20543a3a4163636f756e7449642910566f746504000cd501204765742074686520766f746520696e206120676976656e207265666572656e64756d206f66206120706172746963756c617220766f7465722e2054686520726573756c74206973206d65616e696e6766756c206f6e6c792069662060766f746572735f666f726020696e636c7564657320746865c90120766f746572207768656e2063616c6c6564207769746820746865207265666572656e64756d2028796f75276c6c20676574207468652064656661756c742060566f7465602076616c7565206f7468657277697365292e20496620796f7520646f6e27742077616e7420746f20636865636b61012060766f746572735f666f72602c207468656e20796f752063616e20616c736f20636865636b20666f722073696d706c65206578697374656e636520776974682060566f74654f663a3a657869737473602066697273742e1c636f756e63696c184d6f64756c651043616c6c240000347365745f617070726f76616c730814766f746573245665633c626f6f6c3e14696e64657848436f6d706163743c566f7465496e6465783e086101205365742063616e64696461746520617070726f76616c732e20417070726f76616c20736c6f747320737461792076616c6964206173206c6f6e672061732063616e6469646174657320696e2074686f736520736c6f7473402061726520726567697374657265642e01004c726561705f696e6163746976655f766f74657210387265706f727465725f696e64657830436f6d706163743c7533323e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652477686f5f696e64657830436f6d706163743c7533323e48617373756d65645f766f74655f696e64657848436f6d706163743c566f7465496e6465783e1461012052656d6f7665206120766f7465722e20466f72206974206e6f7420746f206265206120626f6e642d636f6e73756d696e67206e6f2d6f702c20616c6c20617070726f7665642063616e64696461746520696e64696365737101206d757374206e6f772062652065697468657220756e72656769737465726564206f72207265676973746572656420746f20612063616e646964617465207468617420726567697374657265642074686520736c6f74206166746572a02074686520766f7465722067617665207468656972206c61737420617070726f76616c207365742e000101204d61792062652063616c6c656420627920616e796f6e652e2052657475726e732074686520766f746572206465706f73697420746f20607369676e6564602e020034726574726163745f766f7465720414696e64657830436f6d706163743c7533323e042d012052656d6f7665206120766f7465722e20416c6c20766f746573206172652063616e63656c6c656420616e642074686520766f746572206465706f7369742069732072657475726e65642e0300407375626d69745f63616e6469646163790410736c6f7430436f6d706163743c7533323e0c78205375626d6974206f6e6573656c6620666f722063616e6469646163792e001101204163636f756e74206d757374206861766520656e6f756768207472616e736665727261626c652066756e647320696e20697420746f207061792074686520626f6e642e04003870726573656e745f77696e6e65720c2463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636514746f74616c803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706514696e64657848436f6d706163743c566f7465496e6465783e0c650120436c61696d207468617420607369676e656460206973206f6e65206f662074686520746f702053656c663a3a63617272795f636f756e742829202b2063757272656e745f766f746528292e312063616e646964617465732ea501204f6e6c7920776f726b73206966207468652060626c6f636b5f6e756d626572203e3d2063757272656e745f766f746528292e306020616e6420603c2063757272656e745f766f746528292e30202b2070726573656e746174696f6e5f6475726174696f6e282960607820607369676e6564602073686f756c642068617665206174206c656173740500447365745f646573697265645f73656174730414636f756e7430436f6d706163743c7533323e0c650120536574207468652064657369726564206d656d62657220636f756e743b206966206c6f776572207468616e207468652063757272656e7420636f756e742c207468656e2073656174732077696c6c206e6f74206265207570690120656c656374696f6e207768656e2074686579206578706972652e204966206d6f72652c207468656e2061206e657720766f74652077696c6c2062652073746172746564206966206f6e65206973206e6f7420616c72656164793420696e2070726f67726573732e06003472656d6f76655f6d656d626572040c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c71012052656d6f7665206120706172746963756c6172206d656d6265722e20412074616c6c792077696c6c2068617070656e20696e7374616e746c7920286966206e6f7420616c726561647920696e20612070726573656e746174696f6e410120706572696f642920746f2066696c6c2074686520736561742069662072656d6f76616c206d65616e732074686174207468652064657369726564206d656d6265727320617265206e6f74206d65742e7c20546869732069732065666665637469766520696d6d6564696174656c792e0700647365745f70726573656e746174696f6e5f6475726174696f6e0414636f756e74903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706508590120536574207468652070726573656e746174696f6e206475726174696f6e2e2049662074686572652069732063757272656e746c79206120766f7465206265696e672070726573656e74656420666f722c2077696c6c6020696e766f6b65206066696e616c6973655f766f7465602e0800447365745f7465726d5f6475726174696f6e0414636f756e74903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a5479706508510120536574207468652070726573656e746174696f6e206475726174696f6e2e2049662074686572652069732063757272656e74206120766f7465206265696e672070726573656e74656420666f722c2077696c6c6020696e766f6b65206066696e616c6973655f766f7465602e011c436f756e63696c503443616e646964616379426f6e64010028543a3a42616c616e6365400900000000000000000000000000000004050120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f207375626d6974206f6e6527732063616e6469646163792e28566f74696e67426f6e64010028543a3a42616c616e6365400000000000000000000000000000000004090120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f2062652061626c6520746f207375626d697420766f7465732e5050726573656e74536c617368506572566f746572010028543a3a42616c616e63654001000000000000000000000000000000040d01205468652070756e6973686d656e742c2070657220766f7465722c20696620796f752070726f7669646520616e20696e76616c69642070726573656e746174696f6e2e284361727279436f756e7401000c753332100200000004350120486f77206d616e792072756e6e6572732d75702073686f756c64206861766520746865697220617070726f76616c73207065727369737420756e74696c20746865206e65787420766f74652e5050726573656e746174696f6e4475726174696f6e010038543a3a426c6f636b4e756d62657220e803000000000000043d0120486f77206c6f6e6720746f2067697665206561636820746f702063616e64696461746520746f2070726573656e74207468656d73656c7665732061667465722074686520766f746520656e64732e4c496e6163746976654772616365506572696f64010024566f7465496e646578100100000008a10120486f77206d616e7920766f746520696e6465786573206e65656420746f20676f20627920616674657220612074617267657420766f7465722773206c61737420766f7465206265666f726520746865792063616e206265207265617065642069662074686569725020617070726f76616c7320617265206d6f6f742e30566f74696e67506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e305465726d4475726174696f6e010038543a3a426c6f636b4e756d626572200500000000000000049820486f77206c6f6e67206561636820706f736974696f6e2069732061637469766520666f722e3044657369726564536561747301000c753332100000000004e8204e756d626572206f66206163636f756e747320746861742073686f756c642062652073697474696e67206f6e2074686520636f756e63696c2e34416374697665436f756e63696c01008c5665633c28543a3a4163636f756e7449642c20543a3a426c6f636b4e756d626572293e0400106d01205468652063757272656e7420636f756e63696c2e205768656e2074686572652773206120766f746520676f696e67206f6e2c20746869732073686f756c64207374696c6c206265207573656420666f72206578656375746976657101206d6174746572732e2054686520626c6f636b206e756d62657220287365636f6e6420656c656d656e7420696e20746865207475706c65292069732074686520626c6f636b207468617420746865697220706f736974696f6e20697371012061637469766520756e74696c202863616c63756c61746564206279207468652073756d206f662074686520626c6f636b206e756d626572207768656e2074686520636f756e63696c206d656d6265722077617320656c65637465646820616e64207468656972207465726d206475726174696f6e292e24566f7465436f756e74010024566f7465496e64657810000000000405012054686520746f74616c206e756d626572206f6620766f746573207468617420686176652068617070656e6564206f722061726520696e2070726f67726573732e2c417070726f76616c734f66010130543a3a4163636f756e744964245665633c626f6f6c3e0400086d012041206c697374206f6620766f74657320666f72206561636820766f7465722c2072657370656374696e6720746865206c61737420636c656172656420766f746520696e6465782074686174207468697320766f7465722077617340206c617374206163746976652061742e385265676973746572496e666f4f66000130543a3a4163636f756e7449644028566f7465496e6465782c20753332290400087d012054686520766f746520696e64657820616e64206c69737420736c6f742074686174207468652063616e646964617465206077686f60207761732072656769737465726564206f7220604e6f6e6560206966207468657920617265206e6f74582063757272656e746c7920726567697374657265642e304c6173744163746976654f66000130543a3a4163636f756e74496424566f7465496e646578040004010120546865206c61737420636c656172656420766f746520696e6465782074686174207468697320766f74657220776173206c617374206163746976652061742e18566f746572730100445665633c543a3a4163636f756e7449643e04000460205468652070726573656e7420766f746572206c6973742e2843616e646964617465730100445665633c543a3a4163636f756e7449643e04000470205468652070726573656e742063616e646964617465206c6973742e3843616e646964617465436f756e7401000c753332100000000000304e65787446696e616c6973650000a028543a3a426c6f636b4e756d6265722c207533322c205665633c543a3a4163636f756e7449643e29040004210120546865206163636f756e747320686f6c64696e672074686520736561747320746861742077696c6c206265636f6d652066726565206f6e20746865206e6578742074616c6c792e40536e617073686f7465645374616b657301003c5665633c543a3a42616c616e63653e040004e820546865207374616b6573206173207468657920776572652061742074686520706f696e7420746861742074686520766f746520656e6465642e2c4c6561646572626f61726400007c5665633c28543a3a42616c616e63652c20543a3a4163636f756e744964293e040004e02047657420746865206c6561646572626f6172642069662077653b726520696e207468652070726573656e746174696f6e2070686173652e38636f756e63696c5f766f74696e67184d6f64756c651043616c6c1400001c70726f706f7365042070726f706f73616c40426f783c543a3a50726f706f73616c3e00010010766f7465082070726f706f73616c1c543a3a486173681c617070726f766510626f6f6c000200107665746f043470726f706f73616c5f686173681c543a3a48617368000300487365745f636f6f6c6f66665f706572696f640418626c6f636b73903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065000400447365745f766f74696e675f706572696f640418626c6f636b73903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065000134436f756e63696c566f74696e672034436f6f6c6f6666506572696f64010038543a3a426c6f636b4e756d62657220e8030000000000000030566f74696e67506572696f64010038543a3a426c6f636b4e756d6265722003000000000000000040456e61637444656c6179506572696f64010038543a3a426c6f636b4e756d62657220000000000000000004cd01204e756d626572206f6620626c6f636b7320627920776869636820746f2064656c617920656e6163746d656e74206f66207375636365737366756c2c206e6f6e2d756e616e696d6f75732d636f756e63696c2d696e7374696761746564207265666572656e64756d2070726f706f73616c732e2450726f706f73616c730100785665633c28543a3a426c6f636b4e756d6265722c20543a3a48617368293e0400002850726f706f73616c4f6600011c543a3a486173682c543a3a50726f706f73616c0400003850726f706f73616c566f7465727301011c543a3a48617368445665633c543a3a4163636f756e7449643e04000034436f756e63696c566f74654f6600015c28543a3a486173682c20543a3a4163636f756e7449642910626f6f6c040000385665746f656450726f706f73616c00011c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290400003c636f756e63696c5f6d6f74696f6e73184d6f64756c651043616c6c0800001c70726f706f736508247468726573686f6c6430436f6d706163743c7533323e2070726f706f73616c6c426f783c3c542061732054726169743e3a3a50726f706f73616c3e00010010766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c000138436f756e63696c4d6f74696f6e73102450726f706f73616c730100305665633c543a3a486173683e04000498205468652028686173686573206f662920746865206163746976652070726f706f73616c732e2850726f706f73616c4f6600011c543a3a48617368583c542061732054726169743e3a3a50726f706f73616c040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e6700011c543a3a48617368e82850726f706f73616c496e6465782c207533322c205665633c543a3a4163636f756e7449643e2c205665633c543a3a4163636f756e7449643e29040004250120566f74657320666f72206120676976656e2070726f706f73616c3a202872657175697265645f7965735f766f7465732c207965735f766f746572732c206e6f5f766f74657273292e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1c6772616e647061184d6f64756c651043616c6c040000487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0468205265706f727420736f6d65206d69736265686176696f75722e013c4772616e64706146696e616c697479043450656e64696e674368616e67650000c853746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265722c20543a3a53657373696f6e4b65793e040000207472656173757279184d6f64756c651043616c6c1400003470726f706f73655f7370656e64081476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a547970652c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c2d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e01001c7365745f706f74041c6e65775f706f74803c543a3a42616c616e636520617320486173436f6d706163743e3a3a5479706504b420536574207468652062616c616e6365206f662066756e647320617661696c61626c6520746f207370656e642e020024636f6e666967757265103470726f706f73616c5f626f6e641c5065726d696c6c5470726f706f73616c5f626f6e645f6d696e696d756d803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065307370656e645f706572696f64903c543a3a426c6f636b4e756d62657220617320486173436f6d706163743e3a3a54797065106275726e1c5065726d696c6c0470202852652d29636f6e6669677572652074686973206d6f64756c652e03003c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e04fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e040040617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e085d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e01205472656173757279203050726f706f73616c426f6e6401001c5065726d696c6c10000000000851012050726f706f7274696f6e206f662066756e647320746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c61636520612070726f706f73616c2e20416e206163636570746564dc2070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f65736e27742e4c50726f706f73616c426f6e644d696e696d756d010028543a3a42616c616e63654000000000000000000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f64010038543a3a426c6f636b4e756d626572200100000000000000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e01001c5065726d696c6c10000000000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e0c506f74010028543a3a42616c616e6365400000000000000000000000000000000004cc20546f74616c2066756e647320617661696c61626c6520746f2074686973206d6f64756c6520666f72207370656e64696e672e3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c7300013450726f706f73616c496e6465788850726f706f73616c3c543a3a4163636f756e7449642c20543a3a42616c616e63653e0400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e20636f6e7472616374184d6f64756c651043616c6c0800001063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c7565803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065246761735f6c696d6974703c543a3a47617320617320486173436f6d706163743e3a3a5479706510646174611c5665633c75383e082901204d616b6520612063616c6c20746f206120737065636966696564206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e2901204d616b6520612063616c6c20746f206120737065636966696564206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e0100186372656174651024656e646f776d656e74803c543a3a42616c616e636520617320486173436f6d706163743e3a3a54797065246761735f6c696d6974703c543a3a47617320617320486173436f6d706163743e3a3a547970652463746f725f636f64651c5665633c75383e10646174611c5665633c75383e244d01204372656174652061206e657720636f6e74726163742c206f7074696f6e616c6c79207472616e73666572696e6720736f6d652062616c616e636520746f207468652063726561746564206163636f756e742e0084204372656174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d207468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652eb8202d206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20746865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792063726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564b420202075706f6e20616e79206d6573736167652072656365697665642062792074686973206163636f756e742e00107375646f184d6f64756c651043616c6c080000107375646f042070726f706f73616c40426f783c543a3a50726f706f73616c3e0001001c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650001105375646f040c4b6579010030543a3a4163636f756e744964800000000000000000000000000000000000000000000000000000000000000000001043616c6c382454696d657374616d702474696d657374616d70000024436f6e73656e73757324636f6e73656e73757301001c496e64696365731c696e646963657302002042616c616e6365732062616c616e63657303001c53657373696f6e1c73657373696f6e04001c5374616b696e671c7374616b696e6705002444656d6f63726163792464656d6f637261637906001c436f756e63696c1c636f756e63696c070034436f756e63696c566f74696e6738636f756e63696c5f766f74696e67080038436f756e63696c4d6f74696f6e733c636f756e63696c5f6d6f74696f6e7309001c4772616e6470611c6772616e6470610a002054726561737572792074726561737572790b0020436f6e747261637420636f6e74726163740c00105375646f107375646f0d00'; + +// Export the latest RPC response for metadata +export default meta; diff --git a/packages/types/src/Metadata/v1/index.ts b/packages/types/src/Metadata/v1/index.ts new file mode 100644 index 0000000000..a4e5b3e257 --- /dev/null +++ b/packages/types/src/Metadata/v1/index.ts @@ -0,0 +1,129 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { MetadataInterface } from '../types'; + +import Option from '../../codec/Option'; +import Struct from '../../codec/Struct'; +import Vector from '../../codec/Vector'; +import Text from '../../Text'; + +import { flattenUniq, validateTypes } from '../util'; +import { EventMetadata } from '../v0/Events'; +import { CallMetadata, StorageMetadata } from '../v0/Modules'; +import { OuterDispatchCall } from './outerDispatch'; + +class RuntimeModuleMetadata extends Struct { + constructor (value?: any) { + super({ + name: Text, + prefix: Text, + storage: Option.with(StorageMetadata), + calls: CallMetadata, + outerDispatch: Option.with(OuterDispatchCall), + events: Vector.with(EventMetadata) + }, value); + } + + /** + * @description the module call + */ + get calls (): CallMetadata { + return this.get('calls') as CallMetadata; + } + + /** + * @description the module events + */ + get events (): Vector { + return this.get('events') as Vector; + } + + /** + * @description the module name + */ + get name (): Text { + return this.get('name') as Text; + } + + /** + * @description the outer dispatch + */ + get outerDispatch (): Option { + return this.get('outerDispatch') as Option; + } + + /** + * @description the module name + */ + get prefix (): Text { + return this.get('prefix') as Text; + } + + /** + * @description the associated module storage + */ + get storage (): Option { + return this.get('storage') as Option; + } +} + +/** + * @name MetadataV1 + * @description + * The runtime metadata as a decoded structure + */ +export default class MetadataV1 extends Struct implements MetadataInterface { + constructor (value?: any) { + super({ + modules: Vector.with(RuntimeModuleMetadata) + }, value); + } + + /** + * @description The associated modules for this structure + */ + get modules (): Vector { + return this.get('modules') as Vector; + } + + private get callNames () { + return this.modules.map((module) => + module.calls.functions.map((fn) => + fn.arguments.map((argument) => argument.type.toString()) + ) + ); + } + + private get eventNames () { + return this.modules.map((module) => + module.events.map((event) => + event.arguments.map((argument) => argument.toString()) + ) + ); + } + + private get storageNames () { + return this.modules.map((module) => + module.storage.isSome + ? module.storage.unwrap().functions.map((fn) => + fn.type.isMap + ? [fn.type.asMap.key.toString(), fn.type.asMap.value.toString()] + : [fn.type.asType.toString()] + ) + : [] + ); + } + + /** + * @description Helper to retrieve a list of all type that are found, sorted and de-deuplicated + */ + getUniqTypes (): Array { + const types = flattenUniq([this.callNames, this.eventNames, this.storageNames]); + + validateTypes(types); + + return types; + } +} diff --git a/packages/types/src/Metadata/v1/latest.substrate.v0.json b/packages/types/src/Metadata/v1/latest.substrate.v0.json new file mode 100644 index 0000000000..26be04ffe4 --- /dev/null +++ b/packages/types/src/Metadata/v1/latest.substrate.v0.json @@ -0,0 +1,2676 @@ +{ + "outerEvent": { + "name": "Event", + "events": [ + [ + "system", + [ + { + "name": "ExtrinsicSuccess", + "arguments": [], + "documentation": [ + " An extrinsic completed successfully." + ] + }, + { + "name": "ExtrinsicFailed", + "arguments": [], + "documentation": [ + " An extrinsic failed." + ] + } + ] + ], + [ + "indices", + [ + { + "name": "NewAccountIndex", + "arguments": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A new account was created." + ] + } + ] + ], + [ + "balances", + [ + { + "name": "NewAccount", + "arguments": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A new account was created." + ] + }, + { + "name": "ReapedAccount", + "arguments": [ + "AccountId" + ], + "documentation": [ + " An account was reaped." + ] + }, + { + "name": "Transfer", + "arguments": [ + "AccountId", + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " Transfer succeeded (from, to, value, fees)." + ] + } + ] + ], + [ + "session", + [ + { + "name": "NewSession", + "arguments": [ + "BlockNumber" + ], + "documentation": [ + " New session has happened. Note that the argument is the session index, not the block", + " number as the type might suggest." + ] + } + ] + ], + [ + "staking", + [ + { + "name": "Reward", + "arguments": [ + "Balance" + ], + "documentation": [ + " All validators have been rewarded by the given balance." + ] + }, + { + "name": "OfflineWarning", + "arguments": [ + "AccountId", + "u32" + ], + "documentation": [ + " One validator (and their nominators) has been given a offline-warning (they're still", + " within their grace). The accrued number of slashes is recorded, too." + ] + }, + { + "name": "OfflineSlash", + "arguments": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and their nominators) has been slashed by the given amount." + ] + } + ] + ], + [ + "democracy", + [ + { + "name": "Tabled", + "arguments": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [] + }, + { + "name": "Started", + "arguments": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [] + }, + { + "name": "Passed", + "arguments": [ + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "NotPassed", + "arguments": [ + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "Cancelled", + "arguments": [ + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "Executed", + "arguments": [ + "ReferendumIndex", + "bool" + ], + "documentation": [] + } + ] + ], + [ + "council", + [ + { + "name": "VoterReaped", + "arguments": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " reaped voter, reaper" + ] + }, + { + "name": "BadReaperSlashed", + "arguments": [ + "AccountId" + ], + "documentation": [ + " slashed reaper" + ] + }, + { + "name": "TallyStarted", + "arguments": [ + "u32" + ], + "documentation": [ + " A tally (for approval votes of council seat(s)) has started." + ] + }, + { + "name": "TallyFinalised", + "arguments": [ + "Vec", + "Vec" + ], + "documentation": [ + " A tally (for approval votes of council seat(s)) has ended (with one or more new members)." + ] + } + ] + ], + [ + "council_voting", + [ + { + "name": "TallyCancelation", + "arguments": [ + "Hash", + "u32", + "u32", + "u32" + ], + "documentation": [ + " A voting tally has happened for a referendum cancellation vote.", + " Last three are yes, no, abstain counts." + ] + }, + { + "name": "TallyReferendum", + "arguments": [ + "Hash", + "u32", + "u32", + "u32" + ], + "documentation": [ + " A voting tally has happened for a referendum vote.", + " Last three are yes, no, abstain counts." + ] + } + ] + ], + [ + "council_motions", + [ + { + "name": "Proposed", + "arguments": [ + "AccountId", + "ProposalIndex", + "Hash", + "u32" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given u32)." + ] + }, + { + "name": "Voted", + "arguments": [ + "AccountId", + "Hash", + "bool", + "u32", + "u32" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given as u32s respectively)." + ] + }, + { + "name": "Approved", + "arguments": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "arguments": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "arguments": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." + ] + } + ] + ], + [ + "grandpa", + [ + { + "name": "NewAuthorities", + "arguments": [ + "Vec<(SessionKey,u64)>" + ], + "documentation": [ + " New authority set has been applied." + ] + } + ] + ], + [ + "treasury", + [ + { + "name": "Proposed", + "arguments": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal." + ] + }, + { + "name": "Spending", + "arguments": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds." + ] + }, + { + "name": "Awarded", + "arguments": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated." + ] + }, + { + "name": "Burnt", + "arguments": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt." + ] + }, + { + "name": "Rollover", + "arguments": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend." + ] + } + ] + ], + [ + "contract", + [ + { + "name": "Transfer", + "arguments": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer happened `from` -> `to` with given `value` as part of a `message-call` or `create`." + ] + }, + { + "name": "Created", + "arguments": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address." + ] + } + ] + ], + [ + "sudo", + [ + { + "name": "Sudid", + "arguments": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + }, + { + "name": "KeyChanged", + "arguments": [ + "AccountId" + ], + "documentation": [ + " The sudoer just switched identity; the old key is supplied." + ] + } + ] + ] + ] + }, + "modules": [ + { + "prefix": "system", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [] + } + }, + "storage": { + "prefix": "System", + "functions": [ + { + "name": "AccountNonce", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Index" + }, + "default": "0x0000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicCount", + "modifier": 0, + "type": "u32", + "default": "0x00", + "documentation": [] + }, + { + "name": "BlockHash", + "modifier": 1, + "type": { + "key": "BlockNumber", + "value": "Hash" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicData", + "modifier": 1, + "type": { + "key": "u32", + "value": "Bytes" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "RandomSeed", + "modifier": 1, + "type": "Hash", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "Number", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": 1, + "type": "Hash", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicsRoot", + "modifier": 1, + "type": "Hash", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "Digest", + "modifier": 1, + "type": "Digest", + "default": "0x00", + "documentation": [] + }, + { + "name": "Events", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [] + } + ] + } + }, + { + "prefix": "aura", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [] + } + }, + "storage": null + }, + { + "prefix": "timestamp", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set", + "arguments": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " Extrinsic with this call should be placed at the specific position in the each block", + " (specified by the Trait::TIMESTAMP_SET_POSITION) typically at the start of the each block.", + " This call should be invoked exactly once per block. It will panic at the finalization phase,", + " if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by `block_period`." + ] + } + ] + } + }, + "storage": { + "prefix": "Timestamp", + "functions": [ + { + "name": "Now", + "modifier": 1, + "type": "Moment", + "default": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "BlockPeriod", + "modifier": 1, + "type": "Moment", + "default": "0x0500000000000000", + "documentation": [ + " The minimum (and advised) period between blocks." + ] + }, + { + "name": "DidUpdate", + "modifier": 1, + "type": "bool", + "default": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + } + }, + { + "prefix": "consensus", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "report_misbehavior", + "arguments": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehaviour." + ] + }, + { + "id": 1, + "name": "note_offline", + "arguments": [ + { + "name": "offline", + "type": "InherentOfflineReport" + } + ], + "documentation": [ + " Note the previous block's validator missed their opportunity to propose a block." + ] + }, + { + "id": 2, + "name": "remark", + "arguments": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark." + ] + }, + { + "id": 3, + "name": "set_heap_pages", + "arguments": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap." + ] + }, + { + "id": 4, + "name": "set_code", + "arguments": [ + { + "name": "new", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new code." + ] + }, + { + "id": 5, + "name": "set_storage", + "arguments": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage." + ] + } + ] + } + }, + "storage": { + "prefix": "Consensus", + "functions": [ + { + "name": "OriginalAuthorities", + "modifier": 0, + "type": "Vec", + "default": "0x00", + "documentation": [] + } + ] + } + }, + { + "prefix": "indices", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [] + } + }, + "storage": { + "prefix": "Indices", + "functions": [ + { + "name": "NextEnumSet", + "modifier": 1, + "type": "AccountIndex", + "default": "0x00000000", + "documentation": [ + " The next free enumeration set." + ] + }, + { + "name": "EnumSet", + "modifier": 1, + "type": { + "key": "AccountIndex", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " The enumeration sets." + ] + } + ] + } + }, + { + "prefix": "balances", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "transfer", + "arguments": [ + { + "name": "dest", + "type": "Address" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another staker." + ] + }, + { + "id": 1, + "name": "set_balance", + "arguments": [ + { + "name": "who", + "type": "Address" + }, + { + "name": "free", + "type": "Compact" + }, + { + "name": "reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account." + ] + } + ] + } + }, + "storage": { + "prefix": "Balances", + "functions": [ + { + "name": "TotalIssuance", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The total amount of stake on the system." + ] + }, + { + "name": "ExistentialDeposit", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum amount allowed to keep an account open." + ] + }, + { + "name": "TransferFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee required to create an account. At least as big as ReclaimRebate." + ] + }, + { + "name": "FreeBalance", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The 'free' balance of a given account.", + "", + " This is the only balance that matters in terms of most operations on tokens. It is", + " alone used to determine the balance when in the contract execution environment. When this", + " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", + " deleted: specifically `FreeBalance`. Furthermore, `OnFreeBalanceZero` callback", + " is invoked, giving a chance to external modules to cleanup data associated with", + " the deleted account.", + "", + " `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "ReservedBalance", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of the balance of a given account that is externally reserved; this can still get", + " slashed, but gets slashed last of all.", + "", + " This balance is a 'reserve' balance that other subsystems use in order to set aside tokens", + " that are still 'owned' by the account holder, but which are suspendable. (This is different", + " and wholly unrelated to the `Bondage` system used in the staking module.)", + "", + " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", + " is deleted: specifically, `ReservedBalance`.", + "", + " `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "TransactionBaseFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + } + ] + } + }, + { + "prefix": "session", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set_key", + "arguments": [ + { + "name": "key", + "type": "SessionKey" + } + ], + "documentation": [ + " Sets the session key of `_validator` to `_key`. This doesn't take effect until the next", + " session." + ] + }, + { + "id": 1, + "name": "set_length", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set a new session length. Won't kick in until the next session change (at current length)." + ] + }, + { + "id": 2, + "name": "force_new_session", + "arguments": [ + { + "name": "apply_rewards", + "type": "bool" + } + ], + "documentation": [ + " Forces a new session." + ] + } + ] + } + }, + "storage": { + "prefix": "Session", + "functions": [ + { + "name": "Validators", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "SessionLength", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " Current length of the session." + ] + }, + { + "name": "CurrentIndex", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "CurrentStart", + "modifier": 1, + "type": "Moment", + "default": "0x0000000000000000", + "documentation": [ + " Timestamp when current session started." + ] + }, + { + "name": "ForcingNewSession", + "modifier": 0, + "type": "bool", + "default": "0x00", + "documentation": [ + " New session is being forced is this entry exists; in which case, the boolean value is whether", + " the new session should be considered a normal rotation (rewardable) or exceptional (slashable)." + ] + }, + { + "name": "LastLengthChange", + "modifier": 0, + "type": "BlockNumber", + "default": "0x00", + "documentation": [ + " Block at which the session length last changed." + ] + }, + { + "name": "NextKeyFor", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "SessionKey" + }, + "default": "0x00", + "documentation": [ + " The next key for a given validator." + ] + }, + { + "name": "NextSessionLength", + "modifier": 0, + "type": "BlockNumber", + "default": "0x00", + "documentation": [ + " The next session length." + ] + } + ] + } + }, + { + "prefix": "staking", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "stake", + "arguments": [], + "documentation": [ + " Declare the desire to stake for the transactor.", + "", + " Effects will be felt at the beginning of the next era." + ] + }, + { + "id": 1, + "name": "unstake", + "arguments": [ + { + "name": "intentions_index", + "type": "Compact" + } + ], + "documentation": [ + " Retract the desire to stake for the transactor.", + "", + " Effects will be felt at the beginning of the next era." + ] + }, + { + "id": 2, + "name": "nominate", + "arguments": [ + { + "name": "target", + "type": "Address" + } + ], + "documentation": [] + }, + { + "id": 3, + "name": "unnominate", + "arguments": [ + { + "name": "target_index", + "type": "Compact" + } + ], + "documentation": [ + " Will panic if called when source isn't currently nominating target.", + " Updates Nominating, NominatorsFor and NominationBalance." + ] + }, + { + "id": 4, + "name": "register_preferences", + "arguments": [ + { + "name": "intentions_index", + "type": "Compact" + }, + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Set the given account's preference for slashing behaviour should they be a validator.", + "", + " An error (no-op) if `Self::intentions()[intentions_index] != origin`." + ] + }, + { + "id": 5, + "name": "set_sessions_per_era", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set the number of sessions in an era." + ] + }, + { + "id": 6, + "name": "set_bonding_duration", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The length of the bonding duration in eras." + ] + }, + { + "id": 7, + "name": "set_validator_count", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The ideal number of validators." + ] + }, + { + "id": 8, + "name": "force_new_era", + "arguments": [ + { + "name": "apply_rewards", + "type": "bool" + } + ], + "documentation": [ + " Force there to be a new era. This also forces a new session immediately after.", + " `apply_rewards` should be true for validators to get the session reward." + ] + }, + { + "id": 9, + "name": "set_offline_slash_grace", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set the offline slash grace period." + ] + }, + { + "id": 10, + "name": "set_invulnerables", + "arguments": [ + { + "name": "validators", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any)." + ] + } + ] + } + }, + "storage": { + "prefix": "Staking", + "functions": [ + { + "name": "ValidatorCount", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": 1, + "type": "u32", + "default": "0x04000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "SessionsPerEra", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " The length of a staking era in sessions." + ] + }, + { + "name": "SessionReward", + "modifier": 1, + "type": "Perbill", + "default": "0x3c000000", + "documentation": [ + " Maximum reward, per validator, that is provided per acceptable session." + ] + }, + { + "name": "OfflineSlash", + "modifier": 1, + "type": "Perbill", + "default": "0x40420f00", + "documentation": [ + " Slash, per validator that is taken for the first time they are found to be offline." + ] + }, + { + "name": "OfflineSlashGrace", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " Number of instances of offline reports before slashing begins for validators." + ] + }, + { + "name": "BondingDuration", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " The length of the bonding duration in blocks." + ] + }, + { + "name": "Invulerables", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcible kicked. It's a Vec since they're easy to initialise", + " and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets." + ] + }, + { + "name": "CurrentEra", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The current era index." + ] + }, + { + "name": "ValidatorPreferences", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "ValidatorPrefs" + }, + "default": "0x0c00", + "documentation": [ + " Preferences that a validator has." + ] + }, + { + "name": "Intentions", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " All the accounts with a desire to stake." + ] + }, + { + "name": "Nominating", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "AccountId" + }, + "default": "0x00", + "documentation": [ + " All nominator -> nominee relationships." + ] + }, + { + "name": "NominatorsFor", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " Nominators for a particular account." + ] + }, + { + "name": "CurrentNominatorsFor", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " Nominators for a particular account that is in action right now." + ] + }, + { + "name": "CurrentSessionReward", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Maximum reward, per validator, that is provided per acceptable session." + ] + }, + { + "name": "CurrentOfflineSlash", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Slash, per validator that is taken for the first time they are found to be offline." + ] + }, + { + "name": "NextSessionsPerEra", + "modifier": 0, + "type": "BlockNumber", + "default": "0x00", + "documentation": [ + " The next value of sessions per era." + ] + }, + { + "name": "LastEraLengthChange", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The session index at which the era length last changed." + ] + }, + { + "name": "StakeRange", + "modifier": 1, + "type": "(Balance,Balance)", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The highest and lowest staked validator slashable balances." + ] + }, + { + "name": "Bondage", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The block at which the `who`'s funds become entirely liquid." + ] + }, + { + "name": "SlashCount", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "u32" + }, + "default": "0x00000000", + "documentation": [ + " The number of times a given validator has been reported offline. This gets decremented by one each era that passes." + ] + }, + { + "name": "ForcingNewEra", + "modifier": 0, + "type": "Null", + "default": "0x00", + "documentation": [ + " We are forcing a new era." + ] + } + ] + } + }, + { + "prefix": "democracy", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken." + ] + }, + { + "id": 1, + "name": "second", + "arguments": [ + { + "name": "proposal", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken." + ] + }, + { + "id": 2, + "name": "vote", + "arguments": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "Vote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo." + ] + }, + { + "id": 3, + "name": "start_referendum", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "threshold", + "type": "VoteThreshold" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Start a referendum." + ] + }, + { + "id": 4, + "name": "cancel_referendum", + "arguments": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum." + ] + }, + { + "id": 5, + "name": "cancel_queued", + "arguments": [ + { + "name": "when", + "type": "Compact" + }, + { + "name": "which", + "type": "Compact" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment." + ] + } + ] + } + }, + "storage": { + "prefix": "Democracy", + "functions": [ + { + "name": "PublicPropCount", + "modifier": 1, + "type": "PropIndex", + "default": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": 1, + "type": "Vec<(PropIndex,Proposal,AccountId)>", + "default": "0x00", + "documentation": [ + " The public proposals. Unsorted." + ] + }, + { + "name": "DepositOf", + "modifier": 0, + "type": { + "key": "PropIndex", + "value": "(Balance,Vec)" + }, + "default": "0x00", + "documentation": [ + " Those who have locked a deposit." + ] + }, + { + "name": "LaunchPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "MinimumDeposit", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "PublicDelay", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The delay before enactment for all public referenda." + ] + }, + { + "name": "MaxLockPeriods", + "modifier": 1, + "type": "LockPeriods", + "default": "0x00", + "documentation": [ + " The maximum number of additional lock periods a voter may offer to strengthen their vote. Multiples of `PublicDelay`." + ] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "ReferendumCount", + "modifier": 1, + "type": "ReferendumIndex", + "default": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referendums started so far." + ] + }, + { + "name": "NextTally", + "modifier": 1, + "type": "ReferendumIndex", + "default": "0x00000000", + "documentation": [ + " The next referendum index that should be tallied." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": 0, + "type": { + "key": "ReferendumIndex", + "value": "ReferendumInfo" + }, + "default": "0x00", + "documentation": [ + " Information concerning any given referendum." + ] + }, + { + "name": "DispatchQueue", + "modifier": 1, + "type": { + "key": "BlockNumber", + "value": "Vec>" + }, + "default": "0x00", + "documentation": [ + " Queue of successful referenda to be dispatched." + ] + }, + { + "name": "Bondage", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The block at which the `who`'s funds become liquid." + ] + }, + { + "name": "VotersFor", + "modifier": 1, + "type": { + "key": "ReferendumIndex", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " Get the voters for the current proposal." + ] + }, + { + "name": "VoteOf", + "modifier": 1, + "type": { + "key": "(ReferendumIndex,AccountId)", + "value": "Vote" + }, + "default": "0x00", + "documentation": [ + " Get the vote in a given referendum of a particular voter. The result is meaningful only if `voters_for` includes the", + " voter when called with the referendum (you'll get the default `Vote` value otherwise). If you don't want to check", + " `voters_for`, then you can also check for simple existence with `VoteOf::exists` first." + ] + } + ] + } + }, + { + "prefix": "council", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set_approvals", + "arguments": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Set candidate approvals. Approval slots stay valid as long as candidates in those slots", + " are registered." + ] + }, + { + "id": 1, + "name": "reap_inactive_voter", + "arguments": [ + { + "name": "reporter_index", + "type": "Compact" + }, + { + "name": "who", + "type": "Address" + }, + { + "name": "who_index", + "type": "Compact" + }, + { + "name": "assumed_vote_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices", + " must now be either unregistered or registered to a candidate that registered the slot after", + " the voter gave their last approval set.", + "", + " May be called by anyone. Returns the voter deposit to `signed`." + ] + }, + { + "id": 2, + "name": "retract_voter", + "arguments": [ + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a voter. All votes are cancelled and the voter deposit is returned." + ] + }, + { + "id": 3, + "name": "submit_candidacy", + "arguments": [ + { + "name": "slot", + "type": "Compact" + } + ], + "documentation": [ + " Submit oneself for candidacy.", + "", + " Account must have enough transferrable funds in it to pay the bond." + ] + }, + { + "id": 4, + "name": "present_winner", + "arguments": [ + { + "name": "candidate", + "type": "Address" + }, + { + "name": "total", + "type": "Compact" + }, + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Claim that `signed` is one of the top Self::carry_count() + current_vote().1 candidates.", + " Only works if the `block_number >= current_vote().0` and `< current_vote().0 + presentation_duration()``", + " `signed` should have at least" + ] + }, + { + "id": 5, + "name": "set_desired_seats", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the desired member count; if lower than the current count, then seats will not be up", + " election when they expire. If more, then a new vote will be started if one is not already", + " in progress." + ] + }, + { + "id": 6, + "name": "remove_member", + "arguments": [ + { + "name": "who", + "type": "Address" + } + ], + "documentation": [ + " Remove a particular member. A tally will happen instantly (if not already in a presentation", + " period) to fill the seat if removal means that the desired members are not met.", + " This is effective immediately." + ] + }, + { + "id": 7, + "name": "set_presentation_duration", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the presentation duration. If there is currently a vote being presented for, will", + " invoke `finalise_vote`." + ] + }, + { + "id": 8, + "name": "set_term_duration", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the presentation duration. If there is current a vote being presented for, will", + " invoke `finalise_vote`." + ] + } + ] + } + }, + "storage": { + "prefix": "Council", + "functions": [ + { + "name": "CandidacyBond", + "modifier": 1, + "type": "Balance", + "default": "0x09000000000000000000000000000000", + "documentation": [ + " How much should be locked up in order to submit one's candidacy." + ] + }, + { + "name": "VotingBond", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " How much should be locked up in order to be able to submit votes." + ] + }, + { + "name": "PresentSlashPerVoter", + "modifier": 1, + "type": "Balance", + "default": "0x01000000000000000000000000000000", + "documentation": [ + " The punishment, per voter, if you provide an invalid presentation." + ] + }, + { + "name": "CarryCount", + "modifier": 1, + "type": "u32", + "default": "0x02000000", + "documentation": [ + " How many runners-up should have their approvals persist until the next vote." + ] + }, + { + "name": "PresentationDuration", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How long to give each top candidate to present themselves after the vote ends." + ] + }, + { + "name": "InactiveGracePeriod", + "modifier": 1, + "type": "VoteIndex", + "default": "0x01000000", + "documentation": [ + " How many vote indexes need to go by after a target voter's last vote before they can be reaped if their", + " approvals are moot." + ] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "TermDuration", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0500000000000000", + "documentation": [ + " How long each position is active for." + ] + }, + { + "name": "DesiredSeats", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " Number of accounts that should be sitting on the council." + ] + }, + { + "name": "ActiveCouncil", + "modifier": 1, + "type": "Vec<(AccountId,BlockNumber)>", + "default": "0x00", + "documentation": [ + " The current council. When there's a vote going on, this should still be used for executive", + " matters. The block number (second element in the tuple) is the block that their position is", + " active until (calculated by the sum of the block number when the council member was elected", + " and their term duration)." + ] + }, + { + "name": "VoteCount", + "modifier": 1, + "type": "VoteIndex", + "default": "0x00000000", + "documentation": [ + " The total number of votes that have happened or are in progress." + ] + }, + { + "name": "ApprovalsOf", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " A list of votes for each voter, respecting the last cleared vote index that this voter was", + " last active at." + ] + }, + { + "name": "RegisterInfoOf", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "(VoteIndex,u32)" + }, + "default": "0x00", + "documentation": [ + " The vote index and list slot that the candidate `who` was registered or `None` if they are not", + " currently registered." + ] + }, + { + "name": "LastActiveOf", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "VoteIndex" + }, + "default": "0x00", + "documentation": [ + " The last cleared vote index that this voter was last active at." + ] + }, + { + "name": "Voters", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The present voter list." + ] + }, + { + "name": "Candidates", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The present candidate list." + ] + }, + { + "name": "CandidateCount", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [] + }, + { + "name": "NextFinalise", + "modifier": 0, + "type": "(BlockNumber,u32,Vec)", + "default": "0x00", + "documentation": [ + " The accounts holding the seats that will become free on the next tally." + ] + }, + { + "name": "SnapshotedStakes", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The stakes as they were at the point that the vote ended." + ] + }, + { + "name": "Leaderboard", + "modifier": 0, + "type": "Vec<(Balance,AccountId)>", + "default": "0x00", + "documentation": [ + " Get the leaderboard if we;re in the presentation phase." + ] + } + ] + } + }, + { + "prefix": "council_voting", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "vote", + "arguments": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [] + }, + { + "id": 2, + "name": "veto", + "arguments": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [] + }, + { + "id": 3, + "name": "set_cooloff_period", + "arguments": [ + { + "name": "blocks", + "type": "Compact" + } + ], + "documentation": [] + }, + { + "id": 4, + "name": "set_voting_period", + "arguments": [ + { + "name": "blocks", + "type": "Compact" + } + ], + "documentation": [] + } + ] + } + }, + "storage": { + "prefix": "CouncilVoting", + "functions": [ + { + "name": "CooloffPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0300000000000000", + "documentation": [] + }, + { + "name": "EnactDelayPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals." + ] + }, + { + "name": "Proposals", + "modifier": 1, + "type": "Vec<(BlockNumber,Hash)>", + "default": "0x00", + "documentation": [] + }, + { + "name": "ProposalOf", + "modifier": 0, + "type": { + "key": "Hash", + "value": "Proposal" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "ProposalVoters", + "modifier": 1, + "type": { + "key": "Hash", + "value": "Vec" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "CouncilVoteOf", + "modifier": 0, + "type": { + "key": "(Hash,AccountId)", + "value": "bool" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "VetoedProposal", + "modifier": 0, + "type": { + "key": "Hash", + "value": "(BlockNumber,Vec)" + }, + "default": "0x00", + "documentation": [] + } + ] + } + }, + { + "prefix": "council_motions", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "vote", + "arguments": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [] + } + ] + } + }, + "storage": { + "prefix": "CouncilMotions", + "functions": [ + { + "name": "Proposals", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The (hashes of) the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": 0, + "type": { + "key": "Hash", + "value": "Proposal" + }, + "default": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": 0, + "type": { + "key": "Hash", + "value": "(ProposalIndex,u32,Vec,Vec)" + }, + "default": "0x00", + "documentation": [ + " Votes for a given proposal: (required_yes_votes, yes_voters, no_voters)." + ] + }, + { + "name": "ProposalCount", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " Proposals so far." + ] + } + ] + } + }, + { + "prefix": "grandpa", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "report_misbehavior", + "arguments": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehaviour." + ] + } + ] + } + }, + "storage": { + "prefix": "GrandpaFinality", + "functions": [ + { + "name": "PendingChange", + "modifier": 0, + "type": "StoredPendingChange", + "default": "0x00", + "documentation": [] + } + ] + } + }, + { + "prefix": "treasury", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose_spend", + "arguments": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "Address" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded." + ] + }, + { + "id": 1, + "name": "set_pot", + "arguments": [ + { + "name": "new_pot", + "type": "Compact" + } + ], + "documentation": [ + " Set the balance of funds available to spend." + ] + }, + { + "id": 2, + "name": "configure", + "arguments": [ + { + "name": "proposal_bond", + "type": "Permill" + }, + { + "name": "proposal_bond_minimum", + "type": "Compact" + }, + { + "name": "spend_period", + "type": "Compact" + }, + { + "name": "burn", + "type": "Permill" + } + ], + "documentation": [ + " (Re-)configure this module." + ] + }, + { + "id": 3, + "name": "reject_proposal", + "arguments": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed." + ] + }, + { + "id": 4, + "name": "approve_proposal", + "arguments": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned." + ] + } + ] + } + }, + "storage": { + "prefix": "Treasury", + "functions": [ + { + "name": "ProposalBond", + "modifier": 1, + "type": "Permill", + "default": "0x00000000", + "documentation": [ + " Proportion of funds that should be bonded in order to place a proposal. An accepted", + " proposal gets these back. A rejected proposal doesn't." + ] + }, + { + "name": "ProposalBondMinimum", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0100000000000000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "modifier": 1, + "type": "Permill", + "default": "0x00000000", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "Pot", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Total funds available to this module for spending." + ] + }, + { + "name": "ProposalCount", + "modifier": 1, + "type": "ProposalIndex", + "default": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": 0, + "type": { + "key": "ProposalIndex", + "value": "Proposal" + }, + "default": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + } + }, + { + "prefix": "contract", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "call", + "arguments": [ + { + "name": "dest", + "type": "Address" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Make a call to a specified account, optionally transferring some balance.", + " Make a call to a specified account, optionally transferring some balance." + ] + }, + { + "id": 1, + "name": "create", + "arguments": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "ctor_code", + "type": "Bytes" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Create a new contract, optionally transfering some balance to the created account.", + "", + " Creation is executed as follows:", + "", + " - the destination address is computed based on the sender and hash of the code.", + " - account is created at the computed address.", + " - the `ctor_code` is executed in the context of the newly created account. Buffer returned", + " after the execution is saved as the `code` of the account. That code will be invoked", + " upon any message received by this account." + ] + } + ] + } + }, + "storage": null + }, + { + "prefix": "sudo", + "module": { + "name": "Module", + "call": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "sudo", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "set_key", + "arguments": [ + { + "name": "new", + "type": "Address" + } + ], + "documentation": [] + } + ] + } + }, + "storage": { + "prefix": "Sudo", + "functions": [ + { + "name": "Key", + "modifier": 1, + "type": "AccountId", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + } + ] + } + } + ], + "outerDispatch": { + "name": "Call", + "calls": [ + { + "name": "Timestamp", + "prefix": "timestamp", + "index": 0 + }, + { + "name": "Consensus", + "prefix": "consensus", + "index": 1 + }, + { + "name": "Indices", + "prefix": "indices", + "index": 2 + }, + { + "name": "Balances", + "prefix": "balances", + "index": 3 + }, + { + "name": "Session", + "prefix": "session", + "index": 4 + }, + { + "name": "Staking", + "prefix": "staking", + "index": 5 + }, + { + "name": "Democracy", + "prefix": "democracy", + "index": 6 + }, + { + "name": "Council", + "prefix": "council", + "index": 7 + }, + { + "name": "CouncilVoting", + "prefix": "council_voting", + "index": 8 + }, + { + "name": "CouncilMotions", + "prefix": "council_motions", + "index": 9 + }, + { + "name": "Grandpa", + "prefix": "grandpa", + "index": 10 + }, + { + "name": "Treasury", + "prefix": "treasury", + "index": 11 + }, + { + "name": "Contract", + "prefix": "contract", + "index": 12 + }, + { + "name": "Sudo", + "prefix": "sudo", + "index": 13 + } + ] + } +} diff --git a/packages/types/src/Metadata/v1/latest.substrate.v1.json b/packages/types/src/Metadata/v1/latest.substrate.v1.json new file mode 100644 index 0000000000..a914d447ef --- /dev/null +++ b/packages/types/src/Metadata/v1/latest.substrate.v1.json @@ -0,0 +1,2649 @@ +{ + "magicNumber": 1635018093, + "metadata": { + "modules": [ + { + "name": "Module", + "prefix": "system", + "storage": { + "prefix": "System", + "functions": [ + { + "name": "AccountNonce", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Index" + }, + "default": "0x0000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicCount", + "modifier": 0, + "type": "u32", + "default": "0x00", + "documentation": [] + }, + { + "name": "BlockHash", + "modifier": 1, + "type": { + "key": "BlockNumber", + "value": "Hash" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicData", + "modifier": 1, + "type": { + "key": "u32", + "value": "Bytes" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "RandomSeed", + "modifier": 1, + "type": "Hash", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "Number", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": 1, + "type": "Hash", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicsRoot", + "modifier": 1, + "type": "Hash", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "Digest", + "modifier": 1, + "type": "Digest", + "default": "0x00", + "documentation": [] + }, + { + "name": "Events", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [] + } + ] + }, + "calls": { + "name": "Call", + "functions": [] + }, + "outerDispatch": null, + "events": [ + { + "name": "ExtrinsicSuccess", + "arguments": [], + "documentation": [ + " An extrinsic completed successfully." + ] + }, + { + "name": "ExtrinsicFailed", + "arguments": [], + "documentation": [ + " An extrinsic failed." + ] + } + ] + }, + { + "name": "Module", + "prefix": "aura", + "storage": null, + "calls": { + "name": "Call", + "functions": [] + }, + "outerDispatch": null, + "events": [] + }, + { + "name": "Module", + "prefix": "timestamp", + "storage": { + "prefix": "Timestamp", + "functions": [ + { + "name": "Now", + "modifier": 1, + "type": "Moment", + "default": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "BlockPeriod", + "modifier": 1, + "type": "Moment", + "default": "0x0500000000000000", + "documentation": [ + " The minimum (and advised) period between blocks." + ] + }, + { + "name": "DidUpdate", + "modifier": 1, + "type": "bool", + "default": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set", + "arguments": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " Extrinsic with this call should be placed at the specific position in the each block", + " (specified by the Trait::TIMESTAMP_SET_POSITION) typically at the start of the each block.", + " This call should be invoked exactly once per block. It will panic at the finalization phase,", + " if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by `block_period`." + ] + } + ] + }, + "outerDispatch": { + "name": "Timestamp", + "index": 0 + }, + "events": [] + }, + { + "name": "Module", + "prefix": "consensus", + "storage": { + "prefix": "Consensus", + "functions": [ + { + "name": "OriginalAuthorities", + "modifier": 0, + "type": "Vec", + "default": "0x00", + "documentation": [] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "report_misbehavior", + "arguments": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehaviour." + ] + }, + { + "id": 1, + "name": "note_offline", + "arguments": [ + { + "name": "offline", + "type": "InherentOfflineReport" + } + ], + "documentation": [ + " Note the previous block's validator missed their opportunity to propose a block." + ] + }, + { + "id": 2, + "name": "remark", + "arguments": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark." + ] + }, + { + "id": 3, + "name": "set_heap_pages", + "arguments": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap." + ] + }, + { + "id": 4, + "name": "set_code", + "arguments": [ + { + "name": "new", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new code." + ] + }, + { + "id": 5, + "name": "set_storage", + "arguments": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage." + ] + } + ] + }, + "outerDispatch": { + "name": "Consensus", + "index": 1 + }, + "events": [] + }, + { + "name": "Module", + "prefix": "indices", + "storage": { + "prefix": "Indices", + "functions": [ + { + "name": "NextEnumSet", + "modifier": 1, + "type": "AccountIndex", + "default": "0x00000000", + "documentation": [ + " The next free enumeration set." + ] + }, + { + "name": "EnumSet", + "modifier": 1, + "type": { + "key": "AccountIndex", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " The enumeration sets." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [] + }, + "outerDispatch": { + "name": "Indices", + "index": 2 + }, + "events": [ + { + "name": "NewAccountIndex", + "arguments": [ + "AccountId", + "AccountIndex" + ], + "documentation": [ + " A new account was created." + ] + } + ] + }, + { + "name": "Module", + "prefix": "balances", + "storage": { + "prefix": "Balances", + "functions": [ + { + "name": "TotalIssuance", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The total amount of stake on the system." + ] + }, + { + "name": "ExistentialDeposit", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum amount allowed to keep an account open." + ] + }, + { + "name": "TransferFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee required to create an account. At least as big as ReclaimRebate." + ] + }, + { + "name": "FreeBalance", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The 'free' balance of a given account.", + "", + " This is the only balance that matters in terms of most operations on tokens. It is", + " alone used to determine the balance when in the contract execution environment. When this", + " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", + " deleted: specifically `FreeBalance`. Furthermore, `OnFreeBalanceZero` callback", + " is invoked, giving a chance to external modules to cleanup data associated with", + " the deleted account.", + "", + " `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "ReservedBalance", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The amount of the balance of a given account that is externally reserved; this can still get", + " slashed, but gets slashed last of all.", + "", + " This balance is a 'reserve' balance that other subsystems use in order to set aside tokens", + " that are still 'owned' by the account holder, but which are suspendable. (This is different", + " and wholly unrelated to the `Bondage` system used in the staking module.)", + "", + " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", + " is deleted: specifically, `ReservedBalance`.", + "", + " `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "TransactionBaseFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "transfer", + "arguments": [ + { + "name": "dest", + "type": "Address" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another staker." + ] + }, + { + "id": 1, + "name": "set_balance", + "arguments": [ + { + "name": "who", + "type": "Address" + }, + { + "name": "free", + "type": "Compact" + }, + { + "name": "reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account." + ] + } + ] + }, + "outerDispatch": { + "name": "Balances", + "index": 3 + }, + "events": [ + { + "name": "NewAccount", + "arguments": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A new account was created." + ] + }, + { + "name": "ReapedAccount", + "arguments": [ + "AccountId" + ], + "documentation": [ + " An account was reaped." + ] + }, + { + "name": "Transfer", + "arguments": [ + "AccountId", + "AccountId", + "Balance", + "Balance" + ], + "documentation": [ + " Transfer succeeded (from, to, value, fees)." + ] + } + ] + }, + { + "name": "Module", + "prefix": "session", + "storage": { + "prefix": "Session", + "functions": [ + { + "name": "Validators", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "SessionLength", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " Current length of the session." + ] + }, + { + "name": "CurrentIndex", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "CurrentStart", + "modifier": 1, + "type": "Moment", + "default": "0x0000000000000000", + "documentation": [ + " Timestamp when current session started." + ] + }, + { + "name": "ForcingNewSession", + "modifier": 0, + "type": "bool", + "default": "0x00", + "documentation": [ + " New session is being forced is this entry exists; in which case, the boolean value is whether", + " the new session should be considered a normal rotation (rewardable) or exceptional (slashable)." + ] + }, + { + "name": "LastLengthChange", + "modifier": 0, + "type": "BlockNumber", + "default": "0x00", + "documentation": [ + " Block at which the session length last changed." + ] + }, + { + "name": "NextKeyFor", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "SessionKey" + }, + "default": "0x00", + "documentation": [ + " The next key for a given validator." + ] + }, + { + "name": "NextSessionLength", + "modifier": 0, + "type": "BlockNumber", + "default": "0x00", + "documentation": [ + " The next session length." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set_key", + "arguments": [ + { + "name": "key", + "type": "SessionKey" + } + ], + "documentation": [ + " Sets the session key of `_validator` to `_key`. This doesn't take effect until the next", + " session." + ] + }, + { + "id": 1, + "name": "set_length", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set a new session length. Won't kick in until the next session change (at current length)." + ] + }, + { + "id": 2, + "name": "force_new_session", + "arguments": [ + { + "name": "apply_rewards", + "type": "bool" + } + ], + "documentation": [ + " Forces a new session." + ] + } + ] + }, + "outerDispatch": { + "name": "Session", + "index": 4 + }, + "events": [ + { + "name": "NewSession", + "arguments": [ + "BlockNumber" + ], + "documentation": [ + " New session has happened. Note that the argument is the session index, not the block", + " number as the type might suggest." + ] + } + ] + }, + { + "name": "Module", + "prefix": "staking", + "storage": { + "prefix": "Staking", + "functions": [ + { + "name": "ValidatorCount", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": 1, + "type": "u32", + "default": "0x04000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "SessionsPerEra", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " The length of a staking era in sessions." + ] + }, + { + "name": "SessionReward", + "modifier": 1, + "type": "Perbill", + "default": "0x3c000000", + "documentation": [ + " Maximum reward, per validator, that is provided per acceptable session." + ] + }, + { + "name": "OfflineSlash", + "modifier": 1, + "type": "Perbill", + "default": "0x40420f00", + "documentation": [ + " Slash, per validator that is taken for the first time they are found to be offline." + ] + }, + { + "name": "OfflineSlashGrace", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " Number of instances of offline reports before slashing begins for validators." + ] + }, + { + "name": "BondingDuration", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " The length of the bonding duration in blocks." + ] + }, + { + "name": "Invulerables", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcible kicked. It's a Vec since they're easy to initialise", + " and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets." + ] + }, + { + "name": "CurrentEra", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The current era index." + ] + }, + { + "name": "ValidatorPreferences", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "ValidatorPrefs" + }, + "default": "0x0c00", + "documentation": [ + " Preferences that a validator has." + ] + }, + { + "name": "Intentions", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " All the accounts with a desire to stake." + ] + }, + { + "name": "Nominating", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "AccountId" + }, + "default": "0x00", + "documentation": [ + " All nominator -> nominee relationships." + ] + }, + { + "name": "NominatorsFor", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " Nominators for a particular account." + ] + }, + { + "name": "CurrentNominatorsFor", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " Nominators for a particular account that is in action right now." + ] + }, + { + "name": "CurrentSessionReward", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Maximum reward, per validator, that is provided per acceptable session." + ] + }, + { + "name": "CurrentOfflineSlash", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Slash, per validator that is taken for the first time they are found to be offline." + ] + }, + { + "name": "NextSessionsPerEra", + "modifier": 0, + "type": "BlockNumber", + "default": "0x00", + "documentation": [ + " The next value of sessions per era." + ] + }, + { + "name": "LastEraLengthChange", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The session index at which the era length last changed." + ] + }, + { + "name": "StakeRange", + "modifier": 1, + "type": "(Balance,Balance)", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The highest and lowest staked validator slashable balances." + ] + }, + { + "name": "Bondage", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The block at which the `who`'s funds become entirely liquid." + ] + }, + { + "name": "SlashCount", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "u32" + }, + "default": "0x00000000", + "documentation": [ + " The number of times a given validator has been reported offline. This gets decremented by one each era that passes." + ] + }, + { + "name": "ForcingNewEra", + "modifier": 0, + "type": "Null", + "default": "0x00", + "documentation": [ + " We are forcing a new era." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "stake", + "arguments": [], + "documentation": [ + " Declare the desire to stake for the transactor.", + "", + " Effects will be felt at the beginning of the next era." + ] + }, + { + "id": 1, + "name": "unstake", + "arguments": [ + { + "name": "intentions_index", + "type": "Compact" + } + ], + "documentation": [ + " Retract the desire to stake for the transactor.", + "", + " Effects will be felt at the beginning of the next era." + ] + }, + { + "id": 2, + "name": "nominate", + "arguments": [ + { + "name": "target", + "type": "Address" + } + ], + "documentation": [] + }, + { + "id": 3, + "name": "unnominate", + "arguments": [ + { + "name": "target_index", + "type": "Compact" + } + ], + "documentation": [ + " Will panic if called when source isn't currently nominating target.", + " Updates Nominating, NominatorsFor and NominationBalance." + ] + }, + { + "id": 4, + "name": "register_preferences", + "arguments": [ + { + "name": "intentions_index", + "type": "Compact" + }, + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Set the given account's preference for slashing behaviour should they be a validator.", + "", + " An error (no-op) if `Self::intentions()[intentions_index] != origin`." + ] + }, + { + "id": 5, + "name": "set_sessions_per_era", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set the number of sessions in an era." + ] + }, + { + "id": 6, + "name": "set_bonding_duration", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The length of the bonding duration in eras." + ] + }, + { + "id": 7, + "name": "set_validator_count", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The ideal number of validators." + ] + }, + { + "id": 8, + "name": "force_new_era", + "arguments": [ + { + "name": "apply_rewards", + "type": "bool" + } + ], + "documentation": [ + " Force there to be a new era. This also forces a new session immediately after.", + " `apply_rewards` should be true for validators to get the session reward." + ] + }, + { + "id": 9, + "name": "set_offline_slash_grace", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set the offline slash grace period." + ] + }, + { + "id": 10, + "name": "set_invulnerables", + "arguments": [ + { + "name": "validators", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any)." + ] + } + ] + }, + "outerDispatch": { + "name": "Staking", + "index": 5 + }, + "events": [ + { + "name": "Reward", + "arguments": [ + "Balance" + ], + "documentation": [ + " All validators have been rewarded by the given balance." + ] + }, + { + "name": "OfflineWarning", + "arguments": [ + "AccountId", + "u32" + ], + "documentation": [ + " One validator (and their nominators) has been given a offline-warning (they're still", + " within their grace). The accrued number of slashes is recorded, too." + ] + }, + { + "name": "OfflineSlash", + "arguments": [ + "AccountId", + "Balance" + ], + "documentation": [ + " One validator (and their nominators) has been slashed by the given amount." + ] + } + ] + }, + { + "name": "Module", + "prefix": "democracy", + "storage": { + "prefix": "Democracy", + "functions": [ + { + "name": "PublicPropCount", + "modifier": 1, + "type": "PropIndex", + "default": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": 1, + "type": "Vec<(PropIndex,Proposal,AccountId)>", + "default": "0x00", + "documentation": [ + " The public proposals. Unsorted." + ] + }, + { + "name": "DepositOf", + "modifier": 0, + "type": { + "key": "PropIndex", + "value": "(Balance,Vec)" + }, + "default": "0x00", + "documentation": [ + " Those who have locked a deposit." + ] + }, + { + "name": "LaunchPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "MinimumDeposit", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "PublicDelay", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " The delay before enactment for all public referenda." + ] + }, + { + "name": "MaxLockPeriods", + "modifier": 1, + "type": "LockPeriods", + "default": "0x00", + "documentation": [ + " The maximum number of additional lock periods a voter may offer to strengthen their vote. Multiples of `PublicDelay`." + ] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "ReferendumCount", + "modifier": 1, + "type": "ReferendumIndex", + "default": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referendums started so far." + ] + }, + { + "name": "NextTally", + "modifier": 1, + "type": "ReferendumIndex", + "default": "0x00000000", + "documentation": [ + " The next referendum index that should be tallied." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": 0, + "type": { + "key": "ReferendumIndex", + "value": "ReferendumInfo" + }, + "default": "0x00", + "documentation": [ + " Information concerning any given referendum." + ] + }, + { + "name": "DispatchQueue", + "modifier": 1, + "type": { + "key": "BlockNumber", + "value": "Vec>" + }, + "default": "0x00", + "documentation": [ + " Queue of successful referenda to be dispatched." + ] + }, + { + "name": "Bondage", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The block at which the `who`'s funds become liquid." + ] + }, + { + "name": "VotersFor", + "modifier": 1, + "type": { + "key": "ReferendumIndex", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " Get the voters for the current proposal." + ] + }, + { + "name": "VoteOf", + "modifier": 1, + "type": { + "key": "(ReferendumIndex,AccountId)", + "value": "Vote" + }, + "default": "0x00", + "documentation": [ + " Get the vote in a given referendum of a particular voter. The result is meaningful only if `voters_for` includes the", + " voter when called with the referendum (you'll get the default `Vote` value otherwise). If you don't want to check", + " `voters_for`, then you can also check for simple existence with `VoteOf::exists` first." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken." + ] + }, + { + "id": 1, + "name": "second", + "arguments": [ + { + "name": "proposal", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken." + ] + }, + { + "id": 2, + "name": "vote", + "arguments": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "name": "vote", + "type": "Vote" + } + ], + "documentation": [ + " Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;", + " otherwise it is a vote to keep the status quo." + ] + }, + { + "id": 3, + "name": "start_referendum", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "threshold", + "type": "VoteThreshold" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Start a referendum." + ] + }, + { + "id": 4, + "name": "cancel_referendum", + "arguments": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum." + ] + }, + { + "id": 5, + "name": "cancel_queued", + "arguments": [ + { + "name": "when", + "type": "Compact" + }, + { + "name": "which", + "type": "Compact" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment." + ] + } + ] + }, + "outerDispatch": { + "name": "Democracy", + "index": 6 + }, + "events": [ + { + "name": "Tabled", + "arguments": [ + "PropIndex", + "Balance", + "Vec" + ], + "documentation": [] + }, + { + "name": "Started", + "arguments": [ + "ReferendumIndex", + "VoteThreshold" + ], + "documentation": [] + }, + { + "name": "Passed", + "arguments": [ + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "NotPassed", + "arguments": [ + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "Cancelled", + "arguments": [ + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "Executed", + "arguments": [ + "ReferendumIndex", + "bool" + ], + "documentation": [] + } + ] + }, + { + "name": "Module", + "prefix": "council", + "storage": { + "prefix": "Council", + "functions": [ + { + "name": "CandidacyBond", + "modifier": 1, + "type": "Balance", + "default": "0x09000000000000000000000000000000", + "documentation": [ + " How much should be locked up in order to submit one's candidacy." + ] + }, + { + "name": "VotingBond", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " How much should be locked up in order to be able to submit votes." + ] + }, + { + "name": "PresentSlashPerVoter", + "modifier": 1, + "type": "Balance", + "default": "0x01000000000000000000000000000000", + "documentation": [ + " The punishment, per voter, if you provide an invalid presentation." + ] + }, + { + "name": "CarryCount", + "modifier": 1, + "type": "u32", + "default": "0x02000000", + "documentation": [ + " How many runners-up should have their approvals persist until the next vote." + ] + }, + { + "name": "PresentationDuration", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How long to give each top candidate to present themselves after the vote ends." + ] + }, + { + "name": "InactiveGracePeriod", + "modifier": 1, + "type": "VoteIndex", + "default": "0x01000000", + "documentation": [ + " How many vote indexes need to go by after a target voter's last vote before they can be reaped if their", + " approvals are moot." + ] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "TermDuration", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0500000000000000", + "documentation": [ + " How long each position is active for." + ] + }, + { + "name": "DesiredSeats", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " Number of accounts that should be sitting on the council." + ] + }, + { + "name": "ActiveCouncil", + "modifier": 1, + "type": "Vec<(AccountId,BlockNumber)>", + "default": "0x00", + "documentation": [ + " The current council. When there's a vote going on, this should still be used for executive", + " matters. The block number (second element in the tuple) is the block that their position is", + " active until (calculated by the sum of the block number when the council member was elected", + " and their term duration)." + ] + }, + { + "name": "VoteCount", + "modifier": 1, + "type": "VoteIndex", + "default": "0x00000000", + "documentation": [ + " The total number of votes that have happened or are in progress." + ] + }, + { + "name": "ApprovalsOf", + "modifier": 1, + "type": { + "key": "AccountId", + "value": "Vec" + }, + "default": "0x00", + "documentation": [ + " A list of votes for each voter, respecting the last cleared vote index that this voter was", + " last active at." + ] + }, + { + "name": "RegisterInfoOf", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "(VoteIndex,u32)" + }, + "default": "0x00", + "documentation": [ + " The vote index and list slot that the candidate `who` was registered or `None` if they are not", + " currently registered." + ] + }, + { + "name": "LastActiveOf", + "modifier": 0, + "type": { + "key": "AccountId", + "value": "VoteIndex" + }, + "default": "0x00", + "documentation": [ + " The last cleared vote index that this voter was last active at." + ] + }, + { + "name": "Voters", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The present voter list." + ] + }, + { + "name": "Candidates", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The present candidate list." + ] + }, + { + "name": "CandidateCount", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [] + }, + { + "name": "NextFinalise", + "modifier": 0, + "type": "(BlockNumber,u32,Vec)", + "default": "0x00", + "documentation": [ + " The accounts holding the seats that will become free on the next tally." + ] + }, + { + "name": "SnapshotedStakes", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The stakes as they were at the point that the vote ended." + ] + }, + { + "name": "Leaderboard", + "modifier": 0, + "type": "Vec<(Balance,AccountId)>", + "default": "0x00", + "documentation": [ + " Get the leaderboard if we;re in the presentation phase." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set_approvals", + "arguments": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Set candidate approvals. Approval slots stay valid as long as candidates in those slots", + " are registered." + ] + }, + { + "id": 1, + "name": "reap_inactive_voter", + "arguments": [ + { + "name": "reporter_index", + "type": "Compact" + }, + { + "name": "who", + "type": "Address" + }, + { + "name": "who_index", + "type": "Compact" + }, + { + "name": "assumed_vote_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices", + " must now be either unregistered or registered to a candidate that registered the slot after", + " the voter gave their last approval set.", + "", + " May be called by anyone. Returns the voter deposit to `signed`." + ] + }, + { + "id": 2, + "name": "retract_voter", + "arguments": [ + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a voter. All votes are cancelled and the voter deposit is returned." + ] + }, + { + "id": 3, + "name": "submit_candidacy", + "arguments": [ + { + "name": "slot", + "type": "Compact" + } + ], + "documentation": [ + " Submit oneself for candidacy.", + "", + " Account must have enough transferrable funds in it to pay the bond." + ] + }, + { + "id": 4, + "name": "present_winner", + "arguments": [ + { + "name": "candidate", + "type": "Address" + }, + { + "name": "total", + "type": "Compact" + }, + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Claim that `signed` is one of the top Self::carry_count() + current_vote().1 candidates.", + " Only works if the `block_number >= current_vote().0` and `< current_vote().0 + presentation_duration()``", + " `signed` should have at least" + ] + }, + { + "id": 5, + "name": "set_desired_seats", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the desired member count; if lower than the current count, then seats will not be up", + " election when they expire. If more, then a new vote will be started if one is not already", + " in progress." + ] + }, + { + "id": 6, + "name": "remove_member", + "arguments": [ + { + "name": "who", + "type": "Address" + } + ], + "documentation": [ + " Remove a particular member. A tally will happen instantly (if not already in a presentation", + " period) to fill the seat if removal means that the desired members are not met.", + " This is effective immediately." + ] + }, + { + "id": 7, + "name": "set_presentation_duration", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the presentation duration. If there is currently a vote being presented for, will", + " invoke `finalise_vote`." + ] + }, + { + "id": 8, + "name": "set_term_duration", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the presentation duration. If there is current a vote being presented for, will", + " invoke `finalise_vote`." + ] + } + ] + }, + "outerDispatch": { + "name": "Council", + "index": 7 + }, + "events": [ + { + "name": "VoterReaped", + "arguments": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " reaped voter, reaper" + ] + }, + { + "name": "BadReaperSlashed", + "arguments": [ + "AccountId" + ], + "documentation": [ + " slashed reaper" + ] + }, + { + "name": "TallyStarted", + "arguments": [ + "u32" + ], + "documentation": [ + " A tally (for approval votes of council seat(s)) has started." + ] + }, + { + "name": "TallyFinalised", + "arguments": [ + "Vec", + "Vec" + ], + "documentation": [ + " A tally (for approval votes of council seat(s)) has ended (with one or more new members)." + ] + } + ] + }, + { + "name": "Module", + "prefix": "council_voting", + "storage": { + "prefix": "CouncilVoting", + "functions": [ + { + "name": "CooloffPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0xe803000000000000", + "documentation": [] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0300000000000000", + "documentation": [] + }, + { + "name": "EnactDelayPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0000000000000000", + "documentation": [ + " Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals." + ] + }, + { + "name": "Proposals", + "modifier": 1, + "type": "Vec<(BlockNumber,Hash)>", + "default": "0x00", + "documentation": [] + }, + { + "name": "ProposalOf", + "modifier": 0, + "type": { + "key": "Hash", + "value": "Proposal" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "ProposalVoters", + "modifier": 1, + "type": { + "key": "Hash", + "value": "Vec" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "CouncilVoteOf", + "modifier": 0, + "type": { + "key": "(Hash,AccountId)", + "value": "bool" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "VetoedProposal", + "modifier": 0, + "type": { + "key": "Hash", + "value": "(BlockNumber,Vec)" + }, + "default": "0x00", + "documentation": [] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "vote", + "arguments": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [] + }, + { + "id": 2, + "name": "veto", + "arguments": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [] + }, + { + "id": 3, + "name": "set_cooloff_period", + "arguments": [ + { + "name": "blocks", + "type": "Compact" + } + ], + "documentation": [] + }, + { + "id": 4, + "name": "set_voting_period", + "arguments": [ + { + "name": "blocks", + "type": "Compact" + } + ], + "documentation": [] + } + ] + }, + "outerDispatch": { + "name": "CouncilVoting", + "index": 8 + }, + "events": [ + { + "name": "TallyCancelation", + "arguments": [ + "Hash", + "u32", + "u32", + "u32" + ], + "documentation": [ + " A voting tally has happened for a referendum cancellation vote.", + " Last three are yes, no, abstain counts." + ] + }, + { + "name": "TallyReferendum", + "arguments": [ + "Hash", + "u32", + "u32", + "u32" + ], + "documentation": [ + " A voting tally has happened for a referendum vote.", + " Last three are yes, no, abstain counts." + ] + } + ] + }, + { + "name": "Module", + "prefix": "council_motions", + "storage": { + "prefix": "CouncilMotions", + "functions": [ + { + "name": "Proposals", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " The (hashes of) the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": 0, + "type": { + "key": "Hash", + "value": "Proposal" + }, + "default": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": 0, + "type": { + "key": "Hash", + "value": "(ProposalIndex,u32,Vec,Vec)" + }, + "default": "0x00", + "documentation": [ + " Votes for a given proposal: (required_yes_votes, yes_voters, no_voters)." + ] + }, + { + "name": "ProposalCount", + "modifier": 1, + "type": "u32", + "default": "0x00000000", + "documentation": [ + " Proposals so far." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "vote", + "arguments": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [] + } + ] + }, + "outerDispatch": { + "name": "CouncilMotions", + "index": 9 + }, + "events": [ + { + "name": "Proposed", + "arguments": [ + "AccountId", + "ProposalIndex", + "Hash", + "u32" + ], + "documentation": [ + " A motion (given hash) has been proposed (by given account) with a threshold (given u32)." + ] + }, + { + "name": "Voted", + "arguments": [ + "AccountId", + "Hash", + "bool", + "u32", + "u32" + ], + "documentation": [ + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given as u32s respectively)." + ] + }, + { + "name": "Approved", + "arguments": [ + "Hash" + ], + "documentation": [ + " A motion was approved by the required threshold." + ] + }, + { + "name": "Disapproved", + "arguments": [ + "Hash" + ], + "documentation": [ + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "arguments": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." + ] + } + ] + }, + { + "name": "Module", + "prefix": "grandpa", + "storage": { + "prefix": "GrandpaFinality", + "functions": [ + { + "name": "PendingChange", + "modifier": 0, + "type": "StoredPendingChange", + "default": "0x00", + "documentation": [] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "report_misbehavior", + "arguments": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehaviour." + ] + } + ] + }, + "outerDispatch": { + "name": "Grandpa", + "index": 10 + }, + "events": [ + { + "name": "NewAuthorities", + "arguments": [ + "Vec<(SessionKey,u64)>" + ], + "documentation": [ + " New authority set has been applied." + ] + } + ] + }, + { + "name": "Module", + "prefix": "treasury", + "storage": { + "prefix": "Treasury", + "functions": [ + { + "name": "ProposalBond", + "modifier": 1, + "type": "Permill", + "default": "0x00000000", + "documentation": [ + " Proportion of funds that should be bonded in order to place a proposal. An accepted", + " proposal gets these back. A rejected proposal doesn't." + ] + }, + { + "name": "ProposalBondMinimum", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "modifier": 1, + "type": "BlockNumber", + "default": "0x0100000000000000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "modifier": 1, + "type": "Permill", + "default": "0x00000000", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "Pot", + "modifier": 1, + "type": "Balance", + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Total funds available to this module for spending." + ] + }, + { + "name": "ProposalCount", + "modifier": 1, + "type": "ProposalIndex", + "default": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": 0, + "type": { + "key": "ProposalIndex", + "value": "Proposal" + }, + "default": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": 1, + "type": "Vec", + "default": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose_spend", + "arguments": [ + { + "name": "value", + "type": "Compact" + }, + { + "name": "beneficiary", + "type": "Address" + } + ], + "documentation": [ + " Put forward a suggestion for spending. A deposit proportional to the value", + " is reserved and slashed if the proposal is rejected. It is returned once the", + " proposal is awarded." + ] + }, + { + "id": 1, + "name": "set_pot", + "arguments": [ + { + "name": "new_pot", + "type": "Compact" + } + ], + "documentation": [ + " Set the balance of funds available to spend." + ] + }, + { + "id": 2, + "name": "configure", + "arguments": [ + { + "name": "proposal_bond", + "type": "Compact" + }, + { + "name": "proposal_bond_minimum", + "type": "Compact" + }, + { + "name": "spend_period", + "type": "Compact" + }, + { + "name": "burn", + "type": "Compact" + } + ], + "documentation": [ + " (Re-)configure this module." + ] + }, + { + "id": 3, + "name": "reject_proposal", + "arguments": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed." + ] + }, + { + "id": 4, + "name": "approve_proposal", + "arguments": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned." + ] + } + ] + }, + "outerDispatch": { + "name": "Treasury", + "index": 11 + }, + "events": [ + { + "name": "Proposed", + "arguments": [ + "ProposalIndex" + ], + "documentation": [ + " New proposal." + ] + }, + { + "name": "Spending", + "arguments": [ + "Balance" + ], + "documentation": [ + " We have ended a spend period and will now allocate funds." + ] + }, + { + "name": "Awarded", + "arguments": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated." + ] + }, + { + "name": "Burnt", + "arguments": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt." + ] + }, + { + "name": "Rollover", + "arguments": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend." + ] + } + ] + }, + { + "name": "Module", + "prefix": "contract", + "storage": null, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "update_schedule", + "arguments": [ + { + "name": "schedule", + "type": "Schedule" + } + ], + "documentation": [ + " Updates the schedule for metering contracts.", + "", + " The schedule must have a greater version than the stored schedule." + ] + }, + { + "id": 1, + "name": "put_code", + "arguments": [ + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Stores code in the storage. You can instantiate contracts only with stored code." + ] + }, + { + "id": 2, + "name": "call", + "arguments": [ + { + "name": "dest", + "type": "Address" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Make a call to a specified account, optionally transferring some balance." + ] + }, + { + "id": 3, + "name": "create", + "arguments": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Create a new contract, optionally transfering some balance to the created account.", + "", + " Creation is executed as follows:", + "", + " - the destination address is computed based on the sender and hash of the code.", + " - account is created at the computed address.", + " - the `ctor_code` is executed in the context of the newly created account. Buffer returned", + " after the execution is saved as the `code` of the account. That code will be invoked", + " upon any message received by this account." + ] + } + ] + }, + "outerDispatch": { + "name": "Contract", + "index": 12 + }, + "events": [ + { + "name": "Transfer", + "arguments": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer happened `from` -> `to` with given `value` as part of a `message-call` or `create`." + ] + }, + { + "name": "Instantiated", + "arguments": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address." + ] + }, + { + "name": "CodeStored", + "arguments": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored." + ] + }, + { + "name": "ScheduleUpdated", + "arguments": [ + "u32" + ], + "documentation": [ + " Triggered when the current schedule is updated." + ] + }, + { + "name": "Dispatched", + "arguments": [ + "AccountId", + "bool" + ], + "documentation": [ + " A call was dispatched from the given account. The bool signals whether it was", + " successful execution or not." + ] + } + ] + }, + { + "name": "Module", + "prefix": "sudo", + "storage": { + "prefix": "Sudo", + "functions": [ + { + "name": "Key", + "modifier": 1, + "type": "AccountId", + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "sudo", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "set_key", + "arguments": [ + { + "name": "new", + "type": "Address" + } + ], + "documentation": [] + } + ] + }, + "outerDispatch": { + "name": "Sudo", + "index": 13 + }, + "events": [ + { + "name": "Sudid", + "arguments": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + }, + { + "name": "KeyChanged", + "arguments": [ + "AccountId" + ], + "documentation": [ + " The sudoer just switched identity; the old key is supplied." + ] + } + ] + } + ] + } +} diff --git a/packages/types/src/Metadata/v1/outerDispatch.ts b/packages/types/src/Metadata/v1/outerDispatch.ts new file mode 100644 index 0000000000..c5bb64d659 --- /dev/null +++ b/packages/types/src/Metadata/v1/outerDispatch.ts @@ -0,0 +1,30 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import Struct from '../../codec/Struct'; +import Text from '../../Text'; +import U16 from '../../U16'; + +export class OuterDispatchCall extends Struct { + constructor (value?: any) { + super({ + name: Text, + index: U16 + }, value); + } + + /** + * @description The [[U16]] index for the call + */ + get index (): U16 { + return this.get('index') as U16; + } + + /** + * @description The name for the call + */ + get name (): Text { + return this.get('name') as Text; + } +} diff --git a/packages/types/src/Metadata/v1/static.ts b/packages/types/src/Metadata/v1/static.ts new file mode 100644 index 0000000000..4f10ad99af --- /dev/null +++ b/packages/types/src/Metadata/v1/static.ts @@ -0,0 +1,7 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +const meta = '0x6d6574610140184d6f64756c651873797374656d011853797374656d28304163636f756e744e6f6e6365010130543a3a4163636f756e74496420543a3a496e646578200000000000000000003845787472696e736963436f756e7400000c75333204000024426c6f636b48617368010138543a3a426c6f636b4e756d6265721c543a3a48617368800000000000000000000000000000000000000000000000000000000000000000003445787472696e7369634461746101010c7533321c5665633c75383e0400002852616e646f6d5365656401001c543a3a4861736880000000000000000000000000000000000000000000000000000000000000000000184e756d626572010038543a3a426c6f636b4e756d626572200000000000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801001c543a3a48617368800000000000000000000000000000000000000000000000000000000000000000003845787472696e73696373526f6f7401001c543a3a486173688000000000000000000000000000000000000000000000000000000000000000000018446967657374010024543a3a446967657374040000184576656e74730100685665633c4576656e745265636f72643c543a3a4576656e743e3e0400001043616c6c0000084045787472696e7369635375636365737300049420416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c656400045420416e2065787472696e736963206661696c65642e184d6f64756c651061757261001043616c6c000000184d6f64756c652474696d657374616d70012454696d657374616d700c0c4e6f77010024543a3a4d6f6d656e7420000000000000000004902043757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e2c426c6f636b506572696f64010024543a3a4d6f6d656e7420050000000000000004c420546865206d696e696d756d2028616e6420616476697365642920706572696f64206265747765656e20626c6f636b732e24446964557064617465010010626f6f6c040004b420446964207468652074696d657374616d7020676574207570646174656420696e207468697320626c6f636b3f1043616c6c0400000c736574040c6e6f7748436f6d706163743c543a3a4d6f6d656e743e205820536574207468652063757272656e742074696d652e0055012045787472696e736963207769746820746869732063616c6c2073686f756c6420626520706c616365642061742074686520737065636966696320706f736974696f6e20696e20746865206561636820626c6f636b6d012028737065636966696564206279207468652054726169743a3a54494d455354414d505f5345545f504f534954494f4e29207479706963616c6c7920617420746865207374617274206f6620746865206561636820626c6f636b2e750120546869732063616c6c2073686f756c6420626520696e766f6b65642065786163746c79206f6e63652070657220626c6f636b2e2049742077696c6c2070616e6963206174207468652066696e616c697a6174696f6e2070686173652cbc20696620746869732063616c6c206861736e2774206265656e20696e766f6b656420627920746861742074696d652e008501205468652074696d657374616d702073686f756c642062652067726561746572207468616e207468652070726576696f7573206f6e652062792074686520616d6f756e74207370656369666965642062792060626c6f636b5f706572696f64602e012454696d657374616d70000000184d6f64756c6524636f6e73656e7375730124436f6e73656e737573044c4f726967696e616c417574686f7269746965730000485665633c543a3a53657373696f6e4b65793e0400001043616c6c180000487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0468205265706f727420736f6d65206d69736265686176696f75722e0100306e6f74655f6f66666c696e65041c6f66666c696e65f43c543a3a496e686572656e744f66666c696e655265706f727420617320496e686572656e744f66666c696e655265706f72743e3a3a496e686572656e74044501204e6f7465207468652070726576696f757320626c6f636b27732076616c696461746f72206d6973736564207468656972206f70706f7274756e69747920746f2070726f706f7365206120626c6f636b2e02001872656d61726b041c5f72656d61726b1c5665633c75383e046c204d616b6520736f6d65206f6e2d636861696e2072656d61726b2e0300387365745f686561705f7061676573041470616765730c75363404fc2053657420746865206e756d626572206f6620706167657320696e2074686520576562417373656d626c7920656e7669726f6e6d656e74277320686561702e0400207365745f636f6465040c6e65771c5665633c75383e04482053657420746865206e657720636f64652e05002c7365745f73746f7261676504146974656d73345665633c4b657956616c75653e046c2053657420736f6d65206974656d73206f662073746f726167652e0124436f6e73656e737573010000184d6f64756c651c696e6469636573011c496e6469636573082c4e657874456e756d53657401003c543a3a4163636f756e74496e6465781000000000047c20546865206e657874206672656520656e756d65726174696f6e207365742e1c456e756d53657401013c543a3a4163636f756e74496e646578445665633c543a3a4163636f756e7449643e040004582054686520656e756d65726174696f6e20736574732e1043616c6c00011c496e64696365730200043c4e65774163636f756e74496e64657808244163636f756e744964304163636f756e74496e646578046c2041206e6577206163636f756e742077617320637265617465642e184d6f64756c652062616c616e636573012042616c616e6365732034546f74616c49737375616e6365010028543a3a42616c616e6365400000000000000000000000000000000004a42054686520746f74616c20616d6f756e74206f66207374616b65206f6e207468652073797374656d2e484578697374656e7469616c4465706f736974010028543a3a42616c616e6365400000000000000000000000000000000004d020546865206d696e696d756d20616d6f756e7420616c6c6f77656420746f206b65657020616e206163636f756e74206f70656e2e2c5472616e73666572466565010028543a3a42616c616e636540000000000000000000000000000000000494205468652066656520726571756972656420746f206d616b652061207472616e736665722e2c4372656174696f6e466565010028543a3a42616c616e63654000000000000000000000000000000000042501205468652066656520726571756972656420746f2063726561746520616e206163636f756e742e204174206c6561737420617320626967206173205265636c61696d5265626174652e2c4672656542616c616e6365010130543a3a4163636f756e74496428543a3a42616c616e636540000000000000000000000000000000002c9c20546865202766726565272062616c616e6365206f66206120676976656e206163636f756e742e004d01205468697320697320746865206f6e6c792062616c616e63652074686174206d61747465727320696e207465726d73206f66206d6f7374206f7065726174696f6e73206f6e20746f6b656e732e204974206973690120616c6f6e65207573656420746f2064657465726d696e65207468652062616c616e6365207768656e20696e2074686520636f6e747261637420657865637574696f6e20656e7669726f6e6d656e742e205768656e207468697355012062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e20746865202763757272656e74206163636f756e74272069733d012064656c657465643a207370656369666963616c6c7920604672656542616c616e6365602e20467572746865726d6f72652c20604f6e4672656542616c616e63655a65726f602063616c6c6261636b410120697320696e766f6b65642c20676976696e672061206368616e636520746f2065787465726e616c206d6f64756c657320746f20636c65616e75702064617461206173736f636961746564207769746854207468652064656c65746564206163636f756e742e005d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c657465642069662060526573657276656442616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e3c526573657276656442616c616e6365010130543a3a4163636f756e74496428543a3a42616c616e636540000000000000000000000000000000003075012054686520616d6f756e74206f66207468652062616c616e6365206f66206120676976656e206163636f756e7420746861742069732065787465726e616c6c792072657365727665643b20746869732063616e207374696c6c206765749c20736c61736865642c20627574206765747320736c6173686564206c617374206f6620616c6c2e006d0120546869732062616c616e63652069732061202772657365727665272062616c616e63652074686174206f746865722073756273797374656d732075736520696e206f7264657220746f2073657420617369646520746f6b656e737101207468617420617265207374696c6c20276f776e65642720627920746865206163636f756e7420686f6c6465722c20627574207768696368206172652073757370656e6461626c652e20285468697320697320646966666572656e74290120616e642077686f6c6c7920756e72656c6174656420746f207468652060426f6e64616765602073797374656d207573656420696e20746865207374616b696e67206d6f64756c652e29007501205768656e20746869732062616c616e63652066616c6c732062656c6f77207468652076616c7565206f6620604578697374656e7469616c4465706f736974602c207468656e2074686973202772657365727665206163636f756e7427b42069732064656c657465643a207370656369666963616c6c792c2060526573657276656442616c616e6365602e004d01206073797374656d3a3a4163636f756e744e6f6e63656020697320616c736f2064656c6574656420696620604672656542616c616e63656020697320616c736f207a65726f2028697420616c736f2067657473150120636f6c6c617073656420746f207a65726f2069662069742065766572206265636f6d6573206c657373207468616e20604578697374656e7469616c4465706f736974602e485472616e73616374696f6e42617365466565010028543a3a42616c616e6365400000000000000000000000000000000004dc205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b2074686520626173652e485472616e73616374696f6e42797465466565010028543a3a42616c616e63654000000000000000000000000000000000040d01205468652066656520746f206265207061696420666f72206d616b696e672061207472616e73616374696f6e3b20746865207065722d6279746520706f7274696f6e2e1043616c6c080000207472616e736665720810646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e04d4205472616e7366657220736f6d65206c697175696420667265652062616c616e636520746f20616e6f74686572207374616b65722e01002c7365745f62616c616e63650c0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636510667265654c436f6d706163743c543a3a42616c616e63653e2072657365727665644c436f6d706163743c543a3a42616c616e63653e049420536574207468652062616c616e636573206f66206120676976656e206163636f756e742e012042616c616e63657303000c284e65774163636f756e7408244163636f756e7449641c42616c616e6365046c2041206e6577206163636f756e742077617320637265617465642e345265617065644163636f756e7404244163636f756e744964045c20416e206163636f756e7420776173207265617065642e205472616e7366657210244163636f756e744964244163636f756e7449641c42616c616e63651c42616c616e636504b0205472616e7366657220737563636565646564202866726f6d2c20746f2c2076616c75652c2066656573292e184d6f64756c651c73657373696f6e011c53657373696f6e202856616c696461746f72730100445665633c543a3a4163636f756e7449643e0400047c205468652063757272656e7420736574206f662076616c696461746f72732e3453657373696f6e4c656e677468010038543a3a426c6f636b4e756d62657220e803000000000000047c2043757272656e74206c656e677468206f66207468652073657373696f6e2e3043757272656e74496e646578010038543a3a426c6f636b4e756d62657220000000000000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e3043757272656e745374617274010024543a3a4d6f6d656e7420000000000000000004a02054696d657374616d70207768656e2063757272656e742073657373696f6e20737461727465642e44466f7263696e674e657753657373696f6e000010626f6f6c0400087901204e65772073657373696f6e206973206265696e6720666f72636564206973207468697320656e747279206578697374733b20696e20776869636820636173652c2074686520626f6f6c65616e2076616c75652069732077686574686572810120746865206e65772073657373696f6e2073686f756c6420626520636f6e736964657265642061206e6f726d616c20726f746174696f6e202872657761726461626c6529206f7220657863657074696f6e616c2028736c61736861626c65292e404c6173744c656e6774684368616e6765000038543a3a426c6f636b4e756d626572040004c020426c6f636b206174207768696368207468652073657373696f6e206c656e677468206c617374206368616e6765642e284e6578744b6579466f72000130543a3a4163636f756e74496434543a3a53657373696f6e4b65790400049020546865206e657874206b657920666f72206120676976656e2076616c696461746f722e444e65787453657373696f6e4c656e677468000038543a3a426c6f636b4e756d6265720400046420546865206e6578742073657373696f6e206c656e6774682e1043616c6c0c00001c7365745f6b6579040c6b657934543a3a53657373696f6e4b65790861012053657473207468652073657373696f6e206b6579206f6620605f76616c696461746f726020746f20605f6b6579602e205468697320646f65736e27742074616b652065666665637420756e74696c20746865206e657874242073657373696f6e2e0100287365745f6c656e677468040c6e65775c436f6d706163743c543a3a426c6f636b4e756d6265723e046d01205365742061206e65772073657373696f6e206c656e6774682e20576f6e2774206b69636b20696e20756e74696c20746865206e6578742073657373696f6e206368616e6765202861742063757272656e74206c656e677468292e020044666f7263655f6e65775f73657373696f6e04346170706c795f7265776172647310626f6f6c045820466f726365732061206e65772073657373696f6e2e011c53657373696f6e040004284e657753657373696f6e042c426c6f636b4e756d626572085501204e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f742074686520626c6f636b88206e756d626572206173207468652074797065206d6967687420737567676573742e184d6f64756c651c7374616b696e67011c5374616b696e67583856616c696461746f72436f756e7401000c753332100000000004a82054686520696465616c206e756d626572206f66207374616b696e67207061727469636970616e74732e544d696e696d756d56616c696461746f72436f756e7401000c7533321004000000044101204d696e696d756d206e756d626572206f66207374616b696e67207061727469636970616e7473206265666f726520656d657267656e637920636f6e646974696f6e732061726520696d706f7365642e3853657373696f6e73506572457261010038543a3a426c6f636b4e756d62657220e80300000000000004a420546865206c656e677468206f662061207374616b696e672065726120696e2073657373696f6e732e3453657373696f6e52657761726401001c50657262696c6c103c000000042101204d6178696d756d207265776172642c207065722076616c696461746f722c20746861742069732070726f7669646564207065722061636365707461626c652073657373696f6e2e304f66666c696e65536c61736801001c50657262696c6c1040420f0004510120536c6173682c207065722076616c696461746f7220746861742069732074616b656e20666f72207468652066697273742074696d6520746865792061726520666f756e6420746f206265206f66666c696e652e444f66666c696e65536c617368477261636501000c7533321000000000043901204e756d626572206f6620696e7374616e636573206f66206f66666c696e65207265706f727473206265666f726520736c617368696e6720626567696e7320666f722076616c696461746f72732e3c426f6e64696e674475726174696f6e010038543a3a426c6f636b4e756d62657220e80300000000000004b820546865206c656e677468206f662074686520626f6e64696e67206475726174696f6e20696e20626c6f636b732e30496e76756c657261626c65730100445665633c543a3a4163636f756e7449643e040008a50120416e792076616c696461746f72732074686174206d6179206e6576657220626520736c6173686564206f7220666f726369626c65206b69636b65642e20497427732061205665632073696e63652074686579277265206561737920746f20696e697469616c697365ad0120616e642074686520706572666f726d616e636520686974206973206d696e696d616c2028776520657870656374206e6f206d6f7265207468616e20666f757220696e76756c6e657261626c65732920616e64207265737472696374656420746f20746573746e6574732e2843757272656e74457261010038543a3a426c6f636b4e756d626572200000000000000000045c205468652063757272656e742065726120696e6465782e5056616c696461746f72507265666572656e636573010130543a3a4163636f756e7449646856616c696461746f7250726566733c543a3a42616c616e63653e080c00048820507265666572656e636573207468617420612076616c696461746f72206861732e28496e74656e74696f6e730100445665633c543a3a4163636f756e7449643e040004a420416c6c20746865206163636f756e7473207769746820612064657369726520746f207374616b652e284e6f6d696e6174696e67000130543a3a4163636f756e74496430543a3a4163636f756e744964040004a020416c6c206e6f6d696e61746f72202d3e206e6f6d696e65652072656c6174696f6e73686970732e344e6f6d696e61746f7273466f72010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e04000494204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e742e5043757272656e744e6f6d696e61746f7273466f72010130543a3a4163636f756e744964445665633c543a3a4163636f756e7449643e0400040501204e6f6d696e61746f727320666f72206120706172746963756c6172206163636f756e74207468617420697320696e20616374696f6e207269676874206e6f772e5043757272656e7453657373696f6e526577617264010028543a3a42616c616e63654000000000000000000000000000000000042101204d6178696d756d207265776172642c207065722076616c696461746f722c20746861742069732070726f7669646564207065722061636365707461626c652073657373696f6e2e4c43757272656e744f66666c696e65536c617368010028543a3a42616c616e6365400000000000000000000000000000000004510120536c6173682c207065722076616c696461746f7220746861742069732074616b656e20666f72207468652066697273742074696d6520746865792061726520666f756e6420746f206265206f66666c696e652e484e65787453657373696f6e73506572457261000038543a3a426c6f636b4e756d6265720400049020546865206e6578742076616c7565206f662073657373696f6e7320706572206572612e4c4c6173744572614c656e6774684368616e6765010038543a3a426c6f636b4e756d62657220000000000000000004e0205468652073657373696f6e20696e6465782061742077686963682074686520657261206c656e677468206c617374206368616e6765642e285374616b6552616e6765010048506169724f663c543a3a42616c616e63653e80000000000000000000000000000000000000000000000000000000000000000004f020546865206869676865737420616e64206c6f77657374207374616b65642076616c696461746f7220736c61736861626c652062616c616e6365732e1c426f6e64616765010130543a3a4163636f756e74496438543a3a426c6f636b4e756d62657220000000000000000004f42054686520626c6f636b20617420776869636820746865206077686f6027732066756e6473206265636f6d6520656e746972656c79206c69717569642e28536c617368436f756e74010130543a3a4163636f756e7449640c753332100000000004d10120546865206e756d626572206f662074696d6573206120676976656e2076616c696461746f7220686173206265656e207265706f72746564206f66666c696e652e205468697320676574732064656372656d656e746564206279206f6e652065616368206572612074686174207061737365732e34466f7263696e674e65774572610000082829040004682057652061726520666f7263696e672061206e6577206572612e1043616c6c2c0000147374616b65000cc0204465636c617265207468652064657369726520746f207374616b6520666f7220746865207472616e736163746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e01001c756e7374616b650440696e74656e74696f6e735f696e64657830436f6d706163743c7533323e0cc02052657472616374207468652064657369726520746f207374616b6520666f7220746865207472616e736163746f722e00dc20456666656374732077696c6c2062652066656c742061742074686520626567696e6e696e67206f6620746865206e657874206572612e0200206e6f6d696e61746504187461726765748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500030028756e6e6f6d696e61746504307461726765745f696e64657830436f6d706163743c7533323e0811012057696c6c2070616e69632069662063616c6c6564207768656e20736f757263652069736e27742063757272656e746c79206e6f6d696e6174696e67207461726765742ee42055706461746573204e6f6d696e6174696e672c204e6f6d696e61746f7273466f7220616e64204e6f6d696e6174696f6e42616c616e63652e04005072656769737465725f707265666572656e6365730840696e74656e74696f6e735f696e64657830436f6d706163743c7533323e1470726566736856616c696461746f7250726566733c543a3a42616c616e63653e0c5901205365742074686520676976656e206163636f756e74277320707265666572656e636520666f7220736c617368696e67206265686176696f75722073686f756c64207468657920626520612076616c696461746f722e00190120416e206572726f7220286e6f2d6f7029206966206053656c663a3a696e74656e74696f6e7328295b696e74656e74696f6e735f696e6465785d20213d206f726967696e602e0500507365745f73657373696f6e735f7065725f657261040c6e65775c436f6d706163743c543a3a426c6f636b4e756d6265723e04982053657420746865206e756d626572206f662073657373696f6e7320696e20616e206572612e0600507365745f626f6e64696e675f6475726174696f6e040c6e65775c436f6d706163743c543a3a426c6f636b4e756d6265723e04b020546865206c656e677468206f662074686520626f6e64696e67206475726174696f6e20696e20657261732e07004c7365745f76616c696461746f725f636f756e74040c6e657730436f6d706163743c7533323e04802054686520696465616c206e756d626572206f662076616c696461746f72732e080034666f7263655f6e65775f65726104346170706c795f7265776172647310626f6f6c083d0120466f72636520746865726520746f2062652061206e6577206572612e205468697320616c736f20666f726365732061206e65772073657373696f6e20696d6d6564696174656c792061667465722e250120606170706c795f72657761726473602073686f756c64206265207472756520666f722076616c696461746f727320746f20676574207468652073657373696f6e207265776172642e09005c7365745f6f66666c696e655f736c6173685f6772616365040c6e657730436f6d706163743c7533323e04902053657420746865206f66666c696e6520736c61736820677261636520706572696f642e0a00447365745f696e76756c6e657261626c6573042876616c696461746f7273445665633c543a3a4163636f756e7449643e04cc20536574207468652076616c696461746f72732077686f2063616e6e6f7420626520736c61736865642028696620616e79292e011c5374616b696e6705000c18526577617264041c42616c616e636504e020416c6c2076616c696461746f72732068617665206265656e2072657761726465642062792074686520676976656e2062616c616e63652e384f66666c696e655761726e696e6708244163636f756e7449640c753332085501204f6e652076616c696461746f722028616e64207468656972206e6f6d696e61746f72732920686173206265656e20676976656e2061206f66666c696e652d7761726e696e67202874686579277265207374696c6c15012077697468696e207468656972206772616365292e205468652061636372756564206e756d626572206f6620736c6173686573206973207265636f726465642c20746f6f2e304f66666c696e65536c61736808244163636f756e7449641c42616c616e6365042d01204f6e652076616c696461746f722028616e64207468656972206e6f6d696e61746f72732920686173206265656e20736c61736865642062792074686520676976656e20616d6f756e742e184d6f64756c652464656d6f6372616379012444656d6f63726163793c3c5075626c696350726f70436f756e7401002450726f70496e646578100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f70730100ac5665633c2850726f70496e6465782c20543a3a50726f706f73616c2c20543a3a4163636f756e744964293e0400048020546865207075626c69632070726f706f73616c732e20556e736f727465642e244465706f7369744f6600012450726f70496e6465787c28543a3a42616c616e63652c205665633c543a3a4163636f756e7449643e29040004842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e304c61756e6368506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e384d696e696d756d4465706f736974010028543a3a42616c616e6365400000000000000000000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e2c5075626c696344656c6179010038543a3a426c6f636b4e756d62657220000000000000000004d4205468652064656c6179206265666f726520656e6163746d656e7420666f7220616c6c207075626c6963207265666572656e64612e384d61784c6f636b506572696f647301002c4c6f636b506572696f6473040004d90120546865206d6178696d756d206e756d626572206f66206164646974696f6e616c206c6f636b20706572696f6473206120766f746572206d6179206f6666657220746f20737472656e677468656e20746865697220766f74652e204d756c7469706c6573206f6620605075626c696344656c6179602e30566f74696e67506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e3c5265666572656e64756d436f756e7401003c5265666572656e64756d496e646578100000000004390120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e64756d73207374617274656420736f206661722e244e65787454616c6c7901003c5265666572656e64756d496e646578100000000004c820546865206e657874207265666572656e64756d20696e64657820746861742073686f756c642062652074616c6c6965642e405265666572656e64756d496e666f4f6600013c5265666572656e64756d496e646578b4285265666572656e64756d496e666f3c543a3a426c6f636b4e756d6265722c20543a3a50726f706f73616c3e29040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e3444697370617463685175657565010138543a3a426c6f636b4e756d626572ac5665633c4f7074696f6e3c28543a3a50726f706f73616c2c205265666572656e64756d496e646578293e3e040004c0205175657565206f66207375636365737366756c207265666572656e646120746f20626520646973706174636865642e1c426f6e64616765010130543a3a4163636f756e74496438543a3a426c6f636b4e756d62657220000000000000000004d02054686520626c6f636b20617420776869636820746865206077686f6027732066756e6473206265636f6d65206c69717569642e24566f74657273466f7201013c5265666572656e64756d496e646578445665633c543a3a4163636f756e7449643e040004a4204765742074686520766f7465727320666f72207468652063757272656e742070726f706f73616c2e18566f74654f6601017c285265666572656e64756d496e6465782c20543a3a4163636f756e7449642910566f746504000cd501204765742074686520766f746520696e206120676976656e207265666572656e64756d206f66206120706172746963756c617220766f7465722e2054686520726573756c74206973206d65616e696e6766756c206f6e6c792069662060766f746572735f666f726020696e636c7564657320746865c90120766f746572207768656e2063616c6c6564207769746820746865207265666572656e64756d2028796f75276c6c20676574207468652064656661756c742060566f7465602076616c7565206f7468657277697365292e20496620796f7520646f6e27742077616e7420746f20636865636b61012060766f746572735f666f72602c207468656e20796f752063616e20616c736f20636865636b20666f722073696d706c65206578697374656e636520776974682060566f74654f663a3a657869737473602066697273742e1043616c6c1800001c70726f706f7365082070726f706f73616c40426f783c543a3a50726f706f73616c3e1476616c75654c436f6d706163743c543a3a42616c616e63653e04a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e0100187365636f6e64042070726f706f73616c48436f6d706163743c50726f70496e6465783e04a02050726f706f736520612073656e73697469766520616374696f6e20746f2062652074616b656e2e020010766f746508247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e10766f746510566f746508350120566f746520696e2061207265666572656e64756d2e2049662060766f74652e69735f6179652829602c2074686520766f746520697320746f20656e616374207468652070726f706f73616c3bbc206f7468657277697365206974206973206120766f746520746f206b65657020746865207374617475732071756f2e03004073746172745f7265666572656e64756d0c2070726f706f73616c40426f783c543a3a50726f706f73616c3e247468726573686f6c6434566f74655468726573686f6c641464656c617938543a3a426c6f636b4e756d62657204502053746172742061207265666572656e64756d2e04004463616e63656c5f7265666572656e64756d04247265665f696e64657860436f6d706163743c5265666572656e64756d496e6465783e04542052656d6f76652061207265666572656e64756d2e05003463616e63656c5f71756575656408107768656e5c436f6d706163743c543a3a426c6f636b4e756d6265723e14776869636830436f6d706163743c7533323e04a02043616e63656c20612070726f706f73616c2071756575656420666f7220656e6163746d656e742e012444656d6f6372616379060018185461626c65640c2450726f70496e6465781c42616c616e6365385665633c4163636f756e7449643e001c53746172746564083c5265666572656e64756d496e64657834566f74655468726573686f6c640018506173736564043c5265666572656e64756d496e64657800244e6f74506173736564043c5265666572656e64756d496e646578002443616e63656c6c6564043c5265666572656e64756d496e64657800204578656375746564083c5265666572656e64756d496e64657810626f6f6c00184d6f64756c651c636f756e63696c011c436f756e63696c503443616e646964616379426f6e64010028543a3a42616c616e6365400900000000000000000000000000000004050120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f207375626d6974206f6e6527732063616e6469646163792e28566f74696e67426f6e64010028543a3a42616c616e6365400000000000000000000000000000000004090120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f2062652061626c6520746f207375626d697420766f7465732e5050726573656e74536c617368506572566f746572010028543a3a42616c616e63654001000000000000000000000000000000040d01205468652070756e6973686d656e742c2070657220766f7465722c20696620796f752070726f7669646520616e20696e76616c69642070726573656e746174696f6e2e284361727279436f756e7401000c753332100200000004350120486f77206d616e792072756e6e6572732d75702073686f756c64206861766520746865697220617070726f76616c73207065727369737420756e74696c20746865206e65787420766f74652e5050726573656e746174696f6e4475726174696f6e010038543a3a426c6f636b4e756d62657220e803000000000000043d0120486f77206c6f6e6720746f2067697665206561636820746f702063616e64696461746520746f2070726573656e74207468656d73656c7665732061667465722074686520766f746520656e64732e4c496e6163746976654772616365506572696f64010024566f7465496e646578100100000008a10120486f77206d616e7920766f746520696e6465786573206e65656420746f20676f20627920616674657220612074617267657420766f7465722773206c61737420766f7465206265666f726520746865792063616e206265207265617065642069662074686569725020617070726f76616c7320617265206d6f6f742e30566f74696e67506572696f64010038543a3a426c6f636b4e756d62657220e80300000000000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e305465726d4475726174696f6e010038543a3a426c6f636b4e756d626572200500000000000000049820486f77206c6f6e67206561636820706f736974696f6e2069732061637469766520666f722e3044657369726564536561747301000c753332100000000004e8204e756d626572206f66206163636f756e747320746861742073686f756c642062652073697474696e67206f6e2074686520636f756e63696c2e34416374697665436f756e63696c01008c5665633c28543a3a4163636f756e7449642c20543a3a426c6f636b4e756d626572293e0400106d01205468652063757272656e7420636f756e63696c2e205768656e2074686572652773206120766f746520676f696e67206f6e2c20746869732073686f756c64207374696c6c206265207573656420666f72206578656375746976657101206d6174746572732e2054686520626c6f636b206e756d62657220287365636f6e6420656c656d656e7420696e20746865207475706c65292069732074686520626c6f636b207468617420746865697220706f736974696f6e20697371012061637469766520756e74696c202863616c63756c61746564206279207468652073756d206f662074686520626c6f636b206e756d626572207768656e2074686520636f756e63696c206d656d6265722077617320656c65637465646820616e64207468656972207465726d206475726174696f6e292e24566f7465436f756e74010024566f7465496e64657810000000000405012054686520746f74616c206e756d626572206f6620766f746573207468617420686176652068617070656e6564206f722061726520696e2070726f67726573732e2c417070726f76616c734f66010130543a3a4163636f756e744964245665633c626f6f6c3e0400086d012041206c697374206f6620766f74657320666f72206561636820766f7465722c2072657370656374696e6720746865206c61737420636c656172656420766f746520696e6465782074686174207468697320766f7465722077617340206c617374206163746976652061742e385265676973746572496e666f4f66000130543a3a4163636f756e7449644028566f7465496e6465782c20753332290400087d012054686520766f746520696e64657820616e64206c69737420736c6f742074686174207468652063616e646964617465206077686f60207761732072656769737465726564206f7220604e6f6e6560206966207468657920617265206e6f74582063757272656e746c7920726567697374657265642e304c6173744163746976654f66000130543a3a4163636f756e74496424566f7465496e646578040004010120546865206c61737420636c656172656420766f746520696e6465782074686174207468697320766f74657220776173206c617374206163746976652061742e18566f746572730100445665633c543a3a4163636f756e7449643e04000460205468652070726573656e7420766f746572206c6973742e2843616e646964617465730100445665633c543a3a4163636f756e7449643e04000470205468652070726573656e742063616e646964617465206c6973742e3843616e646964617465436f756e7401000c753332100000000000304e65787446696e616c6973650000a028543a3a426c6f636b4e756d6265722c207533322c205665633c543a3a4163636f756e7449643e29040004210120546865206163636f756e747320686f6c64696e672074686520736561747320746861742077696c6c206265636f6d652066726565206f6e20746865206e6578742074616c6c792e40536e617073686f7465645374616b657301003c5665633c543a3a42616c616e63653e040004e820546865207374616b6573206173207468657920776572652061742074686520706f696e7420746861742074686520766f746520656e6465642e2c4c6561646572626f61726400007c5665633c28543a3a42616c616e63652c20543a3a4163636f756e744964293e040004e02047657420746865206c6561646572626f6172642069662077653b726520696e207468652070726573656e746174696f6e2070686173652e1043616c6c240000347365745f617070726f76616c730814766f746573245665633c626f6f6c3e14696e64657848436f6d706163743c566f7465496e6465783e086101205365742063616e64696461746520617070726f76616c732e20417070726f76616c20736c6f747320737461792076616c6964206173206c6f6e672061732063616e6469646174657320696e2074686f736520736c6f7473402061726520726567697374657265642e01004c726561705f696e6163746976655f766f74657210387265706f727465725f696e64657830436f6d706163743c7533323e0c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263652477686f5f696e64657830436f6d706163743c7533323e48617373756d65645f766f74655f696e64657848436f6d706163743c566f7465496e6465783e1461012052656d6f7665206120766f7465722e20466f72206974206e6f7420746f206265206120626f6e642d636f6e73756d696e67206e6f2d6f702c20616c6c20617070726f7665642063616e64696461746520696e64696365737101206d757374206e6f772062652065697468657220756e72656769737465726564206f72207265676973746572656420746f20612063616e646964617465207468617420726567697374657265642074686520736c6f74206166746572a02074686520766f7465722067617665207468656972206c61737420617070726f76616c207365742e000101204d61792062652063616c6c656420627920616e796f6e652e2052657475726e732074686520766f746572206465706f73697420746f20607369676e6564602e020034726574726163745f766f7465720414696e64657830436f6d706163743c7533323e042d012052656d6f7665206120766f7465722e20416c6c20766f746573206172652063616e63656c6c656420616e642074686520766f746572206465706f7369742069732072657475726e65642e0300407375626d69745f63616e6469646163790410736c6f7430436f6d706163743c7533323e0c78205375626d6974206f6e6573656c6620666f722063616e6469646163792e001101204163636f756e74206d757374206861766520656e6f756768207472616e736665727261626c652066756e647320696e20697420746f207061792074686520626f6e642e04003870726573656e745f77696e6e65720c2463616e6469646174658c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636514746f74616c4c436f6d706163743c543a3a42616c616e63653e14696e64657848436f6d706163743c566f7465496e6465783e0c650120436c61696d207468617420607369676e656460206973206f6e65206f662074686520746f702053656c663a3a63617272795f636f756e742829202b2063757272656e745f766f746528292e312063616e646964617465732ea501204f6e6c7920776f726b73206966207468652060626c6f636b5f6e756d626572203e3d2063757272656e745f766f746528292e306020616e6420603c2063757272656e745f766f746528292e30202b2070726573656e746174696f6e5f6475726174696f6e282960607820607369676e6564602073686f756c642068617665206174206c656173740500447365745f646573697265645f73656174730414636f756e7430436f6d706163743c7533323e0c650120536574207468652064657369726564206d656d62657220636f756e743b206966206c6f776572207468616e207468652063757272656e7420636f756e742c207468656e2073656174732077696c6c206e6f74206265207570690120656c656374696f6e207768656e2074686579206578706972652e204966206d6f72652c207468656e2061206e657720766f74652077696c6c2062652073746172746564206966206f6e65206973206e6f7420616c72656164793420696e2070726f67726573732e06003472656d6f76655f6d656d626572040c77686f8c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c71012052656d6f7665206120706172746963756c6172206d656d6265722e20412074616c6c792077696c6c2068617070656e20696e7374616e746c7920286966206e6f7420616c726561647920696e20612070726573656e746174696f6e410120706572696f642920746f2066696c6c2074686520736561742069662072656d6f76616c206d65616e732074686174207468652064657369726564206d656d6265727320617265206e6f74206d65742e7c20546869732069732065666665637469766520696d6d6564696174656c792e0700647365745f70726573656e746174696f6e5f6475726174696f6e0414636f756e745c436f6d706163743c543a3a426c6f636b4e756d6265723e08590120536574207468652070726573656e746174696f6e206475726174696f6e2e2049662074686572652069732063757272656e746c79206120766f7465206265696e672070726573656e74656420666f722c2077696c6c6020696e766f6b65206066696e616c6973655f766f7465602e0800447365745f7465726d5f6475726174696f6e0414636f756e745c436f6d706163743c543a3a426c6f636b4e756d6265723e08510120536574207468652070726573656e746174696f6e206475726174696f6e2e2049662074686572652069732063757272656e74206120766f7465206265696e672070726573656e74656420666f722c2077696c6c6020696e766f6b65206066696e616c6973655f766f7465602e011c436f756e63696c0700102c566f74657252656170656408244163636f756e744964244163636f756e74496404542072656170656420766f7465722c2072656170657240426164526561706572536c617368656404244163636f756e744964043c20736c6173686564207265617065723054616c6c7953746172746564040c75333204f420412074616c6c792028666f7220617070726f76616c20766f746573206f6620636f756e63696c2073656174287329292068617320737461727465642e3854616c6c7946696e616c6973656408385665633c4163636f756e7449643e385665633c4163636f756e7449643e04690120412074616c6c792028666f7220617070726f76616c20766f746573206f6620636f756e63696c2073656174287329292068617320656e646564202877697468206f6e65206f72206d6f7265206e6577206d656d62657273292e184d6f64756c6538636f756e63696c5f766f74696e670134436f756e63696c566f74696e672034436f6f6c6f6666506572696f64010038543a3a426c6f636b4e756d62657220e8030000000000000030566f74696e67506572696f64010038543a3a426c6f636b4e756d6265722003000000000000000040456e61637444656c6179506572696f64010038543a3a426c6f636b4e756d62657220000000000000000004cd01204e756d626572206f6620626c6f636b7320627920776869636820746f2064656c617920656e6163746d656e74206f66207375636365737366756c2c206e6f6e2d756e616e696d6f75732d636f756e63696c2d696e7374696761746564207265666572656e64756d2070726f706f73616c732e2450726f706f73616c730100785665633c28543a3a426c6f636b4e756d6265722c20543a3a48617368293e0400002850726f706f73616c4f6600011c543a3a486173682c543a3a50726f706f73616c0400003850726f706f73616c566f7465727301011c543a3a48617368445665633c543a3a4163636f756e7449643e04000034436f756e63696c566f74654f6600015c28543a3a486173682c20543a3a4163636f756e7449642910626f6f6c040000385665746f656450726f706f73616c00011c543a3a486173688c28543a3a426c6f636b4e756d6265722c205665633c543a3a4163636f756e7449643e290400001043616c6c1400001c70726f706f7365042070726f706f73616c40426f783c543a3a50726f706f73616c3e00010010766f7465082070726f706f73616c1c543a3a486173681c617070726f766510626f6f6c000200107665746f043470726f706f73616c5f686173681c543a3a48617368000300487365745f636f6f6c6f66665f706572696f640418626c6f636b735c436f6d706163743c543a3a426c6f636b4e756d6265723e000400447365745f766f74696e675f706572696f640418626c6f636b735c436f6d706163743c543a3a426c6f636b4e756d6265723e000134436f756e63696c566f74696e670800084054616c6c7943616e63656c6174696f6e1010486173680c7533320c7533320c753332080101204120766f74696e672074616c6c79206861732068617070656e656420666f722061207265666572656e64756d2063616e63656c6c6174696f6e20766f74652ea0204c61737420746872656520617265207965732c206e6f2c206162737461696e20636f756e74732e3c54616c6c795265666572656e64756d1010486173680c7533320c7533320c75333208cc204120766f74696e672074616c6c79206861732068617070656e656420666f722061207265666572656e64756d20766f74652ea0204c61737420746872656520617265207965732c206e6f2c206162737461696e20636f756e74732e184d6f64756c653c636f756e63696c5f6d6f74696f6e730138436f756e63696c4d6f74696f6e73102450726f706f73616c730100305665633c543a3a486173683e04000498205468652028686173686573206f662920746865206163746976652070726f706f73616c732e2850726f706f73616c4f6600011c543a3a48617368583c542061732054726169743e3a3a50726f706f73616c040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e6700011c543a3a48617368e82850726f706f73616c496e6465782c207533322c205665633c543a3a4163636f756e7449643e2c205665633c543a3a4163636f756e7449643e29040004250120566f74657320666f72206120676976656e2070726f706f73616c3a202872657175697265645f7965735f766f7465732c207965735f766f746572732c206e6f5f766f74657273292e3450726f706f73616c436f756e7401000c753332100000000004482050726f706f73616c7320736f206661722e1043616c6c0800001c70726f706f736508247468726573686f6c6430436f6d706163743c7533323e2070726f706f73616c6c426f783c3c542061732054726169743e3a3a50726f706f73616c3e00010010766f74650c2070726f706f73616c1c543a3a4861736814696e64657858436f6d706163743c50726f706f73616c496e6465783e1c617070726f766510626f6f6c000138436f756e63696c4d6f74696f6e730900142050726f706f73656410244163636f756e7449643450726f706f73616c496e64657810486173680c7533320465012041206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e20753332292e14566f74656414244163636f756e744964104861736810626f6f6c0c7533320c7533320809012041206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e67f420612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e206173207533327320726573706563746976656c79292e20417070726f76656404104861736804c42041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404104861736804d42041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408104861736810626f6f6c0405012041206d6f74696f6e207761732065786563757465643b2060626f6f6c6020697320747275652069662072657475726e656420776974686f7574206572726f722e184d6f64756c651c6772616e647061013c4772616e64706146696e616c697479043450656e64696e674368616e67650000c853746f72656450656e64696e674368616e67653c543a3a426c6f636b4e756d6265722c20543a3a53657373696f6e4b65793e0400001043616c6c040000487265706f72745f6d69736265686176696f72041c5f7265706f72741c5665633c75383e0468205265706f727420736f6d65206d69736265686176696f75722e011c4772616e6470610a0004384e6577417574686f72697469657304585665633c2853657373696f6e4b65792c20753634293e0490204e657720617574686f726974792073657420686173206265656e206170706c6965642e184d6f64756c6520747265617375727901205472656173757279203050726f706f73616c426f6e6401001c5065726d696c6c10000000000851012050726f706f7274696f6e206f662066756e647320746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c61636520612070726f706f73616c2e20416e206163636570746564dc2070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f65736e27742e4c50726f706f73616c426f6e644d696e696d756d010028543a3a42616c616e63654000000000000000000000000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f64010038543a3a426c6f636b4e756d626572200100000000000000048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e01001c5065726d696c6c10000000000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e0c506f74010028543a3a42616c616e6365400000000000000000000000000000000004cc20546f74616c2066756e647320617661696c61626c6520746f2074686973206d6f64756c6520666f72207370656e64696e672e3450726f706f73616c436f756e7401003450726f706f73616c496e646578100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c7300013450726f706f73616c496e6465788850726f706f73616c3c543a3a4163636f756e7449642c20543a3a42616c616e63653e0400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e24417070726f76616c730100485665633c50726f706f73616c496e6465783e040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e1043616c6c1400003470726f706f73655f7370656e64081476616c75654c436f6d706163743c543a3a42616c616e63653e2c62656e65666963696172798c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650c2d012050757420666f727761726420612073756767657374696f6e20666f72207370656e64696e672e2041206465706f7369742070726f706f7274696f6e616c20746f207468652076616c7565350120697320726573657276656420616e6420736c6173686564206966207468652070726f706f73616c2069732072656a65637465642e2049742069732072657475726e6564206f6e636520746865542070726f706f73616c20697320617761726465642e01001c7365745f706f74041c6e65775f706f744c436f6d706163743c543a3a42616c616e63653e04b420536574207468652062616c616e6365206f662066756e647320617661696c61626c6520746f207370656e642e020024636f6e666967757265103470726f706f73616c5f626f6e6440436f6d706163743c5065726d696c6c3e5470726f706f73616c5f626f6e645f6d696e696d756d4c436f6d706163743c543a3a42616c616e63653e307370656e645f706572696f645c436f6d706163743c543a3a426c6f636b4e756d6265723e106275726e40436f6d706163743c5065726d696c6c3e0470202852652d29636f6e6669677572652074686973206d6f64756c652e03003c72656a6563745f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e04fc2052656a65637420612070726f706f736564207370656e642e20546865206f726967696e616c206465706f7369742077696c6c20626520736c61736865642e040040617070726f76655f70726f706f73616c042c70726f706f73616c5f696458436f6d706163743c50726f706f73616c496e6465783e085d0120417070726f766520612070726f706f73616c2e2041742061206c617465722074696d652c207468652070726f706f73616c2077696c6c20626520616c6c6f636174656420746f207468652062656e6566696369617279ac20616e6420746865206f726967696e616c206465706f7369742077696c6c2062652072657475726e65642e012054726561737572790b00142050726f706f736564043450726f706f73616c496e6465780438204e65772070726f706f73616c2e205370656e64696e67041c42616c616e636504e8205765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c3450726f706f73616c496e6465781c42616c616e6365244163636f756e744964048020536f6d652066756e64732068617665206265656e20616c6c6f63617465642e144275726e74041c42616c616e6365048c20536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572041c42616c616e6365043101205370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e184d6f64756c6520636f6e7472616374001043616c6c1000003c7570646174655f7363686564756c6504207363686564756c65405363686564756c653c543a3a4761733e0cb4205570646174657320746865207363686564756c6520666f72206d65746572696e6720636f6e7472616374732e000d0120546865207363686564756c65206d7573742068617665206120677265617465722076657273696f6e207468616e207468652073746f726564207363686564756c652e0100207075745f636f646508246761735f6c696d69743c436f6d706163743c543a3a4761733e10636f64651c5665633c75383e0445012053746f72657320636f646520696e207468652073746f726167652e20596f752063616e20696e7374616e746961746520636f6e747261637473206f6e6c7920776974682073746f72656420636f64652e02001063616c6c1010646573748c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263651476616c75654c436f6d706163743c543a3a42616c616e63653e246761735f6c696d69743c436f6d706163743c543a3a4761733e10646174611c5665633c75383e042901204d616b6520612063616c6c20746f206120737065636966696564206163636f756e742c206f7074696f6e616c6c79207472616e7366657272696e6720736f6d652062616c616e63652e0300186372656174651024656e646f776d656e744c436f6d706163743c543a3a42616c616e63653e246761735f6c696d69743c436f6d706163743c543a3a4761733e24636f64655f686173682c436f6465486173683c543e10646174611c5665633c75383e244d01204372656174652061206e657720636f6e74726163742c206f7074696f6e616c6c79207472616e73666572696e6720736f6d652062616c616e636520746f207468652063726561746564206163636f756e742e0084204372656174696f6e20697320657865637574656420617320666f6c6c6f77733a004101202d207468652064657374696e6174696f6e206164647265737320697320636f6d7075746564206261736564206f6e207468652073656e64657220616e642068617368206f662074686520636f64652eb8202d206163636f756e7420697320637265617465642061742074686520636f6d707574656420616464726573732e6d01202d20746865206063746f725f636f64656020697320657865637574656420696e2074686520636f6e74657874206f6620746865206e65776c792063726561746564206163636f756e742e204275666665722072657475726e65645d0120202061667465722074686520657865637574696f6e206973207361766564206173207468652060636f646560206f6620746865206163636f756e742e205468617420636f64652077696c6c20626520696e766f6b6564b420202075706f6e20616e79206d6573736167652072656365697665642062792074686973206163636f756e742e0120436f6e74726163740c0014205472616e736665720c244163636f756e744964244163636f756e7449641c42616c616e6365047501205472616e736665722068617070656e6564206066726f6d60202d3e2060746f60207769746820676976656e206076616c7565602061732070617274206f66206120606d6573736167652d63616c6c60206f722060637265617465602e30496e7374616e74696174656408244163636f756e744964244163636f756e74496404dc20436f6e7472616374206465706c6f7965642062792061646472657373206174207468652073706563696669656420616464726573732e28436f646553746f72656404104861736804b820436f646520776974682074686520737065636966696564206861736820686173206265656e2073746f7265642e3c5363686564756c6555706461746564040c75333204c020547269676765726564207768656e207468652063757272656e74207363686564756c6520697320757064617465642e284469737061746368656408244163636f756e74496410626f6f6c08390120412063616c6c2077617320646973706174636865642066726f6d2074686520676976656e206163636f756e742e2054686520626f6f6c207369676e616c7320776865746865722069742077617374207375636365737366756c20657865637574696f6e206f72206e6f742e184d6f64756c65107375646f01105375646f040c4b6579010030543a3a4163636f756e744964800000000000000000000000000000000000000000000000000000000000000000001043616c6c080000107375646f042070726f706f73616c40426f783c543a3a50726f706f73616c3e0001001c7365745f6b6579040c6e65778c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650001105375646f0d00081453756469640410626f6f6c04602041207375646f206a75737420746f6f6b20706c6163652e284b65794368616e67656404244163636f756e74496404f020546865207375646f6572206a757374207377697463686564206964656e746974793b20746865206f6c64206b657920697320737570706c6965642e'; + +export default meta; diff --git a/packages/types/src/Metadata/v1/toV0.ts b/packages/types/src/Metadata/v1/toV0.ts new file mode 100644 index 0000000000..f4db734ac8 --- /dev/null +++ b/packages/types/src/Metadata/v1/toV0.ts @@ -0,0 +1,63 @@ +// Copyright 2017-2019 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { OuterDispatchCall, OuterDispatchMetadata } from '../v0/Calls'; +import { OuterEventMetadata, OuterEventMetadataEvent } from '../v0/Events'; +import { RuntimeModuleMetadata, ModuleMetadata } from '../v0/Modules'; + +import MetadataV0 from '../v0'; +import MetadataV1 from './index'; + +function modulesV0 (v1: MetadataV1): Array { + return v1.modules.map((mod) => { + return new RuntimeModuleMetadata({ + prefix: mod.prefix, + module: new ModuleMetadata({ + name: 'Module', + call: mod.calls + }), + storage: mod.storage.isNone + ? null + : mod.storage.unwrap() + }); + }); +} + +function outerDispatchV0 (v1: MetadataV1): OuterDispatchMetadata { + return new OuterDispatchMetadata({ + name: 'Call', + calls: v1.modules + .filter((mod) => mod.outerDispatch.isSome) + .map((mod) => { + const dispatch = mod.outerDispatch.unwrap(); + + return new OuterDispatchCall({ + name: dispatch.name, + prefix: mod.prefix, + index: dispatch.index + }); + }) + }); +} + +function outerEventV0 (v1: MetadataV1): OuterEventMetadata { + return new OuterEventMetadata({ + name: 'Event', + events: v1.modules.map((mod) => + new OuterEventMetadataEvent([mod.prefix, mod.events]) + ) + }); +} + +export default function toV0 (v1: MetadataV1): MetadataV0 { + const outerEvent = outerEventV0(v1); + const modules = modulesV0(v1); + const outerDispatch = outerDispatchV0(v1); + + return new MetadataV0({ + outerEvent, + modules, + outerDispatch + }); +} diff --git a/packages/types/src/Method.ts b/packages/types/src/Method.ts index 37803a0a81..db3df5e3fc 100644 --- a/packages/types/src/Method.ts +++ b/packages/types/src/Method.ts @@ -9,7 +9,7 @@ import { assert, isHex, isObject, isU8a, hexToU8a } from '@polkadot/util'; import { getTypeDef, getTypeClass } from './codec/createType'; import Struct from './codec/Struct'; import U8aFixed from './codec/U8aFixed'; -import { FunctionMetadata, FunctionArgumentMetadata } from './Metadata/Modules'; +import { FunctionMetadata, FunctionArgumentMetadata } from './Metadata/v0/Modules'; interface ArgsDef { [index: string]: Constructor; diff --git a/packages/types/src/StorageKey.ts b/packages/types/src/StorageKey.ts index f220495927..0ece564450 100644 --- a/packages/types/src/StorageKey.ts +++ b/packages/types/src/StorageKey.ts @@ -7,7 +7,7 @@ import { AnyU8a } from './types'; import { isFunction } from '@polkadot/util'; import Bytes from './Bytes'; -import { StorageFunctionMetadata } from './Metadata/Modules'; +import { StorageFunctionMetadata } from './Metadata/v0/Modules'; export interface StorageFunction { (arg?: any): Uint8Array; diff --git a/packages/types/src/codec/EnumType.ts b/packages/types/src/codec/EnumType.ts index 02f56c9750..1de78ce34a 100644 --- a/packages/types/src/codec/EnumType.ts +++ b/packages/types/src/codec/EnumType.ts @@ -102,6 +102,13 @@ export default class EnumType extends Base implements Codec { return 1 + this.raw.encodedLength; } + /** + * @description The index of the metadata value + */ + get index (): number { + return this._index; + } + /** * @description Checks if the Enum points to a [[Null]] type */ diff --git a/packages/types/src/scripts/MetadataJsonDecode.ts b/packages/types/src/scripts/MetadataJsonDecode.ts index f1b2c8357f..98e84f7808 100644 --- a/packages/types/src/scripts/MetadataJsonDecode.ts +++ b/packages/types/src/scripts/MetadataJsonDecode.ts @@ -5,10 +5,10 @@ const fs = require('fs'); import Metadata from '../Metadata'; -import rpcdata from '../Metadata/static'; +import rpcdata from '../Metadata/v0/static'; function metadataStringifyAsJson () { - const decoded = new Metadata(rpcdata); + const decoded = new Metadata(rpcdata).asV0; return JSON.stringify(decoded.toJSON(), null, 2); } diff --git a/packages/types/src/scripts/MetadataMd.ts b/packages/types/src/scripts/MetadataMd.ts index a7fbf53e4d..440a03b942 100644 --- a/packages/types/src/scripts/MetadataMd.ts +++ b/packages/types/src/scripts/MetadataMd.ts @@ -7,7 +7,8 @@ import { stringCamelCase, stringLowerFirst } from '@polkadot/util'; import interfaces from '../../../type-jsonrpc/src'; import Metadata from '../Metadata'; -import rpcdata from '../Metadata/static'; +import MetadataV0 from '../Metadata/v0'; +import rpcdata from '../Metadata/v0/static'; import Method from '../Method'; const ANCHOR_TOP = ``; @@ -22,7 +23,7 @@ function sectionLink (sectionName: string) { return `- **[${stringCamelCase(sectionName)}](#${stringCamelCase(sectionName)})**\n\n`; } -function generateSectionLinks (sectionName: string, metadata: Metadata) { +function generateSectionLinks (sectionName: string, metadata: MetadataV0) { switch (sectionName) { case 'events': return metadata.events.map((i) => i).sort().map((data: any) => @@ -81,7 +82,7 @@ function sortExtrinsicsSectionMethods (a: any, b: any) { return nameA.localeCompare(nameB); } -function addEvents (metadata: Metadata) { +function addEvents (metadata: MetadataV0) { const renderHeading = `## ${ANCHOR_TOP}Events${DESC_EVENTS}`; const orderedSections = metadata.events.map((i) => i).sort(); const renderAnchors = generateSectionLinks('events', metadata); @@ -108,7 +109,7 @@ function addEvents (metadata: Metadata) { }, renderHeading + renderAnchors); } -function addExtrinsics (metadata: Metadata) { +function addExtrinsics (metadata: MetadataV0) { const renderHeading = `## ${ANCHOR_TOP}Extrinsics${DESC_EXTRINSICS}`; const orderedSections = metadata.modules.map((i) => i).sort(); const renderAnchors = generateSectionLinks('extrinsics', metadata); @@ -134,7 +135,7 @@ function addExtrinsics (metadata: Metadata) { }, renderHeading + renderAnchors); } -function addStorage (metadata: Metadata) { +function addStorage (metadata: MetadataV0) { const renderHeading = `## ${ANCHOR_TOP}Storage${DESC_STORAGE}`; const orderedSections = metadata.modules.sort(); const renderAnchors = generateSectionLinks('storage', metadata) + sectionLink('substrate'); @@ -179,22 +180,22 @@ function writeToRpcMd () { writeFile('docs/METHODS_RPC.md', addRpc()); } -function writeToStorageMd (metadata: Metadata) { +function writeToStorageMd (metadata: MetadataV0) { const options = { flags: 'r', encoding: 'utf8' }; const data = fs.readFileSync('packages/types/src/scripts/METHODS_STORAGE_SUBSTRATE.md', options); writeFile('docs/METHODS_STORAGE.md', addStorage(metadata), data); } -function writeToExtrinsicsMd (metadata: Metadata) { +function writeToExtrinsicsMd (metadata: MetadataV0) { writeFile('docs/METHODS_EXTRINSICS.md', addExtrinsics(metadata)); } -function writeToEventsMd (metadata: Metadata) { +function writeToEventsMd (metadata: MetadataV0) { writeFile('docs/METHODS_EVENTS.md', addEvents(metadata)); } -const metadata = new Metadata(rpcdata); +const metadata = new Metadata(rpcdata).asV0; writeToRpcMd(); writeToStorageMd(metadata);