From 6df466d9ea51c4b4c9a9572eb74fc46c08bb2b79 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 30 Jul 2020 18:17:32 +0200 Subject: [PATCH] Known types for Rococo (#2459) * Known types for Rococo * Update rococo.ts --- packages/types-known/src/spec/index.ts | 2 ++ packages/types-known/src/spec/rococo.ts | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 packages/types-known/src/spec/rococo.ts diff --git a/packages/types-known/src/spec/index.ts b/packages/types-known/src/spec/index.ts index d258b31a8d..b70dd9e1d9 100644 --- a/packages/types-known/src/spec/index.ts +++ b/packages/types-known/src/spec/index.ts @@ -7,6 +7,7 @@ import { OverrideVersionedType } from '@polkadot/types/types'; import centrifugeChain from './centrifuge-chain'; import kusama from './kusama'; import polkadot from './polkadot'; +import rococo from './rococo'; import westend from './westend'; // Type overrides for specific spec types & versions as given in runtimeVersion @@ -14,6 +15,7 @@ const typesSpec: Record = { 'centrifuge-chain': centrifugeChain, kusama, polkadot, + rococo, westend }; diff --git a/packages/types-known/src/spec/rococo.ts b/packages/types-known/src/spec/rococo.ts new file mode 100644 index 0000000000..adf2aa39bb --- /dev/null +++ b/packages/types-known/src/spec/rococo.ts @@ -0,0 +1,22 @@ +// Copyright 2017-2020 @polkadot/types-known 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 { OverrideVersionedType } from '@polkadot/types/types'; + +const sharedTypes = { + Address: 'AccountId', + Keys: 'SessionKeys5', + LookupSource: 'AccountId' +}; + +const versioned: OverrideVersionedType[] = [ + { + minmax: [0, undefined], + types: { + ...sharedTypes + } + } +]; + +export default versioned;