Metadata v13 to v14 conversion (#3807)

This commit is contained in:
Jaco
2021-07-24 15:50:06 +02:00
committed by GitHub
parent d1506154bd
commit 77ffd7c153
4 changed files with 355 additions and 20 deletions
+1
View File
@@ -14,6 +14,7 @@ import typesModules from './modules';
import typesSpec from './spec';
import upgrades from './upgrades';
export { knownOrigins } from './knownOrigins';
export { packageInfo } from './packageInfo';
// flatten a VersionedType[] into a Record<string, string>
+27
View File
@@ -0,0 +1,27 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// We want predictive ordering (manually managed)
/* eslint-disable sort-keys */
// FIXME: Need some sort of solution for specifying these
// Since we don't have insight into the origin specification, we can only define what we know about
// in a pure Substrate/Polkadot implementation, any other custom origins won't be handled at all
export const knownOrigins: Record<string, string> = {
//
// (1) Defaults from Substrate
//
Council: 'CollectiveOrigin',
System: 'SystemOrigin',
TechnicalCommittee: 'CollectiveOrigin',
//
// (2) Defaults from Polkadot
//
Xcm: 'XcmOrigin',
XcmPallet: 'XcmOrigin',
//
// (3) Defaults from Acala
//
Authority: 'AuthorityOrigin',
GeneralCouncil: 'CollectiveOrigin'
};