diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index dfee67e450..3845c9529c 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -27,6 +27,7 @@ "@sora-substrate/type-definitions": "1.6.2", "@subsocial/types": "0.6.1-1", "@zeitgeistpm/type-defs": "0.2.7", + "@zeroio/type-definitions": "0.0.6", "moonbeam-types-bundle": "1.2.4", "pontem-types-bundle": "1.0.14", "rxjs": "^7.3.0" diff --git a/packages/apps-config/src/api/spec/zero.ts b/packages/apps-config/src/api/spec/zero.ts index f0b3fe6d67..6de98abea6 100644 --- a/packages/apps-config/src/api/spec/zero.ts +++ b/packages/apps-config/src/api/spec/zero.ts @@ -3,76 +3,6 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -// structs need to be in order -/* eslint-disable sort-keys */ +import { typeBundleForPolkadot } from '@zeroio/type-definitions'; -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AccountInfo: 'AccountInfoWithDualRefCount', - AccountInfoWithDualRefCount: { - nonce: 'Index', - consumers: 'RefCount', - providers: 'RefCount', - data: 'AccountData' - }, - Campaign: { - id: 'Hash', - owner: 'AccountId', - admin: 'AccountId', - deposit: 'Balance', - expiry: 'BlockNumber', - cap: 'Balance', - name: 'Vec', - protocol: 'u8', - governance: 'u8', - cid: 'Vec', - created: 'Timestamp' - }, - Proposal: { - proposal_id: 'Hash', - campaign_id: 'Hash', - purpose: 'Vec', - cid: 'Vec', - amount: 'Balance', - expiry: 'BlockNumber', - status: 'u8' - }, - EventMessage: 'Vec', - Nonce: 'u64', - Entity: { - account: 'AccountId', - index: 'u128', - cid: 'Vec', - created: 'BlockNumber', - mutated: 'BlockNumber' - }, - EntityProperty: { - value: 'u64', - mutated: 'BlockNumber' - }, - Item: { - ItemId: 'ItemId', - ItemInfo: 'ItemInfo' - }, - ItemId: 'Hash', - ItemInfo: { - dob: 'u64', - dna: 'Hash' - }, - CID: 'Vec', - HypaspaceInfo: 'Hash', - HypaspaceMetadata: { - name: 'Vec' - } - } - } - ] -}; - -export default definitions; +export default typeBundleForPolkadot as unknown as OverrideBundleDefinition; diff --git a/yarn.lock b/yarn.lock index 9326a0cb4b..48b5e3e85d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2831,6 +2831,7 @@ __metadata: "@sora-substrate/type-definitions": 1.6.2 "@subsocial/types": 0.6.1-1 "@zeitgeistpm/type-defs": 0.2.7 + "@zeroio/type-definitions": 0.0.6 i18next: ^19.9.2 moonbeam-types-bundle: 1.2.4 pontem-types-bundle: 1.0.14 @@ -5009,6 +5010,13 @@ __metadata: languageName: node linkType: hard +"@zeroio/type-definitions@npm:0.0.6": + version: 0.0.6 + resolution: "@zeroio/type-definitions@npm:0.0.6" + checksum: ef9a34b808183172e44909237339310cbd1b07aa06edfb6a834983d4c3bb7340a47e931908d09145aa3d3250905ba2b663cf63ea81e9db59d95d8c9252208533 + languageName: node + linkType: hard + "@zondax/ledger-substrate@npm:^0.18.0": version: 0.18.0 resolution: "@zondax/ledger-substrate@npm:0.18.0"