diff --git a/.gitignore b/.gitignore index c5cd3087ae18..60844baa745c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ yarn-error.log* .log env-config.js NOTES.md +.vscode/* diff --git a/package.json b/package.json index 8a28ea97e558..40a70f558e01 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "styled-components": "^5.3.6" }, "resolutions": { + "@cord.network/type-definitions": "^0.8.1-beta.0", "@polkadot/api": "^9.11.3", "@polkadot/api-augment": "^9.11.3", "@polkadot/api-base": "^9.11.3", diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index 194ea68256bb..e309f1385393 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -13,43 +13,17 @@ "version": "0.123.0", "main": "index.js", "dependencies": { - "@acala-network/type-definitions": "^4.1.8-1", "@babel/runtime": "^7.20.7", - "@bifrost-finance/type-definitions": "1.7.2", - "@crustio/type-definitions": "1.3.0", - "@darwinia/types": "2.8.10", - "@darwinia/types-known": "2.8.10", - "@digitalnative/type-definitions": "1.1.27", - "@docknetwork/node-types": "0.15.0", - "@edgeware/node-types": "3.6.2-wako", - "@equilab/definitions": "1.4.18", - "@frequency-chain/api-augment": "^1.0.0", - "@interlay/interbtc-types": "1.11.0", - "@kiltprotocol/type-definitions": "^0.30.0", - "@laminar/type-definitions": "0.3.1", - "@logion/node-api": "^0.9.0-3", - "@mangata-finance/types": "^0.17.0", - "@metaverse-network-sdk/type-definitions": "^0.0.1-13", - "@parallel-finance/type-definitions": "1.7.14", - "@phala/typedefs": "0.2.33", - "@polkadot/api": "^9.11.3", - "@polkadot/api-derive": "^9.11.3", - "@polkadot/networks": "^10.2.6", - "@polkadot/types": "^9.11.3", - "@polkadot/util": "^10.2.6", - "@polkadot/x-fetch": "^10.2.6", - "@polymathnetwork/polymesh-types": "0.0.2", - "@snowfork/snowbridge-types": "0.2.7", - "@sora-substrate/type-definitions": "1.12.4", - "@subsocial/definitions": "^0.7.9", - "@unique-nft/opal-testnet-types": "930.34.0", - "@unique-nft/quartz-mainnet-types": "930.34.0", - "@unique-nft/unique-mainnet-types": "930.33.0", - "@zeitgeistpm/type-defs": "0.10.0", - "@zeroio/type-definitions": "0.0.14", + "@cord.network/type-definitions": "^0.8.0", + "@polkadot/api": "^9.14.2", + "@polkadot/api-derive": "^9.14.2", + "@polkadot/networks": "^10.4.2", + "@polkadot/types": "^9.14.2", + "@polkadot/util": "^10.4.2", + "@polkadot/wasm-util": "^6.4.1", + "@polkadot/x-fetch": "^10.4.2", + "@polkadot/x-ws": "^10.4.2", "lodash": "^4.17.21", - "moonbeam-types-bundle": "2.0.9", - "pontem-types-bundle": "1.0.15", "rxjs": "^7.8.0" } } diff --git a/packages/apps-config/src/api/chain/kilt.ts b/packages/apps-config/src/api/chain/cord.ts similarity index 80% rename from packages/apps-config/src/api/chain/kilt.ts rename to packages/apps-config/src/api/chain/cord.ts index 300b667def87..60af9fcd3c5c 100644 --- a/packages/apps-config/src/api/chain/kilt.ts +++ b/packages/apps-config/src/api/chain/cord.ts @@ -3,6 +3,6 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -import { typesBundle } from '@kiltprotocol/type-definitions'; +import { typesBundle } from '@cord.network/type-definitions'; export default typesBundle.chain as Record; diff --git a/packages/apps-config/src/api/chain/index.ts b/packages/apps-config/src/api/chain/index.ts index b7f5eb876606..0eebb847fe4e 100644 --- a/packages/apps-config/src/api/chain/index.ts +++ b/packages/apps-config/src/api/chain/index.ts @@ -3,15 +3,13 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -import kilt from './kilt'; +import cord from './cord'; // NOTE: The mapping is done from chain name in system.chain const chain: Record = { - 'KILT Mashnet': kilt['KILT Mashnet'], - 'KILT Peregrine': kilt['KILT Peregrine'], - 'KILT Peregrine Stagenet': kilt['KILT Peregrine Stagenet'], - 'KILT Spiritnet': kilt['KILT Spiritnet'], - 'KILT Spiritnet Develop': kilt['KILT Spiritnet Develop'] + 'Dev. Node': cord['Development'], + 'CORD Staging Testnet': cord['CORD Staging Testnet'], + 'Development': cord['Development'], }; export default chain; diff --git a/packages/apps-config/src/api/constants.ts b/packages/apps-config/src/api/constants.ts index ac8178688f03..e912a177a45d 100644 --- a/packages/apps-config/src/api/constants.ts +++ b/packages/apps-config/src/api/constants.ts @@ -21,12 +21,3 @@ export const POLKADOT_DENOM_BLOCK = new BN(1248328); export const ROCOCO_GENESIS = getGenesis('rococo'); -export const WESTEND_GENESIS = getGenesis('westend'); - -export const NEATCOIN_GENESIS = '0xfbb541421d30423c9a753ffa844b64fd44d823f513bf49e3b73b3a656309a595'; - -export const DOCK_GENESIS = '0x6bfe24dca2a3be10f22212678ac13a6446ec764103c0f3471c71609eac384aae'; - -export const DOCK_POS_TESTNET_GENESIS = '0x59d93e2ce42abb8aa52ca9a9e820233667104751f8f2980578a47a26a7235027'; - -export const NFTMART_GENESIS = '0xfcf9074303d8f319ad1bf0195b145871977e7c375883b834247cb01ff22f51f9'; diff --git a/packages/apps-config/src/api/derives.ts b/packages/apps-config/src/api/derives.ts index 5e1a35b22292..4ce184885c22 100644 --- a/packages/apps-config/src/api/derives.ts +++ b/packages/apps-config/src/api/derives.ts @@ -3,16 +3,16 @@ import type { OverrideBundleDefinition, OverrideBundleType } from '@polkadot/types/types'; -import equilibrium from './spec/equilibrium'; -import genshiro from './spec/genshiro'; -import interbtc from './spec/interbtc'; -import subspace from './spec/subspace'; +// import equilibrium from './spec/equilibrium'; +// import genshiro from './spec/genshiro'; +// import interbtc from './spec/interbtc'; +// import subspace from './spec/subspace'; const mapping: [OverrideBundleDefinition, string[]][] = [ - [equilibrium, ['Equilibrium']], - [genshiro, ['Genshiro', 'Genshiro Rococo Testnet']], - [interbtc, ['interbtc-parachain', 'interbtc-standalone', 'interlay-parachain', 'kintsugi-parachain', 'testnet-kintsugi', 'testnet-interlay']], - [subspace, ['subspace']] + // [equilibrium, ['Equilibrium']], + // [genshiro, ['Genshiro', 'Genshiro Rococo Testnet']], + // [interbtc, ['interbtc-parachain', 'interbtc-standalone', 'interlay-parachain', 'kintsugi-parachain']], + // [subspace, ['subspace']] ]; export function applyDerives (typesBundle: OverrideBundleType): OverrideBundleType { diff --git a/packages/apps-config/src/api/params/inflation.ts b/packages/apps-config/src/api/params/inflation.ts index d600dd783d00..33b2641391e4 100644 --- a/packages/apps-config/src/api/params/inflation.ts +++ b/packages/apps-config/src/api/params/inflation.ts @@ -3,7 +3,7 @@ import type { ApiPromise } from '@polkadot/api'; -import { DOCK_POS_TESTNET_GENESIS, KUSAMA_GENESIS, NEATCOIN_GENESIS, NFTMART_GENESIS, POLKADOT_GENESIS } from '../constants'; +import { KUSAMA_GENESIS, POLKADOT_GENESIS } from '../constants'; interface InflationParams { auctionAdjust: number; @@ -28,14 +28,7 @@ const DEFAULT_PARAMS: InflationParams = { }; const KNOWN_PARAMS: Record = { - [DOCK_POS_TESTNET_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }, - // 30% for up to 60 slots, see - // https://github.com/paritytech/polkadot/blob/816cb64ea16102c6c79f6be2a917d832d98df757/runtime/kusama/src/lib.rs#L526-L527 - // 75% ideal target, see - // https://github.com/paritytech/polkadot/blob/816cb64ea16102c6c79f6be2a917d832d98df757/runtime/kusama/src/lib.rs#L529-L531 [KUSAMA_GENESIS]: { ...DEFAULT_PARAMS, auctionAdjust: (0.3 / 60), auctionMax: 60, stakeTarget: 0.75 }, - [NEATCOIN_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 }, - [NFTMART_GENESIS]: { ...DEFAULT_PARAMS, falloff: 0.04, stakeTarget: 0.60 }, [POLKADOT_GENESIS]: { ...DEFAULT_PARAMS, stakeTarget: 0.75 } }; diff --git a/packages/apps-config/src/api/spec/acala.ts b/packages/apps-config/src/api/spec/acala.ts deleted file mode 100644 index 4eb470909be2..000000000000 --- a/packages/apps-config/src/api/spec/acala.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { typesBundleForPolkadot } from '@acala-network/type-definitions'; - -export default typesBundleForPolkadot.spec; diff --git a/packages/apps-config/src/api/spec/ajuna.ts b/packages/apps-config/src/api/spec/ajuna.ts deleted file mode 100644 index 8d19aebf6419..000000000000 --- a/packages/apps-config/src/api/spec/ajuna.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -/* eslint-disable sort-keys */ -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/altair.ts b/packages/apps-config/src/api/spec/altair.ts deleted file mode 100644 index 9ddcb11ca3dc..000000000000 --- a/packages/apps-config/src/api/spec/altair.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - ParachainAccountIdOf: 'AccountId', - Proof: { - leafHash: 'Hash', - sortedHashes: 'Vec' - }, - ProxyType: { - _enum: [ - 'Any', - 'NonTransfer', - 'Governance', - '_Staking', - 'NonProxy' - ] - }, - RelayChainAccountId: 'AccountId', - RootHashOf: 'Hash' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/apron.ts b/packages/apps-config/src/api/spec/apron.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/apron.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/ares-gladios.ts b/packages/apps-config/src/api/spec/ares-gladios.ts deleted file mode 100644 index 112cfa4efee7..000000000000 --- a/packages/apps-config/src/api/spec/ares-gladios.ts +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - AskPeriodNum: 'u64', - AskPointNum: 'u32', - AuthorityAres: 'AccountId', - AccountParticipateEstimates: { - account: 'AccountId', - end: 'BlockNumber', - estimates: 'Option', - range_index: 'Option', - bsc_address: 'Option', - multiplier: 'MultiplierOption', - reward: 'u128' - }, - AresPriceData: { - price: 'u64', - account_id: 'AccountId', - create_bn: 'BlockNumber', - fraction_len: 'FractionLength', - raw_number: 'JsonNumberValue', - timestamp: 'u64' - }, - BalanceOf: 'Balance', - ChooseWinnersPayload: { - block_number: 'BlockNumber', - winners: 'Vec', - public: 'AccountId', - estimates_id: 'u64', - symbol: 'Bytes', - price: '(u64, FractionLength)' - }, - EstimatesState: { - _enum: [ - 'InActive', - 'Active', - 'WaitingPayout', - 'Completed' - ] - }, - EstimatesType: { - _enum: [ - 'DEVIATION', 'RANGE' - ] - }, - FractionLength: 'u32', - HttpError: { - _enum: { - IoErr: 'Bytes', - TimeOut: 'Bytes', - StatusErr: '(Bytes,u16)', - ParseErr: 'Bytes' - } - }, - HttpErrTracePayload: { - trace_data: 'HttpErrTraceData', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - HttpErrTraceData: { - block_number: 'BlockNumber', - err_auth: 'AuthorityId', - err_status: 'HttpError', - tip: 'Bytes' - }, - JsonNumberValue: { - integer: 'u64', - fraction: 'u64', - fraction_length: 'u32', - exponent: 'u32' - }, - Keys: 'SessionKeys3', - LookupSource: 'MultiAddress', - MultiplierOption: { - _enum: [ - 'Base1', 'Base2', 'Base5' - ] - }, - OcwControlData: { - need_verifier_check: 'bool', - open_free_price_reporter: 'bool', - open_paid_price_reporter: 'bool' - }, - OffchainSignature: 'MultiSignature', - PaidValue: { - create_bn: 'BlockNumber', - amount: 'BalanceOf', - is_income: 'bool' - }, - PurchasedId: 'Bytes', - PriceKey: 'Vec', - PriceToken: 'Bytes', - PreCheckPayload: { - block_number: 'BlockNumber', - pre_check_stash: 'AccountId', - pre_check_auth: 'AuthorityId', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PreCheckResultPayload: { - block_number: 'BlockNumber', - pre_check_list: 'Vec', - pre_check_stash: 'AccountId', - pre_check_auth: 'AuthorityId', - public: 'MultiSigner' - }, - PreCheckCompareLog: { - chain_avg_price_list: 'BTreeMap', - validator_up_price_list: 'BTreeMap', - raw_precheck_list: 'Vec' - }, - PreCheckStruct: { - price_key: 'Vec', - number_val: 'JsonNumberValue', - max_offset: 'Percent', - timestamp: 'u64' - }, - PricePayloadSubPrice: '(PriceKey, u64, FractionLength, JsonNumberValue, u64)', - PricePayloadSubJumpBlock: '(PriceKey, RequestInterval)', - PricePayload: { - block_number: 'BlockNumber', - price: 'Vec', - jump_block: 'Vec', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PreCheckStatus: { - _enum: [ - 'Review', - 'Prohibit', - 'Pass' - ] - }, - PurchasedRequestData: { - account_id: 'AccountId', - offer: 'BalanceOf', - create_bn: 'BlockNumber', - submit_threshold: 'u8', - max_duration: 'u64', - request_keys: 'Vec>' - }, - PurchasedPricePayload: { - block_number: 'BlockNumber', - purchase_id: 'Vec', - price: 'Vec', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PurchasedAvgPriceData: { - create_bn: 'u64', - reached_type: 'u8', - price_data: '(u64, FractionLength)' - }, - PurchasedDefaultData: { - submit_threshold: 'u8', - max_duration: 'u64', - avg_keep_duration: 'u64' - }, - PurchasedForceCleanPayload: { - BlockNumber: 'BlockNumber', - purchase_id_list: 'Vec>', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PurchaseId: 'Vec', - Releases: { - _enum: [ - 'V1_0_0_Ancestral', - 'V1_0_1_HttpErrUpgrade', - 'V1_1_0_HttpErrUpgrade', - 'V1_2_0' - ] - }, - RequestInterval: 'u8', - StatusErr: '(u16)', - SymbolEstimatesConfig: { - symbol: 'Bytes', - estimates_type: 'EstimatesType', - id: 'u64', - ticket_price: 'Balance', - symbol_completed_price: 'u64', - symbol_fraction: 'FractionLength', - start: 'BlockNumber', - end: 'BlockNumber', - distribute: 'BlockNumber', - deviation: 'Option', - range: 'Option>', - total_reward: 'Balance', - state: 'EstimatesState' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/ares-parachain.ts b/packages/apps-config/src/api/spec/ares-parachain.ts deleted file mode 100644 index 59419280caaa..000000000000 --- a/packages/apps-config/src/api/spec/ares-parachain.ts +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - AskPeriodNum: 'u64', - AskPointNum: 'u32', - AuthorityAres: 'AccountId', - AccountParticipateEstimates: { - account: 'AccountId', - end: 'BlockNumber', - estimates: 'Option', - range_index: 'Option', - eth_address: 'Option', - multiplier: 'MultiplierOption', - reward: 'u128' - }, - AresPriceData: { - price: 'u64', - account_id: 'AccountId', - create_bn: 'BlockNumber', - fraction_len: 'FractionLength', - raw_number: 'JsonNumberValue', - timestamp: 'u64' - }, - BalanceOf: 'Balance', - ChooseWinnersPayload: { - block_number: 'BlockNumber', - winners: 'Vec', - public: 'AccountId', - estimates_config: 'Bytes', - symbol: 'Bytes', - price: '(u64, FractionLength)' - }, - EstimatesState: { - _enum: [ - 'InActive', - 'Active', - 'WaitingPayout', - 'Completed' - ] - }, - EstimatesType: { - _enum: [ - 'DEVIATION', 'RANGE' - ] - }, - FractionLength: 'u32', - HttpError: { - _enum: { - IoErr: 'Bytes', - TimeOut: 'Bytes', - StatusErr: '(Bytes,u16)', - ParseErr: 'Bytes' - } - }, - HttpErrTracePayload: { - trace_data: 'HttpErrTraceData', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - HttpErrTraceData: { - block_number: 'BlockNumber', - err_auth: 'AuthorityId', - err_status: 'HttpError', - tip: 'Bytes' - }, - JsonNumberValue: { - integer: 'u64', - fraction: 'u64', - fraction_length: 'u32', - exponent: 'u32' - }, - Keys: 'SessionKeys4', - LookupSource: 'MultiAddress', - MultiplierOption: { - _enum: [ - 'Base1', 'Base2', 'Base5' - ] - }, - OcwControlData: { - need_verifier_check: 'bool', - open_free_price_reporter: 'bool', - open_paid_price_reporter: 'bool' - }, - OffchainSignature: 'MultiSignature', - PaidValue: { - create_bn: 'BlockNumber', - amount: 'BalanceOf', - is_income: 'bool' - }, - PurchasedId: 'Bytes', - PriceKey: 'Vec', - PriceToken: 'Bytes', - PreCheckPayload: { - block_number: 'BlockNumber', - pre_check_stash: 'AccountId', - pre_check_auth: 'AuthorityId', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PreCheckResultPayload: { - block_number: 'BlockNumber', - pre_check_list: 'Vec', - pre_check_stash: 'AccountId', - pre_check_auth: 'AuthorityId', - public: 'MultiSigner' - }, - PreCheckCompareLog: { - chain_avg_price_list: 'BTreeMap', - validator_up_price_list: 'BTreeMap', - raw_precheck_list: 'Vec' - }, - PreCheckStruct: { - price_key: 'Vec', - number_val: 'JsonNumberValue', - max_offset: 'Percent', - timestamp: 'u64' - }, - PricePayloadSubPrice: '(PriceKey, u64, FractionLength, JsonNumberValue, u64)', - PricePayloadSubJumpBlock: '(PriceKey, RequestInterval)', - PricePayload: { - block_number: 'BlockNumber', - price: 'Vec', - jump_block: 'Vec', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PreCheckStatus: { - _enum: [ - 'Review', - 'Prohibit', - 'Pass' - ] - }, - PurchasedRequestData: { - account_id: 'AccountId', - offer: 'BalanceOf', - create_bn: 'BlockNumber', - submit_threshold: 'u8', - max_duration: 'u64', - request_keys: 'Vec>' - }, - PurchasedPricePayload: { - block_number: 'BlockNumber', - purchase_id: 'Vec', - price: 'Vec', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PurchasedAvgPriceData: { - create_bn: 'u64', - reached_type: 'u8', - price_data: '(u64, FractionLength)' - }, - PurchasedDefaultData: { - submit_threshold: 'u8', - max_duration: 'u64', - avg_keep_duration: 'u64' - }, - PurchasedForceCleanPayload: { - BlockNumber: 'BlockNumber', - purchase_id_list: 'Vec>', - auth: 'AuthorityId', - public: 'MultiSigner' - }, - PurchaseId: 'Vec', - Releases: { - _enum: [ - 'V1_0_0_Ancestral', - 'V1_0_1_HttpErrUpgrade', - 'V1_1_0_HttpErrUpgrade', - 'V1_2_0' - ] - }, - RequestInterval: 'u8', - StatusErr: '(u16)', - SymbolEstimatesConfig: { - symbol: 'Bytes', - estimates_type: 'EstimatesType', - id: 'u64', - ticket_price: 'Balance', - symbol_completed_price: 'u64', - symbol_fraction: 'FractionLength', - start: 'BlockNumber', - end: 'BlockNumber', - distribute: 'BlockNumber', - deviation: 'Option', - range: 'Option>', - total_reward: 'Balance', - state: 'EstimatesState' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/astar.ts b/packages/apps-config/src/api/spec/astar.ts deleted file mode 100644 index b69ab79cdec3..000000000000 --- a/packages/apps-config/src/api/spec/astar.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Keys: 'AccountId', - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AmountOf: 'Amount', - Amount: 'i128', - SmartContract: { - _enum: { - Evm: 'H160', - Wasm: 'AccountId' - } - }, - EraStakingPoints: { - total: 'Balance', - stakers: 'BTreeMap', - formerStakedEra: 'EraIndex', - claimedRewards: 'Balance' - }, - EraRewardAndStake: { - rewards: 'Balance', - staked: 'Balance' - }, - EraIndex: 'u32' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/automata.ts b/packages/apps-config/src/api/spec/automata.ts deleted file mode 100644 index d3d4fef15689..000000000000 --- a/packages/apps-config/src/api/spec/automata.ts +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - ResourceId: '[u8; 32]', - DepositNonce: 'u64', - ProposalStatus: { - _enum: [ - 'Initiated', - 'Approved', - 'Rejected' - ] - }, - ProposalVotes: { - votes_for: 'Vec', - votes_against: 'Vec', - status: 'ProposalStatus' - }, - BridgeTokenId: 'U256', - BridgeChainId: 'u8', - VestingPlan: { - start_time: 'u64', - cliff_duration: 'u64', - total_duration: 'u64', - interval: 'u64', - initial_amount: 'Balance', - total_amount: 'Balance', - vesting_during_cliff: 'bool' - }, - ProposalId: 'u32', - ProjectId: 'u32', - ChainIndex: 'u32', - Protocol: { - _enum: ['Solidity', 'Substrate'] - }, - Chain: { - _protocol: 'Protocol' - }, - CrossChainAccount: { - _enum: { - Solidity: 'H160', - Substrate: 'AccountId' - } - }, - IpfsHash: 'Text', - SolidityStrategy: { - _enum: { - ERC20Balance: 'H160' - } - }, - SubstrateStrategy: { - _enum: ['NativeBalance'] - }, - Strategy: { - _enum: { - Solidity: 'SolidityStrategy', - Substrate: 'SubstrateStrategy' - } - }, - Workspace: { - _chain: 'ChainIndex', - strategies: 'Vec' - }, - UserGroup: { - owner: 'CrossChainAccount', - admins: 'Vec', - maintainers: 'Vec', - proposers: 'Option>' - }, - Project: { - usergroup: 'UserGroup', - data: 'IpfsHash', - workspaces: 'Vec' - }, - VotingFormat: { - _enum: ['SingleChoice', 'SplitVote'] - }, - OptionIndex: 'u8', - PrivacyLevel: { - _enum: { - Opaque: 'u8', - Rank: 'Null', - Private: 'Null', - Public: 'Null', - Mixed: 'Null' - } - }, - VotingPower: 'U256', - DAOProposalState: { - finalized: 'bool', - snapshots: 'Vec>', - blacklisted: 'bool', - votes: 'Vec', - pub_voters: 'Option', - updates: 'u32' - }, - DAOProposal: { - _author: 'CrossChainAccount', - _voting_format: 'VotingFormat', - _option_count: 'OptionIndex', - _data: 'IpfsHash', - _privacy: 'PrivacyLevel', - _start: 'u64', - _end: 'u64', - _frequency: 'Option', - _workspaces: 'Vec', - state: 'DAOProposalState' - }, - VoteUpdate: { - project: 'ProjectId', - proposal: 'ProposalId', - votes: 'Vec', - pub_voters: 'Option' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/bajun.ts b/packages/apps-config/src/api/spec/bajun.ts deleted file mode 100644 index 8d19aebf6419..000000000000 --- a/packages/apps-config/src/api/spec/bajun.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -/* eslint-disable sort-keys */ -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/basilisk.ts b/packages/apps-config/src/api/spec/basilisk.ts deleted file mode 100644 index 4c6a759b9c46..000000000000 --- a/packages/apps-config/src/api/spec/basilisk.ts +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - alias: { tokens: { AccountData: 'OrmlAccountData' } }, - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - AssetPair: { asset_in: 'AssetId', asset_out: 'AssetId' }, - Amount: 'i128', - AmountOf: 'Amount', - Address: 'AccountId', - OrmlAccountData: { free: 'Balance', frozen: 'Balance', reserved: 'Balance' }, - Fee: { numerator: 'u32', denominator: 'u32' }, - BalanceInfo: { amount: 'Balance', assetId: 'AssetId' }, - Chain: { genesisHash: 'Vec', lastBlockHash: 'Vec' }, - Currency: 'AssetId', - CurrencyId: 'AssetId', - CurrencyIdOf: 'AssetId', - Intention: { - who: 'AccountId', - asset_sell: 'AssetId', - asset_buy: 'AssetId', - amount: 'Balance', - discount: 'bool', - sell_or_buy: 'IntentionType' - }, - IntentionId: 'Hash', - IntentionType: { _enum: ['SELL', 'BUY'] }, - LookupSource: 'AccountId', - Price: 'Balance', - ClassId: 'u64', - TokenId: 'u64', - ClassData: { is_pool: 'bool' }, - TokenData: { locked: 'bool' }, - ClassInfo: { metadata: 'Vec', total_issuance: 'TokenId', owner: 'AccountId', data: 'ClassData' }, - TokenInfo: { metadata: 'Vec', owner: 'AccountId', data: 'TokenData' }, - ClassInfoOf: 'ClassInfo', - TokenInfoOf: 'TokenInfo', - ClassIdOf: 'ClassId', - TokenIdOf: 'TokenId', - OrderedSet: 'Vec', - VestingSchedule: { - start: 'BlockNumber', - period: 'BlockNumber', - period_count: 'u32', - per_period: 'Compact' - }, - VestingScheduleOf: 'VestingSchedule', - LBPWeight: 'u32', - WeightCurveType: { _enum: ['Linear'] }, - PoolId: 'AccountId', - BalanceOf: 'Balance', - AssetType: { - _enum: { - Token: 'Null', - PoolShare: '(AssetId,AssetId)' - } - }, - Pool: { - owner: 'AccountId', - start: 'BlockNumber', - end: 'BlockNumber', - assets: 'AssetPair', - initial_weights: 'LBPWeight', - final_weights: 'LBPWeight', - weight_curve: 'WeightCurveType', - pausable: 'bool', - paused: 'bool', - fee: 'Fee', - fee_receiver: 'AccountId' - }, - AssetDetails: { - name: 'Vec', - asset_type: 'AssetType', - existential_deposit: 'Balance', - locked: 'bool' - }, - AssetDetailsT: 'AssetDetails', - AssetMetadata: { symbol: 'Vec', decimals: 'u8' }, - AssetInstance: 'AssetInstanceV1', - MultiLocation: 'MultiLocationV1', - MultiAsset: 'MultiAssetV1', - Xcm: 'XcmV1', - XcmOrder: 'XcmOrderV1' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/beresheet.ts b/packages/apps-config/src/api/spec/beresheet.ts deleted file mode 100644 index 2ccb35210fce..000000000000 --- a/packages/apps-config/src/api/spec/beresheet.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { spec } from '@edgeware/node-types'; - -// There is no separate types bundle for testnet at this time -const beresheet = spec.typesBundle.spec?.edgeware as OverrideBundleDefinition; - -export default beresheet; diff --git a/packages/apps-config/src/api/spec/bifrost-asgard.ts b/packages/apps-config/src/api/spec/bifrost-asgard.ts deleted file mode 100644 index e1232ade1cd5..000000000000 --- a/packages/apps-config/src/api/spec/bifrost-asgard.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { typesBundleForPolkadot } from '@bifrost-finance/type-definitions'; - -export default (typesBundleForPolkadot as { spec: { asgard: OverrideBundleDefinition } }).spec.asgard; diff --git a/packages/apps-config/src/api/spec/bifrost-parachain.ts b/packages/apps-config/src/api/spec/bifrost-parachain.ts deleted file mode 100644 index 2d04ab875319..000000000000 --- a/packages/apps-config/src/api/spec/bifrost-parachain.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { typesBundleForPolkadot } from '@bifrost-finance/type-definitions'; - -export default (typesBundleForPolkadot as { spec: { bifrost: OverrideBundleDefinition } }).spec.bifrost; diff --git a/packages/apps-config/src/api/spec/bifrost.ts b/packages/apps-config/src/api/spec/bifrost.ts deleted file mode 100644 index 2d04ab875319..000000000000 --- a/packages/apps-config/src/api/spec/bifrost.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { typesBundleForPolkadot } from '@bifrost-finance/type-definitions'; - -export default (typesBundleForPolkadot as { spec: { bifrost: OverrideBundleDefinition } }).spec.bifrost; diff --git a/packages/apps-config/src/api/spec/bitcountry-pioneer.ts b/packages/apps-config/src/api/spec/bitcountry-pioneer.ts deleted file mode 100644 index c86de25e7cbf..000000000000 --- a/packages/apps-config/src/api/spec/bitcountry-pioneer.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { types } from '@metaverse-network-sdk/type-definitions'; - -export default types; diff --git a/packages/apps-config/src/api/spec/bitcountry-rococo.ts b/packages/apps-config/src/api/spec/bitcountry-rococo.ts deleted file mode 100644 index 8b291cf67e05..000000000000 --- a/packages/apps-config/src/api/spec/bitcountry-rococo.ts +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AssetInfo: { - owner: 'AccountId', - data: 'AssetData' - }, - AssetData: { - name: 'Text', - description: 'Text', - properties: 'Text', - supporters: 'Vec' - }, - AuctionId: 'u64', - AuctionItem: { - asset_id: 'TokenId', - class_id: 'ClassId', - recipient: 'AccountId', - initial_amount: 'Balance', - amount: 'Balance', - start_time: 'u32', - end_time: 'u32' - }, - AuctionInfo: { - bid: 'Option<(AccountId,Balance)>', - start: 'BlockNumber', - end: 'Option' - }, - RentId: 'u64', - RentalInfo: { - owner: 'AccountId', - start: 'BlockNumber', - end: 'Option', - price_per_block: 'Balance' - }, - CountryId: 'u64', - CollectionId: 'u64', - ClassId: 'u32', - TokenId: 'u64', - ClassInfoOf: { - metadata: 'Vec', - total_issuance: 'TokenId', - owner: 'AccountId', - data: 'NftClassData' - }, - TokenInfoOf: { - metadata: 'Vec', - owner: 'AccountId', - data: 'NftAssetData' - }, - NftCollectionData: { - name: 'Vec', - owner: 'AccountId', - properties: 'Vec' - }, - TokenType: { - _enum: [ - 'Transferrable', - 'BoundToAddress' - ] - }, - NftAssetData: { - name: 'Vec', - description: 'Vec', - properties: 'Vec' - }, - NftClassData: { - deposit: 'Balance', - properties: 'Vec', - token_type: 'TokenType' - }, - NetworkId: { - _enum: { - Any: 'Null', - Named: 'Vec', - Polkadot: 'Null', - Kusama: 'Null' - } - }, - CurrencyId: { - _enum: { - Token: 'TokenSymbol' - } - }, - TokenSymbol: { - _enum: [ - 'NUUM', - 'AUSD', - 'ACA', - 'DOT' - ] - }, - CountryCurrencyId: 'u32', - CurrencyIdOf: 'CurrencyId', - BalanceIdOf: 'Balance', - ChainId: { - _enum: { - RelayChain: 'Null', - ParaChain: 'ParaId' - } - }, - XCurrencyId: { - chain_id: 'ChainId', - currency_id: 'CurrencyId' - }, - GroupCollectionId: 'u64', - ClassIdOf: 'u32', - TokenIdOf: 'u32', - SpotId: 'u32' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/bitcountry.ts b/packages/apps-config/src/api/spec/bitcountry.ts deleted file mode 100644 index 2942c8873ed1..000000000000 --- a/packages/apps-config/src/api/spec/bitcountry.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AssetInfo: { - owner: 'AccountId', - data: 'AssetData' - }, - AssetData: { - name: 'Text', - description: 'Text', - properties: 'Text', - supporters: 'Vec' - }, - AuctionId: 'u64', - AuctionItem: { - asset_id: 'TokenId', - class_id: 'ClassId', - recipient: 'AccountId', - initial_amount: 'Balance', - amount: 'Balance', - start_time: 'u32', - end_time: 'u32' - }, - AuctionInfo: { - bid: 'Option<(AccountId,Balance)>', - start: 'BlockNumber', - end: 'Option' - }, - RentId: 'u64', - RentalInfo: { - owner: 'AccountId', - start: 'BlockNumber', - end: 'Option', - price_per_block: 'Balance' - }, - CountryId: 'u64', - CountryCurrencyId: 'u32', - CollectionId: 'u64', - ClassId: 'u32', - TokenId: 'u64', - ClassInfoOf: { - metadata: 'Vec', - total_issuance: 'TokenId', - owner: 'AccountId', - data: 'NftClassData' - }, - TokenInfoOf: { - metadata: 'Vec', - owner: 'AccountId', - data: 'NftAssetData' - }, - NftCollectionData: { - name: 'Vec', - owner: 'AccountId', - properties: 'Vec' - }, - CurrencyId: 'u32', - CurrencyIdOf: 'CurrencyId', - BalanceIdOf: 'Balance', - GroupCollectionId: 'u64', - ClassIdOf: 'u32', - TokenIdOf: 'u32', - SpotId: 'u32' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/centrifuge-chain.ts b/packages/apps-config/src/api/spec/centrifuge-chain.ts deleted file mode 100644 index a61fa3b494f4..000000000000 --- a/packages/apps-config/src/api/spec/centrifuge-chain.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - AnchorData: { - id: 'H256', - docRoot: 'H256', - anchoredBlock: 'u64' - }, - Fee: { - key: 'Hash', - price: 'Balance' - }, - PreCommitData: { - signingRoot: 'H256', - identity: 'H256', - expirationBlock: 'u64' - }, - Proof: { - leafHash: 'H256', - sortedHashes: 'H256' - }, - // MultiAccount - MultiAccountData: { - threshold: 'u16', - signatories: 'Vec', - deposit: 'Balance', - depositor: 'AccountId' - }, - // Bridge constants - ChainId: 'u8', - ResourceId: '[u8; 32]', - 'chainbridge::ChainId': 'u8', - DepositNonce: 'u64', - // NFT - RegistryId: 'H160', - TokenId: 'U256', - AssetId: { - registryId: 'RegistryId', - tokenId: 'TokenId' - }, - RegistryInfo: { - ownerCanBurn: 'bool', - fields: 'Vec' - }, - AssetInfo: { - metadata: 'Bytes' - }, - ProofMint: { - value: 'Bytes', - property: 'Bytes', - salt: '[u8; 32]', - hashes: 'Vec' - }, - MintInfo: { - anchorId: 'Hash', - staticHashes: '[Hash; 3]', - proofs: 'Vec' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/centrifuge.ts b/packages/apps-config/src/api/spec/centrifuge.ts deleted file mode 100644 index e15bca06045c..000000000000 --- a/packages/apps-config/src/api/spec/centrifuge.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - AnchorData: { - id: 'Hash', - docRoot: 'Hash', - anchoredBlock: 'u64' - }, - ChainId: 'u8', - 'chainbridge::ChainId': 'u8', - DepositNonce: 'u64', - Fee: { - key: 'Hash', - price: 'Balance' - }, - ParachainAccountIdOf: 'AccountId', - PreCommitData: { - signingRoot: 'Hash', - identity: 'AccountId', - expirationBlock: 'u64' - }, - Proof: { - leafHash: 'Hash', - sortedHashes: 'Vec' - }, - ProxyType: { - _enum: [ - 'Any', - 'NonTransfer', - 'Governance', - '_Staking', - 'NonProxy' - ] - }, - ResourceId: '[u8; 32]', - RelayChainAccountId: 'AccountId', - RootHashOf: 'Hash' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/chainx.ts b/packages/apps-config/src/api/spec/chainx.ts deleted file mode 100644 index c5bc1a7a4453..000000000000 --- a/packages/apps-config/src/api/spec/chainx.ts +++ /dev/null @@ -1,462 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId', - Chain: { - _enum: [ - 'ChainX', - 'Bitcoin', - 'Ethereum', - 'Polkadot' - ] - }, - NetworkType: { - _enum: [ - 'Mainnet', - 'Testnet' - ] - }, - AssetType: { - _enum: [ - 'Usable', - 'Locked', - 'Reserved', - 'ReservedWithdrawal', - 'ReservedDexSpot' - ] - }, - OrderType: { - _enum: [ - 'Limit', - 'Market' - ] - }, - Side: { - _enum: [ - 'Buy', - 'Sell' - ] - }, - LockedType: { - _enum: [ - 'Bonded', - 'BondedWithdrawal' - ] - }, - Memo: 'Text', - AssetInfo: { - token: 'String', - tokenName: 'String', - chain: 'Chain', - decimals: 'Decimals', - desc: 'String' - }, - TradingPairProfile: { - id: 'TradingPairId', - currencyPair: 'CurrencyPair', - pipDecimals: 'u32', - tickDecimals: 'u32', - tradable: 'bool' - }, - Order: { - props: 'OrderProperty', - status: 'OrderStatus', - remaining: 'Balance', - executedIndices: 'Vec', - alreadyFilled: 'Balance', - lastUpdateAt: 'BlockNumber' - }, - TradingPairInfo: { - latestPrice: 'Price', - lastUpdated: 'BlockNumber' - }, - OrderExecutedInfo: { - tradingHistoryIdx: 'TradingHistoryIndex', - pairId: 'TradingPairId', - price: 'Price', - maker: 'AccountId', - taker: 'AccountId', - makerOrderId: 'OrderId', - takerOrderId: 'OrderId', - turnover: 'Balance', - executedAt: 'BlockNumber' - }, - BtcHeaderInfo: { - header: 'BtcHeader', - height: 'u32' - }, - BtcParams: { - maxBits: 'u32', - blockMaxFuture: 'u32', - targetTimespanSeconds: 'u32', - targetSpacingSeconds: 'u32', - retargetingFactor: 'u32', - retargetingInterval: 'u32', - minTimespan: 'u32', - maxTimespan: 'u32' - }, - MiningAssetInfo: { - assetId: 'AssetId', - miningPower: 'FixedAssetPower', - rewardPot: 'AccountId', - rewardPotBalance: 'RpcBalance', - lastTotalMiningWeight: 'RpcMiningWeight', - lastTotalMiningWeightUpdate: 'BlockNumber' - }, - MiningDividendInfo: { - own: 'Balance', - other: 'Balance', - insufficientStake: 'Balance' - }, - AssetLedger: { - lastTotalMiningWeight: 'MiningWeight', - lastTotalMiningWeightUpdate: 'BlockNumber' - }, - MinerLedger: { - lastMiningWeight: 'MiningWeight', - lastMiningWeightUpdate: 'BlockNumber', - lastClaim: 'Option' - }, - ClaimRestriction: { - stakingRequirement: 'StakingRequirement', - frequencyLimit: 'BlockNumber' - }, - NominatorInfo: { - lastRebond: 'Option' - }, - BondRequirement: { - selfBonded: 'Balance', - total: 'Balance' - }, - Unbonded: { - value: 'Balance', - lockedUntil: 'BlockNumber' - }, - ValidatorLedger: { - totalNomination: 'Balance', - lastTotalVoteWeight: 'VoteWeight', - lastTotalVoteWeightUpdate: 'BlockNumber' - }, - NominatorLedger: { - nomination: 'Balance', - lastVoteWeight: 'VoteWeight', - lastVoteWeightUpdate: 'BlockNumber', - unbondedChunks: 'Vec' - }, - ValidatorProfile: { - registeredAt: 'BlockNumber', - isChilled: 'bool', - lastChilled: 'Option', - referralId: 'ReferralId' - }, - GlobalDistribution: { - treasury: 'u32', - mining: 'u32' - }, - MiningDistribution: { - asset: 'u32', - staking: 'u32' - }, - InclusionFee: { - baseFee: 'Balance', - lenFee: 'Balance', - adjustedWeightFee: 'Balance' - }, - FeeDetails: { - inclusionFee: 'Option>', - extraFee: 'Balance', - tip: 'Balance', - finalFee: 'Balance' - }, - UnbondedIndex: 'u32', - Token: 'Text', - Desc: 'Text', - AddrStr: 'Text', - HandicapInfo: 'Handicap', - Price: 'u128', - OrderId: 'u64', - TradingPairId: 'u32', - TradingHistoryIndex: 'u64', - PriceFluctuation: 'u32', - BtcAddress: 'Text', - FixedAssetPower: 'u32', - StakingRequirement: 'u32', - Decimals: 'u8', - CurrencyPair: { - base: 'AssetId', - quote: 'AssetId' - }, - OrderStatus: { - _enum: [ - 'Created', - 'PartialFill', - 'Filled', - 'PartialFillAndCanceled', - 'Canceled' - ] - }, - AssetId: 'u32', - MiningWeight: 'u128', - VoteWeight: 'u128', - ReferralId: 'Text', - AssetRestriction: { - _enum: [ - 'Move', - 'Transfer', - 'Deposit', - 'Withdraw', - 'DestroyWithdrawal', - 'DestroyFree' - ] - }, - AssetRestrictions: { - bits: 'u32' - }, - BtcHeader: 'Vec', - BtcNetwork: { - _enum: [ - 'Mainnet', - 'Testnet' - ] - }, - OrderInfo: 'Order', - Amount: 'i128', - AmountOf: 'Amount', - CurrencyIdOf: 'AssetId', - CurrencyId: 'AssetId', - Handicap: { - highestBid: 'Price', - lowestAsk: 'Price' - }, - OrderProperty: { - id: 'OrderId', - side: 'Side', - price: 'Price', - amount: 'Amount', - pairId: 'TradingPairId', - submitter: 'AccountId', - orderType: 'OrderType', - createdAt: 'BlockNumber' - }, - TotalAssetInfo: { - info: 'AssetInfo', - balance: 'BTreeMap', - isOnline: 'bool', - restrictions: 'AssetRestrictions' - }, - WithdrawalRecordId: 'u32', - WithdrawalState: { - _enum: [ - 'Applying', - 'Processing', - 'NormalFinish', - 'RootFinish', - 'NormalCancel', - 'RootCancel' - ] - }, - WithdrawalRecord: { - assetId: 'AssetId', - applicant: 'AccountId', - balance: 'Balance', - addr: 'AddrStr', - ext: 'Memo', - height: 'BlockNumber' - }, - WithdrawalLimit: { - minimalWithdrawal: 'Balance', - fee: 'Balance' - }, - TrusteeInfoConfig: { - minTrusteeCount: 'u32', - maxTrusteeCount: 'u32' - }, - GenericTrusteeIntentionProps: { - about: 'Text', - hotEntity: 'Vec', - coldEntity: 'Vec' - }, - GenericTrusteeSessionInfo: { - trusteeList: 'Vec', - threshold: 'u16', - hotAddress: 'Vec', - coldAddress: 'Vec' - }, - ChainAddress: 'Vec', - BtcTrusteeType: 'Vec', - BtcTrusteeAddrInfo: { - addr: 'BtcAddress', - redeemScript: 'Vec' - }, - BtcTrusteeIntentionProps: { - about: 'Text', - hotEntity: 'BtcTrusteeType', - coldEntity: 'BtcTrusteeType' - }, - BtcTrusteeSessionInfo: { - trusteeList: 'Vec', - threshold: 'u16', - hotAddress: 'BtcTrusteeAddrInfo', - coldAddress: 'BtcTrusteeAddrInfo' - }, - BtcTransaction: 'Vec', - BtcPartialMerkleTree: 'Vec', - BtcRelayedTxInfo: { - blockHash: 'H256', - merkleProof: 'BtcPartialMerkleTree' - }, - BtcHeaderIndex: { - hash: 'H256', - height: 'u32' - }, - BtcTxResult: { - _enum: [ - 'Success', - 'Failure' - ] - }, - BtcTxState: { - txType: 'BtcTxType', - result: 'BtcTxResult' - }, - BtcTxType: { - _enum: [ - 'Withdrawal', - 'Deposit', - 'HotAndCold', - 'TrusteeTransition', - 'Irrelevance' - ] - }, - BtcDepositCache: { - txid: 'H256', - balance: 'u64' - }, - BtcVoteResult: { - _enum: [ - 'Unfinish', - 'Finish' - ] - }, - BtcWithdrawalProposal: { - sigState: 'BtcVoteResult', - withdrawalIdList: 'Vec', - tx: 'BtcTransaction', - trusteeList: 'Vec<(AccountId, bool)>' - }, - BtcTxVerifier: { - _enum: [ - 'Recover', - 'RuntimeInterface' - ] - }, - RpcTotalAssetInfo: { - info: 'AssetInfo', - balance: 'BTreeMap', - isOnline: 'bool', - restrictions: 'AssetRestrictions' - }, - RpcOrder: { - id: 'OrderId', - side: 'Side', - price: 'RpcPrice', - amount: 'RpcBalance', - pairId: 'TradingPairId', - submitter: 'AccountId', - orderType: 'OrderType', - createdAt: 'BlockNumber', - status: 'OrderStatus', - remaining: 'RpcBalance', - executedIndices: 'Vec', - alreadyFilled: 'RpcBalance', - reservedBalance: 'RpcBalance', - lastUpdateAt: 'BlockNumber' - }, - RpcWithdrawalRecord: { - assetId: 'AssetId', - applicant: 'AccountId', - balance: 'RpcBalance', - addr: 'String', - ext: 'String', - height: 'BlockNumber', - state: 'WithdrawalState' - }, - RpcMiningDividendInfo: { - own: 'RpcBalance', - other: 'RpcBalance', - insufficientStake: 'RpcBalance' - }, - RpcInclusionFee: { - baseFee: 'RpcBalance', - lenFee: 'RpcBalance', - adjustedWeightFee: 'RpcBalance' - }, - RpcFeeDetails: { - inclusionFee: 'Option', - tip: 'RpcBalance', - extraFee: 'RpcBalance', - finalFee: 'RpcBalance' - }, - ValidatorInfo: { - account: 'AccountId', - registeredAt: 'BlockNumber', - isChilled: 'bool', - lastChilled: 'Option', - totalNomination: 'RpcBalance', - lastTotalVoteWeight: 'RpcVoteWeight', - lastTotalVoteWeightUpdate: 'BlockNumber', - isValidating: 'bool', - selfBonded: 'RpcBalance', - referralId: 'String', - rewardPotAccount: 'AccountId', - rewardPotBalance: 'RpcBalance' - }, - FullPairInfo: { - baseCurrency: 'AssetId', - highestBid: 'RpcPrice', - id: 'TradingPairId', - latestPrice: 'RpcPrice', - latestPriceUpdatedAt: 'BlockNumber', - lowestAsk: 'RpcPrice', - maxValidBid: 'RpcPrice', - minValidAsk: 'RpcPrice', - pipDecimals: 'u32', - quoteCurrency: 'AssetId', - tickDecimals: 'u32', - tradable: 'bool' - }, - Depth: { - asks: 'Vec<(RpcPrice, RpcBalance)>', - bids: 'Vec<(RpcPrice, RpcBalance)>' - }, - Page: { - pageIndex: 'u32', - pageSize: 'u32', - data: 'Vec' - }, - String: 'Text', - Balance: 'u128', - RpcPrice: 'String', - RpcBalance: 'String', - RpcMiningWeight: 'String', - RpcVoteWeight: 'String', - FullIdentification: 'ValidatorId', - WithdrawalRecordOf: 'WithdrawalRecord' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/clover-rococo.ts b/packages/apps-config/src/api/spec/clover-rococo.ts deleted file mode 100644 index 9e4504b4fc67..000000000000 --- a/packages/apps-config/src/api/spec/clover-rococo.ts +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Amount: 'i128', - AmountOf: 'Amount', - Balance: 'u128', - CurrencyId: { - _enum: ['CLV', 'CUSDT', 'DOT', 'CETH'] - }, - CurrencyIdOf: 'CurrencyId', - CurrencyTypeEnum: { - _enum: ['CLV', 'CUSDT', 'DOT', 'CETH'] - }, - PairKey: 'u64', - Rate: 'FixedU128', - Ratio: 'FixedU128', - Price: 'FixedU128', - Share: 'u128', - OracleKey: 'CurrencyId', - CurrencyInfo: { - id: 'CurrencyId', - name: 'CurrencyTypeEnum' - }, - ExchangeInfo: { - balance: 'Balance', - routes: 'Vec' - }, - PoolId: { - _enum: { - Swap: 'u64' - } - }, - EcdsaSignature: '[u8; 65]', - EvmAddress: 'H160', - ExitSucceed: { - _enum: ['Stopped', 'Returned', 'Suicided'] - }, - ExitRevert: { - _enum: ['Reverted'] - }, - ExitError: { - _enum: [ - 'StackUnderflow', 'StackOverflow', 'InvalidJump', 'InvalidRange', 'DesignatedInvalid', 'CallTooDeep', - 'CreateCollision', 'CreateContractLimit', 'OutOfOffset', 'OutOfGas', 'OutOfFund', 'PCUnderflow', 'CreateEmpty', - 'Other' - ] - }, - ExitFatal: { - _enum: ['NotSupported', 'UnhandledInterrupt', 'CallErrorAsFatal', 'Other'] - }, - ExitReason: { - _enum: ['Succeed', - 'Error', - 'Revert', - 'Fatal' - ] - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/clover.ts b/packages/apps-config/src/api/spec/clover.ts deleted file mode 100644 index ca00f4c0cab9..000000000000 --- a/packages/apps-config/src/api/spec/clover.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Amount: 'i128', - Keys: 'SessionKeys4', - AmountOf: 'Amount', - Balance: 'u128', - Rate: 'FixedU128', - Ratio: 'FixedU128', - EcdsaSignature: '[u8; 65]', - EvmAddress: 'H160', - EthereumTxHash: 'H256', - BridgeNetworks: { - _enum: ['BSC', 'Ethereum', 'CloverPara'] - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/coinversation.ts b/packages/apps-config/src/api/spec/coinversation.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/coinversation.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/competitors-club.ts b/packages/apps-config/src/api/spec/competitors-club.ts deleted file mode 100644 index f7c191d72eae..000000000000 --- a/packages/apps-config/src/api/spec/competitors-club.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - ClassId: 'u64', - ClassInfoOf: 'ClassId', - BalanceOf: 'Balance', - BalanceReservableOf: 'BalanceOf', - Moment: 'u64', - Place: { - spot: 'u32', - payout: 'Balance' - }, - Competitor: { - vie_id: '[u8;16]', - staked: 'bool', - submitted_winner: 'bool' - }, - Vie: { - operator: 'AccountId', - stake: 'Balance', - places: 'Vec', - time: 'Moment', - competitors: 'Vec', - memo: 'Vec' - }, - VieOf: 'Vie', - VieReq: { - stake: 'Balance', - places: 'Vec', - competitors: 'Vec', - memo: 'Vec' - }, - VieRequestOf: 'VieReq', - Participants: { - AccountId: '[u8;16]' - }, - Operators: { - AccountId: '[u8;16]' - }, - StandingReq: { - competitor: 'AccountId', - spot: 'u32' - }, - PodiumReq: { - champion: 'AccountId', - podium: 'Vec' - }, - PodiumReqOf: 'PodiumReq', - Trophy: { - trophy: '[u8; 16]', - competitors: 'Vec', - stake: 'Balance', - memo: 'Vec', - time: 'u64', - podium: 'Vec' - }, - TokenId: 'u64', - TokenInfo: { - metadata: 'Vec', - owner: 'AccountId', - data: 'Trophy' - }, - TokenInfoOf: 'TokenInfo' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/cord.ts b/packages/apps-config/src/api/spec/cord.ts new file mode 100644 index 000000000000..3f753896ebf1 --- /dev/null +++ b/packages/apps-config/src/api/spec/cord.ts @@ -0,0 +1,9 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import type { OverrideBundleDefinition } from '@polkadot/types/types'; + +import { typesBundle } from '@cord.network/type-definitions'; + +export default typesBundle.chain as Record; + diff --git a/packages/apps-config/src/api/spec/crab.ts b/packages/apps-config/src/api/spec/crab.ts deleted file mode 100644 index 6cc4b7e7062e..000000000000 --- a/packages/apps-config/src/api/spec/crab.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { typesBundleForPolkadotApps } from '@darwinia/types/mix'; - -export default typesBundleForPolkadotApps.spec.Crab; diff --git a/packages/apps-config/src/api/spec/crown-sterling.ts b/packages/apps-config/src/api/spec/crown-sterling.ts deleted file mode 100644 index c57d8c9eb6e2..000000000000 --- a/packages/apps-config/src/api/spec/crown-sterling.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AccountInfo: { - nonce: 'Index', - consumers: 'RefCount', - providers: 'RefCount', - data: 'AccountData' - }, - Balance: 'u128', - BalanceOf: 'Balance', - AuthorityOf: 'AccountId', - PaymentId: '[u8;16]', - Payment: { - id: 'PaymentId', - account_id: 'AccountId', - success_url: 'Vec', - failure_url: 'Vec', - paid: 'bool', - pay_to: 'AccountId' - }, - PeerId: '(Vec)', - Amendment: { - statement: 'Vec', - owners: 'Vec' - }, - BlockNumber: 'u32', - VestingSchedule: { - start: 'BlockNumber', - period: 'BlockNumber', - period_count: 'BlockNumber', - per_period: 'Compact' - }, - VestingScheduleOf: 'VestingSchedule' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/crust.ts b/packages/apps-config/src/api/spec/crust.ts deleted file mode 100644 index e01830dfeb26..000000000000 --- a/packages/apps-config/src/api/spec/crust.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { typesBundleForPolkadot } from '@crustio/type-definitions'; - -export default typesBundleForPolkadot.spec.crust as unknown as OverrideBundleDefinition; diff --git a/packages/apps-config/src/api/spec/cumulus-test-parachain.ts b/packages/apps-config/src/api/spec/cumulus-test-parachain.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/cumulus-test-parachain.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/darwinia.ts b/packages/apps-config/src/api/spec/darwinia.ts deleted file mode 100644 index 5d6b6cc0e2b3..000000000000 --- a/packages/apps-config/src/api/spec/darwinia.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { typesBundleForPolkadotApps } from '@darwinia/types/mix'; - -export default typesBundleForPolkadotApps.spec.Darwinia; diff --git a/packages/apps-config/src/api/spec/datahighway.ts b/packages/apps-config/src/api/spec/datahighway.ts deleted file mode 100644 index 20ffe119f449..000000000000 --- a/packages/apps-config/src/api/spec/datahighway.ts +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Keys: 'SessionKeys2', - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - RoamingOperator: '[u8; 16]', - RoamingOperatorIndex: 'u64', - RoamingNetwork: '[u8; 16]', - RoamingNetworkIndex: 'u64', - RoamingOrganization: '[u8; 16]', - RoamingOrganizationIndex: 'u64', - RoamingNetworkServer: '[u8; 16]', - RoamingNetworkServerIndex: 'u64', - RoamingDevice: '[u8; 16]', - RoamingDeviceIndex: 'u64', - RoamingRoutingProfile: '[u8; 16]', - RoamingRoutingProfileIndex: 'u64', - RoamingRoutingProfileAppServer: 'Text', - RoamingServiceProfile: '[u8; 16]', - RoamingServiceProfileIndex: 'u64', - RoamingServiceProfileUplinkRate: 'u32', - RoamingServiceProfileDownlinkRate: 'u32', - RoamingAccountingPolicy: '[u8; 16]', - RoamingAccountingPolicyIndex: 'u64', - RoamingAccountingPolicyType: 'Text', - RoamingAccountingPolicyUplinkFeeFactor: 'u32', - RoamingAccountingPolicyDownlinkFeeFactor: 'u32', - RoamingAccountingPolicyConfig: { - policy_type: 'Text', - subscription_fee: 'Balance', - uplink_fee_factor: 'u32', - downlink_fee_factor: 'u32' - }, - RoamingAgreementPolicy: '[u8; 16]', - RoamingAgreementPolicyIndex: 'u64', - RoamingAgreementPolicyActivationType: 'Text', - RoamingAgreementPolicyConfig: { - policy_activation_type: 'Text', - policy_expiry_block: 'Moment' - }, - RoamingNetworkProfile: '[u8; 16]', - RoamingNetworkProfileIndex: 'u64', - RoamingDeviceProfile: '[u8; 16]', - RoamingDeviceProfileIndex: 'u64', - RoamingDeviceProfileDevAddr: 'Text', - RoamingDeviceProfileDevEUI: 'Text', - RoamingDeviceProfileJoinEUI: 'Text', - RoamingDeviceProfileVendorID: 'Text', - RoamingDeviceProfileConfig: { - device_profile_devaddr: 'Text', - device_profile_deveui: 'Text', - device_profile_joineui: 'Text', - device_profile_vendorid: 'Text' - }, - RoamingSession: '[u8; 16]', - RoamingSessionIndex: 'u64', - RoamingSessionJoinRequest: { - session_network_server_id: 'Moment', - session_join_requested_at_block: 'Moment' - }, - RoamingSessionJoinAccept: { - session_join_request_accept_expiry: 'Moment', - session_join_request_accept_accepted_at_block: 'Moment' - }, - RoamingBillingPolicy: '[u8; 16]', - RoamingBillingPolicyIndex: 'u64', - RoamingBillingPolicyConfig: { - policy_next_billing_at_block: 'Moment', - policy_frequency_in_blocks: 'Moment' - }, - RoamingChargingPolicy: '[u8; 16]', - RoamingChargingPolicyIndex: 'u64', - RoamingChargingPolicyConfig: { - policy_next_charging_at_block: 'Moment', - policy_delay_after_billing_in_blocks: 'u64' - }, - RoamingPacketBundle: '[u8; 16]', - RoamingPacketBundleIndex: 'u64', - RoamingPacketBundleReceivedAtHome: 'bool', - RoamingPacketBundleReceivedPacketsCount: 'u64', - RoamingPacketBundleReceivedPacketsOkCount: 'u64', - RoamingPacketBundleExternalDataStorageHash: 'Hash', - RoamingPacketBundleReceiver: { - packet_bundle_received_at_home: 'bool', - packet_bundle_received_packets_count: 'u64', - packet_bundle_received_packets_ok_count: 'u64', - packet_bundle_received_started_at_block: 'Moment', - packet_bundle_received_ended_at_block: 'Moment', - packet_bundle_external_data_storage_hash: 'Hash' - }, - MiningRatesToken: '[u8; 16]', - MiningRatesTokenIndex: 'u64', - MiningRatesTokenTokenDOT: 'u32', - MiningRatesTokenTokenMXC: 'u32', - MiningRatesTokenTokenIOTA: 'u32', - MiningRatesTokenMaxToken: 'u32', - MiningRatesTokenMaxLoyalty: 'u32', - MiningRatesTokenConfig: { - token_token_mxc: 'u32', - token_token_iota: 'u32', - token_token_dot: 'u32', - token_max_token: 'u32', - token_max_loyalty: 'u32' - }, - MiningRatesHardware: '[u8; 16]', - MiningRatesHardwareIndex: 'u64', - MiningRatesHardwareSecure: 'u32', - MiningRatesHardwareInsecure: 'u32', - MiningRatesHardwareMaxHardware: 'u32', - MiningRatesHardwareCategory1MaxTokenBonusPerGateway: 'u32', - MiningRatesHardwareCategory2MaxTokenBonusPerGateway: 'u32', - MiningRatesHardwareCategory3MaxTokenBonusPerGateway: 'u32', - MiningRatesHardwareConfig: { - hardware_hardware_secure: 'u32', - hardware_hardware_insecure: 'u32', - hardware_max_hardware: 'u32', - hardware_category_1_max_token_bonus_per_gateway: 'u32', - hardware_category_2_max_token_bonus_per_gateway: 'u32', - hardware_category_3_max_token_bonus_per_gateway: 'u32' - }, - MiningConfigToken: '[u8; 16]', - MiningConfigTokenIndex: 'u64', - MiningConfigTokenType: 'Text', - MiningConfigTokenLockAmount: 'u64', - MiningConfigTokenConfig: { - token_type: 'Text', - token_lock_amount: 'u64', - token_lock_start_block: 'Moment', - token_lock_interval_blocks: 'Moment' - }, - MiningConfigTokenRequirementsConfig: { - token_type: 'Text', - token_lock_min_amount: 'u64', - token_lock_min_blocks: 'u32' - }, - MiningConfigHardware: '[u8; 16]', - MiningConfigHardwareIndex: 'u64', - MiningConfigHardwareSecure: 'bool', - MiningConfigHardwareType: 'Text', - MiningConfigHardwareID: 'u64', - MiningConfigHardwareDevEUI: 'u64', - MiningConfigHardwareConfig: { - hardware_secure: 'bool', - hardware_type: 'Text', - hardware_id: 'u64', - hardware_dev_eui: 'u64', - hardware_lock_start_block: 'Moment', - hardware_lock_interval_blocks: 'Moment' - }, - MiningSamplingToken: '[u8; 16]', - MiningSamplingTokenIndex: 'u64', - MiningSamplingTokenSampleLockedAmount: 'u64', - MiningSamplingTokenConfig: { - token_sample_block: 'Moment', - token_sample_locked_amount: 'u64' - }, - MiningSamplingHardware: '[u8; 16]', - MiningSamplingHardwareIndex: 'u64', - MiningSamplingHardwareSampleHardwareOnline: 'u64', - MiningSamplingHardwareConfig: { - hardware_sample_block: 'Moment', - hardware_sample_hardware_online: 'bool' - }, - MiningEligibilityToken: '[u8; 16]', - MiningEligibilityTokenIndex: 'u64', - MiningEligibilityTokenCalculatedEligibility: 'u64', - MiningEligibilityTokenLockedPercentage: 'u32', - MiningEligibilityTokenAuditorAccountID: 'u64', - MiningEligibilityTokenResult: { - token_calculated_eligibility: 'u64', - token_token_locked_percentage: 'u32', - token_date_audited: 'Moment', - token_auditor_account_id: 'u64' - }, - MiningEligibilityHardware: '[u8; 16]', - MiningEligibilityHardwareIndex: 'u64', - MiningEligibilityHardwareCalculatedEligibility: 'u64', - MiningEligibilityHardwareUptimePercentage: 'u32', - MiningEligibilityHardwareAuditorAccountID: 'u64', - MiningEligibilityHardwareResult: { - hardware_calculated_eligibility: 'u64', - hardware_uptime_percentage: 'u32', - hardware_block_audited: 'Moment', - hardware_auditor_account_id: 'u64' - }, - MiningClaimsToken: '[u8; 16]', - MiningClaimsTokenIndex: 'u64', - MiningClaimsTokenClaimAmount: 'u64', - MiningClaimsTokenClaimResult: { - token_claim_amount: 'u64', - token_claim_block_redeemed: 'u64' - }, - MiningClaimsHardware: '[u8; 16]', - MiningClaimsHardwareIndex: 'u64', - MiningClaimsHardwareClaimAmount: 'u64', - MiningClaimsHardwareClaimResult: { - hardware_claim_amount: 'u64', - hardware_claim_block_redeemed: 'u64' - }, - MiningExecutionToken: '[u8; 16]', - MiningExecutionTokenIndex: 'u64', - MiningExecutionTokenExecutorAccountID: 'u64', - MiningExecutionTokenExecutionResult: { - token_execution_exector_account_id: 'u64', - token_execution_started_block: 'Moment', - token_execution_ended_block: 'Moment' - }, - ExchangeRateIndex: 'u64', - ExchangeRateConfig: { - hbtc: 'u64', - dot: 'u64', - iota: 'u64', - fil: 'u64', - decimals_after_point: 'u32' - }, - HBTCRate: 'u64', - DOTRate: 'u64', - IOTARate: 'u64', - FILRate: 'u64', - DecimalsAfterPoint: 'u32' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/dock-mainnet.ts b/packages/apps-config/src/api/spec/dock-mainnet.ts deleted file mode 100644 index 3ad97bfe9053..000000000000 --- a/packages/apps-config/src/api/spec/dock-mainnet.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires -const types: any = require('@docknetwork/node-types'); - -// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -const definitions = types.spec['dock-main-runtime'] as OverrideBundleDefinition; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/dock-testnet.ts b/packages/apps-config/src/api/spec/dock-testnet.ts deleted file mode 100644 index 851f962fab24..000000000000 --- a/packages/apps-config/src/api/spec/dock-testnet.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires -const types: any = require('@docknetwork/node-types'); - -// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -const definitions = types.spec['dock-test-runtime'] as OverrideBundleDefinition; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/dolphin.ts b/packages/apps-config/src/api/spec/dolphin.ts deleted file mode 100644 index e68721835750..000000000000 --- a/packages/apps-config/src/api/spec/dolphin.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: - { - CurrencyId: { - _enum: [ - 'DOL' - ] - }, - CurrencyIdOf: 'CurrencyId', - Amount: 'i128', - AmountOf: 'Amount', - AccountInfo: 'AccountInfoWithDualRefCount' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/dotmog.ts b/packages/apps-config/src/api/spec/dotmog.ts deleted file mode 100644 index 736ade1a8b01..000000000000 --- a/packages/apps-config/src/api/spec/dotmog.ts +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - MogwaiStruct: { - id: 'Hash', - dna: 'Hash', - genesis: 'BlockNumber', - price: 'Balance', - gen: 'u32', - rarity: 'RarityType' - }, - MogwaiBios: { - mogwai_id: 'Hash', - state: 'u32', - metaxy: 'Vec<[u8;16]>', - intrinsic: 'Balance', - level: 'u8', - phases: 'Vec', - adaptations: 'Vec' - }, - GameEvent: { - id: 'Hash', - begin: 'BlockNumber', - duration: 'u16', - event_type: 'GameEventType', - hashes: 'Vec', - value: 'u64' - }, - GameEventType: { - _enum: [ - 'Default', - 'Hatch' - ] - }, - RarityType: { - _enum: [ - 'Minor', - 'Normal', - 'Rare', - 'Epic', - 'Legendary' - ] - }, - MogwaicoinAddress: { - address: 'Vec', - account: 'AccountId', - signature: 'Vec', - state: 'ClaimState', - balance: 'Balance' - }, - ClaimState: { - _enum: [ - 'None', - 'Registred', - 'Verified', - 'Secured', - 'Processed', - 'Holded', - 'Failed', - 'Cancelled' - ] - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/eave.ts b/packages/apps-config/src/api/spec/eave.ts deleted file mode 100644 index 5ff77bbde7d0..000000000000 --- a/packages/apps-config/src/api/spec/eave.ts +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - AccountIdOf: 'AccountId', - Address: 'MultiAddress', - AirDropCurrencyId: { - _enum: [ - 'ICE', - 'EAVE' - ] - }, - Amount: 'i128', - AmountOf: 'Amount', - AsOriginId: 'AuthoritysOriginId', - AssetId: 'u64', - AssetIdOf: 'AssetId', - AuctionId: 'u32', - AuctionIdOf: 'AuctionId', - AuctionInfo: { - bid: 'Option<(AccountId, Balance)>', - start: 'BlockNumber', - end: 'Option' - }, - AuthoritysOriginId: { - _enum: [ - 'Root', - 'EaveTreasury', - 'CdpTreasury', - 'ElpTreasury', - 'DSWF' - ] - }, - BalanceInfo: { - amount: 'Balance' - }, - BalanceRequest: { - amount: 'Balance' - }, - BalanceWrapper: { - amount: 'Balance' - }, - BondingLedger: { - total: 'Compact', - active: 'Compact', - unlocking: 'Vec' - }, - CID: 'Vec', - CallOf: 'Call', - CallRequest: { - from: 'Option', - to: 'Option', - gasLimit: 'Option', - storageLimit: 'Option', - value: 'Option', - data: 'Option' - }, - ChainId: { - _enum: { - RelayChain: 'Null', - ParaChain: 'ParaId' - } - }, - ChangeBalance: { - _enum: { - NoChange: 'Null', - NewValue: 'Balance' - } - }, - ChangeOptionRate: { - _enum: { - NoChange: 'Null', - NewValue: 'OptionRate' - } - }, - ChangeOptionRatio: { - _enum: { - NoChange: 'Null', - NewValue: 'OptionRatio' - } - }, - ChangeRate: { - _enum: { - NoChange: 'Null', - NewValue: 'Rate' - } - }, - ChangeRatio: { - _enum: { - NoChange: 'Null', - NewValue: 'Ratio' - } - }, - ClassData: { - deposit: 'Balance', - properties: 'Properties' - }, - ClassId: 'u32', - ClassIdOf: 'ClassId', - ClassInfoOf: { - metadata: 'CID', - totalIssuance: 'TokenId', - owner: 'AccountId', - data: 'ClassData' - }, - CodeInfo: { - codeSize: 'u32', - refCount: 'u32' - }, - CollateralAuctionItem: { - refundRecipient: 'AccountId', - currencyId: 'CurrencyId', - initialAmount: 'Compact', - amount: 'Compact', - target: 'Compact', - startTime: 'BlockNumber' - }, - CurrencyId: { - _enum: { - Token: 'TokenSymbol', - DEXShare: '(TokenSymbol, TokenSymbol)', - ERC20: 'EvmAddress' - } - }, - CurrencyIdOf: 'CurrencyId', - DataProviderId: { - _enum: [ - 'Aggregated', - 'Eave', - 'Band' - ] - }, - DebitAuctionItem: { - initialAmount: 'Compact', - amount: 'Compact', - fix: 'Compact', - startTime: 'BlockNumber' - }, - DelayedDispatchTime: { - _enum: { - At: 'BlockNumber', - After: 'BlockNumber' - } - }, - DelayedOrigin: { - delay: 'BlockNumber', - origin: 'PalletsOrigin' - }, - DestAddress: 'Vec', - DispatchId: 'u32', - DispatchTime: { - _enum: { - At: 'BlockNumber', - After: 'BlockNumber' - } - }, - ElpUnlockChunk: { - value: 'Compact', - era: 'Compact' - }, - EvmAccountInfo: { - nonce: 'Index', - contractInfo: 'Option', - developerDeposit: 'Option' - }, - EvmAddress: 'H160', - EvmContractInfo: { - codeHash: 'H256', - maintainer: 'H160', - deployed: 'bool' - }, - ExchangeRate: 'FixedU128', - GraduallyUpdate: { - key: 'StorageKey', - targetValue: 'StorageValue', - perBlock: 'StorageValue' - }, - Keys: 'SessionKeys2', - Ledger: { - bonded: 'Balance', - unbondingToFree: 'Balance', - freePool: 'Balance', - toUnbondNextEra: '(Balance, Balance)' - }, - LiquidationStrategy: { - _enum: [ - 'Auction', - 'Exchange' - ] - }, - LiquidityPool: { - currency_ids: 'Vec', - lp_token_id: 'AssetId', - pool_config_id: 'u32', - pool_reserves: 'Vec' - }, - LiquidityPoolConfig_: 'PoolConfig', - LiquidityPool_: 'LiquidityPool', - LookupSource: 'MultiAddress', - NomineeId: 'AccountId', - NFTBalance: 'u128', - OptionRate: 'Option', - OptionRatio: 'Option', - OracleKey: 'CurrencyId', - OracleValue: 'Price', - OrderedSet: 'Vec', - OrmlAccountData: { - free: 'Balance', - frozen: 'Balance', - reserved: 'Balance' - }, - OrmlBalanceLock: { - amount: 'Balance', - id: 'LockIdentifier' - }, - OrmlVestingSchedule: { - start: 'BlockNumber', - period: 'BlockNumber', - periodCount: 'u32', - perPeriod: 'Compact' - }, - PalletBalanceOf: 'Balance', - PalletsOrigin: { - _enum: { - System: 'SystemOrigin', - Timestamp: 'Null', - RandomnessCollectiveFlip: 'Null', - Balances: 'Null', - Accounts: 'Null', - Currencies: 'Null', - Tokens: 'Null', - Vesting: 'Null', - EaveTreasury: 'Null', - Utility: 'Null', - Multisig: 'Null', - Recovery: 'Null', - Proxy: 'Null', - Scheduler: 'Null', - Indices: 'Null', - GraduallyUpdate: 'Null', - Authorship: 'Null', - Babe: 'Null', - Grandpa: 'Null', - Staking: 'Null', - Session: 'Null', - Historical: 'Null', - GeneralCouncil: 'CollectiveOrigin', - GeneralCouncilMembership: 'Null', - EYECouncil: 'CollectiveOrigin', - EYECouncilMembership: 'Null', - ElpCouncil: 'CollectiveOrigin', - ElpCouncilMembership: 'Null', - TechnicalCommittee: 'CollectiveOrigin', - TechnicalCommitteeMembership: 'Null', - Authority: 'DelayedOrigin', - ElectionsPhragmen: 'Null', - EaveOracle: 'Null', - BandOracle: 'Null', - OperatorMembershipEave: 'Null', - OperatorMembershipBand: 'Null', - Auction: 'Null', - Rewards: 'Null', - OrmlNFT: 'Null', - Prices: 'Null', - Dex: 'Null', - AuctionManager: 'Null', - Loans: 'Null', - EYE: 'Null', - CdpTreasury: 'Null', - CdpEngine: 'Null', - EmergencyShutdown: 'Null', - Elp: 'Null', - NomineesElection: 'Null', - StakingPool: 'Null', - PolkadotBridge: 'Null', - Incentives: 'Null', - AirDrop: 'Null', - NFT: 'Null', - RenVmBridge: 'Null', - Contracts: 'Null', - EVM: 'Null', - Sudo: 'Null', - TransactionPayment: 'Null' - } - }, - Params: { - targetMaxFreeUnbondedRatio: 'Ratio', - targetMinFreeUnbondedRatio: 'Ratio', - targetUnbondingToFreeRatio: 'Ratio', - unbondingToFreeAdjustment: 'Ratio', - baseFeeRate: 'Rate' - }, - PolkadotAccountId: 'AccountId', - PolkadotAccountIdOf: 'PolkadotAccountId', - PoolId: { - _enum: { - Loans: 'CurrencyId', - DexIncentive: 'CurrencyId', - DexSaving: 'CurrencyId', - Elp: 'Null' - } - }, - PoolInfo: { - totalShares: 'Compact', - totalRewards: 'Compact', - totalWithdrawnRewards: 'Compact' - }, - Position: { - collateral: 'Balance', - debit: 'Balance' - }, - Price: 'FixedU128', - Properties: { - _set: { - _bitLength: 8, - Transferable: 1, - Burnable: 2 - } - }, - PublicKey: '[u8; 20]', - Rate: 'FixedU128', - Ratio: 'FixedU128', - RedeemStrategy: { - _enum: { - Immediately: 'Null', - Target: 'EraIndex', - WaitForUnbonding: 'Null' - } - }, - RelaychainAccountId: 'AccountId', - RiskManagementParams: { - maximumTotalDebitValue: 'Balance', - stabilityFee: 'Option', - liquidationRatio: 'Option', - liquidationPenalty: 'Option', - requiredCollateralRatio: 'Option' - }, - RpcDataProviderId: 'Text', - ScheduleTaskIndex: 'u32', - Share: 'u128', - StorageKeyBytes: 'Vec', - StorageValue: 'Vec', - StorageValueBytes: 'Vec', - SubAccountStatus: { - bonded: 'Balance', - available: 'Balance', - unbonding: 'Vec<(EraIndex,Balance)>', - mockRewardRate: 'Rate' - }, - SurplusAuctionItem: { - amount: 'Compact', - startTime: 'BlockNumber' - }, - TimestampedValue: { - value: 'OracleValue', - timestamp: 'Moment' - }, - TimestampedValueOf: 'TimestampedValue', - TokenBalanceOf: 'Balance', - TokenData: { - deposit: 'Balance' - }, - TokenId: 'u64', - TokenIdOf: 'TokenId', - TokenInfo: { - name: 'Text', - symbol: 'Text', - decimals: 'u8', - owner: 'AccountId' - }, - TokenInfoOf: { - metadata: 'CID', - owner: 'AccountId', - data: 'TokenData' - }, - TokenSymbol: { - _enum: { - EAVE: 0, - EUSD: 1, - DOT: 2, - LDOT: 3, - XBTC: 4, - RENBTC: 5, - INTERBTC: 6, - PLM: 7, - PHA: 8, - HDT: 9, - ICE: 128, - IUSD: 129, - KSM: 130, - LKSM: 131, - SDN: 135, - KILT: 138 - } - }, - TradingPair: '(CurrencyId, CurrencyId)', - TradingPairProvisionParameters: { - minContribution: '(Balance, Balance)', - targetProvision: '(Balance, Balance)', - accumulatedProvision: '(Balance, Balance)', - notBefore: 'BlockNumber' - }, - TradingPairStatus: { - _enum: { - NotEnabled: 'Null', - Provisioning: 'TradingPairProvisionParameters', - Enabled: 'Null' - } - }, - VestingScheduleOf: 'OrmlVestingSchedule', - XCurrencyId: { - chainId: 'ChainId', - currencyId: 'Vec' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/edgeware.ts b/packages/apps-config/src/api/spec/edgeware.ts deleted file mode 100644 index b46bcb411049..000000000000 --- a/packages/apps-config/src/api/spec/edgeware.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { spec } from '@edgeware/node-types'; - -const edgeware = spec.typesBundle.spec?.edgeware as OverrideBundleDefinition; - -export default edgeware; diff --git a/packages/apps-config/src/api/spec/encointer-node-notee.ts b/packages/apps-config/src/api/spec/encointer-node-notee.ts deleted file mode 100644 index 09cb3102ed5c..000000000000 --- a/packages/apps-config/src/api/spec/encointer-node-notee.ts +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // Metadata v14 was introduced here. Hence, we don't need type overrides anymore. - minmax: [9, undefined], - types: { - // Types for the signed extensions still need to be declared. - CommunityIdentifier: { - geohash: 'GeoHash', - digest: 'CidDigest' - }, - GeoHash: '[u8; 5]', - // We need to call it `CidDigest` because plain `Digest` is already a substrate type. - CidDigest: '[u8; 4]' - } - }, - { - // until v14 - minmax: [0, 8], - types: { - ShardIdentifier: 'Hash', - GetterArgs: '(AccountId, CommunityIdentifier)', - Enclave: { - pubkey: 'AccountId', - mrenclave: 'Hash', - timestamp: 'u64', - url: 'Text' - }, - PublicGetter: { - _enum: { - total_issuance: 'CommunityIdentifier', - participant_count: 'CommunityIdentifier', - meetup_count: 'CommunityIdentifier', - ceremony_reward: 'CommunityIdentifier', - location_tolerance: 'CommunityIdentifier', - time_tolerance: 'CommunityIdentifier', - scheduler_state: 'CommunityIdentifier' - } - }, - TrustedGetter: { - _enum: { - balance: '(AccountId, CommunityIdentifier)', - participant_index: '(AccountId, CommunityIdentifier)', - meetup_index: '(AccountId, CommunityIdentifier)', - attestations: '(AccountId, CommunityIdentifier)', - meetup_registry: '(AccountId, CommunityIdentifier)' - } - }, - TrustedGetterSigned: { - getter: 'TrustedGetter', - signature: 'Signature' - }, - Getter: { - _enum: { - public: 'PublicGetter', - trusted: 'TrustedGetterSigned' - } - }, - ClientRequest: { - _enum: { - PubKeyWorker: null, - MuRaPortWorker: null, - StfState: '(Getter, ShardIdentifier)' - } - }, - WorkerEncoded: 'Vec', - Request: { - shard: 'ShardIdentifier', - cyphertext: 'WorkerEncoded' - }, - TrustedCallSigned: { - call: 'TrustedCall', - nonce: 'u32', - signature: 'Signature' - }, - TrustedCall: { - _enum: { - balance_transfer: 'BalanceTransferArgs', - ceremonies_register_participant: 'RegisterParticipantArgs', - ceremonies_register_attestations: 'RegisterAttestationsArgs', - ceremonies_grant_reputation: 'GrantReputationArgs' - } - }, - BalanceTransferArgs: '(AccountId, AccountId, CommunityIdentifier, BalanceType)', - RegisterParticipantArgs: '(AccountId, CommunityIdentifier, Option>)', - RegisterAttestationsArgs: '(AccountId, Vec>)', - GrantReputationArgs: '(AccountId, CommunityIdentifier, AccountId)', - BalanceType: 'i128', - BalanceEntry: { - principal: 'BalanceType', - lastUpdate: 'BlockNumber' - }, - Demurrage: 'BalanceType', - - BusinessIdentifier: { - communityIdentifier: 'CommunityIdentifier', - controller: 'AccountId' - }, - OfferingIdentifier: 'u32', - BusinessData: { - url: 'PalletString', - last_oid: 'u32' - }, - OfferingData: { - url: 'PalletString' - }, - PalletString: 'Text', - IpfsCid: 'Text', - FixedI64F64: { - bits: 'i128' - }, - CeremonyIndexType: 'u32', - CeremonyPhaseType: { - _enum: ['Registering', 'Assigning', 'Attesting'] - }, - ParticipantIndexType: 'u64', - MeetupIndexType: 'u64', - AttestationIndexType: 'u64', - MeetupAssignment: '(MeetupIndexType, Option)', - MeetupTimeOffsetType: 'i32', - Reputation: { - _enum: ['Unverified', 'UnverifiedReputable', 'VerifiedUnlinked', 'VerifiedLinked'] - }, - CommunityReputation: { - communityIdentifier: 'CommunityIdentifier', - reputation: 'Reputation' - }, - ClaimOfAttendance: { - claimantPublic: 'AccountId', - ceremonyIndex: 'CeremonyIndexType', - communityIdentifier: 'CommunityIdentifier', - meetupIndex: 'MeetupIndexType', - location: 'Location', - timestamp: 'Moment', - numberOfParticipantsConfirmed: 'u32', - claimantSignature: 'Option' - }, - ClaimOfAttendanceSigningPayload: { - claimantPublic: 'AccountId', - ceremonyIndex: 'CeremonyIndexType', - communityIdentifier: 'CommunityIdentifier', - meetupIndex: 'MeetupIndexType', - location: 'Location', - timestamp: 'Moment', - numberOfParticipantsConfirmed: 'u32' - }, - AssignmentCount: { - bootstrappers: 'ParticipantIndexType', - reputables: 'ParticipantIndexType', - endorsees: 'ParticipantIndexType', - newbies: 'ParticipantIndexType' - }, - Assignment: { - bootstrappersReputables: 'AssignmentParams', - endorsees: 'AssignmentParams', - newbies: 'AssignmentParams', - locations: 'AssignmentParams' - }, - AssignmentParams: { - m: 'u64', - s1: 'u64', - s2: 'u64' - }, - CommunityCeremonyStats: { - communityCeremony: '(CommunityIdentifier, CeremonyIndexType)', - assignment: 'Assignment', - assignmentCount: 'AssignmentCount', - meetupCount: 'MeetupIndexType', - meetups: 'Vec' - }, - Meetup: { - index: 'MeetupIndexType', - location: 'LocationRpc', - time: 'Moment', - registrations: 'Vec<(AccountId, ParticipantRegistration)>' - }, - ParticipantRegistration: { - index: 'ParticipantIndexType', - registrationType: 'RegistrationType' - }, - RegistrationType: { - _enum: ['Bootstrapper', 'Reputable', 'Endorsee', 'Newbie'] - }, - // Todo: remove this type does no longer exist in ceremonies, but it still exists in the trusted stuff. - Attestation: { - claim: 'ClaimOfAttendance', - signature: 'MultiSignature', - public: 'AccountId' - }, - ProofOfAttendance: { - proverPublic: 'AccountId', - ceremonyIndex: 'CeremonyIndexType', - communityIdentifier: 'CommunityIdentifier', - attendeePublic: 'AccountId', - attendeeSignature: 'MultiSignature' - }, - CommunityIdentifier: { - geohash: 'GeoHash', - digest: 'CidDigest' - }, - GeoHash: '[u8; 5]', - // We need to call it `CidDigest` because plain `Digest` is already a substrate type. - CidDigest: '[u8; 4]', - CommunityCeremony: '(CommunityIdentifier,CeremonyIndexType)', - NominalIncomeType: 'BalanceType', - // This is used when handling fixed-point numbers that have been serialized with `serialize_fixed` on rusts end, - // which is the case when we call any rpc-getters. - DegreeRpc: 'Text', - // This is used when we need to encode fixed-point numbers with scale-codec, e.g., when using it in an extrinsic. - DegreeFixed: 'i128', - Location: { - lat: 'DegreeFixed', - lon: 'DegreeFixed' - }, - LocationRpc: { - lat: 'DegreeRpc', - lon: 'DegreeRpc' - }, - CidName: { - cid: 'CommunityIdentifier', - name: 'Text' - }, - CommunityMetadataType: { - name: 'Text', - symbol: 'Text', - assets: 'Text', - theme: 'Option', - url: 'Option' - }, - SystemNumber: 'u32', - SchedulerState: '(CeremonyIndexType, CeremonyPhaseType, SystemNumber)' - } - } - ], - signedExtensions: { - ChargeAssetTxPayment: { - extrinsic: { - tip: 'Compact', - assetId: 'Option' - }, - payload: {} - } - } -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/encointer-node-teeproxy.ts b/packages/apps-config/src/api/spec/encointer-node-teeproxy.ts deleted file mode 100644 index b3184a8699f3..000000000000 --- a/packages/apps-config/src/api/spec/encointer-node-teeproxy.ts +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - CeremonyPhaseType: { - _enum: [ - 'Registering', - 'Assigning', - 'Attesting' - ] - }, - CeremonyIndexType: 'u32', - CurrencyIdentifier: 'Hash', - CurrencyCeremony: { - cid: 'CurrencyIdentifier', - cindex: 'CeremonyIndexType' - }, - Location: { - lat: 'i64', - lon: 'i64' - }, - CurrencyPropertiesType: { - name_utf8: 'Text', - demurrage_per_block: 'i128' - }, - ShardIdentifier: 'Hash', - Request: { - shard: 'ShardIdentifier', - cyphertext: 'Vec' - }, - Enclave: { - pubkey: 'AccountId', - mrenclave: 'Hash', - timestamp: 'u64', - url: 'Text' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/encointer-para.ts b/packages/apps-config/src/api/spec/encointer-para.ts deleted file mode 100644 index 1e61c25c32c3..000000000000 --- a/packages/apps-config/src/api/spec/encointer-para.ts +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // metadata v14 was introduced here. Hence, we don't need type overrides anymore. - minmax: [3, undefined], - types: { - CommunityIdentifier: { - geohash: 'GeoHash', - digest: 'CidDigest' - }, - GeoHash: '[u8; 5]', - // We need to call it `CidDigest` because plain `Digest` is already a substrate type. - CidDigest: '[u8; 4]' - } - }, - { - // until metadata v14 - minmax: [0, 2], - types: { - ShardIdentifier: 'Hash', - GetterArgs: '(AccountId, CommunityIdentifier)', - Enclave: { - pubkey: 'AccountId', - mrenclave: 'Hash', - timestamp: 'u64', - url: 'Text' - }, - PublicGetter: { - _enum: { - total_issuance: 'CommunityIdentifier', - participant_count: 'CommunityIdentifier', - meetup_count: 'CommunityIdentifier', - ceremony_reward: 'CommunityIdentifier', - location_tolerance: 'CommunityIdentifier', - time_tolerance: 'CommunityIdentifier', - scheduler_state: 'CommunityIdentifier' - } - }, - TrustedGetter: { - _enum: { - balance: '(AccountId, CommunityIdentifier)', - participant_index: '(AccountId, CommunityIdentifier)', - meetup_index: '(AccountId, CommunityIdentifier)', - attestations: '(AccountId, CommunityIdentifier)', - meetup_registry: '(AccountId, CommunityIdentifier)' - } - }, - TrustedGetterSigned: { - getter: 'TrustedGetter', - signature: 'Signature' - }, - Getter: { - _enum: { - public: 'PublicGetter', - trusted: 'TrustedGetterSigned' - } - }, - ClientRequest: { - _enum: { - PubKeyWorker: null, - MuRaPortWorker: null, - StfState: '(Getter, ShardIdentifier)' - } - }, - WorkerEncoded: 'Vec', - Request: { - shard: 'ShardIdentifier', - cyphertext: 'WorkerEncoded' - }, - TrustedCallSigned: { - call: 'TrustedCall', - nonce: 'u32', - signature: 'Signature' - }, - TrustedCall: { - _enum: { - balance_transfer: 'BalanceTransferArgs', - ceremonies_register_participant: 'RegisterParticipantArgs', - ceremonies_register_attestations: 'RegisterAttestationsArgs', - ceremonies_grant_reputation: 'GrantReputationArgs' - } - }, - BalanceTransferArgs: '(AccountId, AccountId, CommunityIdentifier, BalanceType)', - RegisterParticipantArgs: '(AccountId, CommunityIdentifier, Option>)', - RegisterAttestationsArgs: '(AccountId, Vec>)', - GrantReputationArgs: '(AccountId, CommunityIdentifier, AccountId)', - - BalanceType: 'i128', - BalanceEntry: { - principal: 'BalanceType', - lastUpdate: 'BlockNumber' - }, - Demurrage: 'BalanceType', - - BusinessIdentifier: { - communityIdentifier: 'CommunityIdentifier', - controller: 'AccountId' - }, - OfferingIdentifier: 'u32', - BusinessData: { - url: 'PalletString', - last_oid: 'u32' - }, - OfferingData: { - url: 'PalletString' - }, - - PalletString: 'Text', - IpfsCid: 'Text', - FixedI64F64: { - bits: 'i128' - }, - - CeremonyIndexType: 'u32', - CeremonyPhaseType: { - _enum: ['Registering', 'Assigning', 'Attesting'] - }, - ParticipantIndexType: 'u64', - MeetupIndexType: 'u64', - AttestationIndexType: 'u64', - MeetupAssignment: '(MeetupIndexType, Option)', - MeetupTimeOffsetType: 'i32', - Reputation: { - _enum: ['Unverified', 'UnverifiedReputable', 'VerifiedUnlinked', 'VerifiedLinked'] - }, - CommunityReputation: { - communityIdentifier: 'CommunityIdentifier', - reputation: 'Reputation' - }, - ClaimOfAttendance: { - claimantPublic: 'AccountId', - ceremonyIndex: 'CeremonyIndexType', - communityIdentifier: 'CommunityIdentifier', - meetupIndex: 'MeetupIndexType', - location: 'Location', - timestamp: 'Moment', - numberOfParticipantsConfirmed: 'u32', - claimantSignature: 'Option' - }, - ClaimOfAttendanceSigningPayload: { - claimantPublic: 'AccountId', - ceremonyIndex: 'CeremonyIndexType', - communityIdentifier: 'CommunityIdentifier', - meetupIndex: 'MeetupIndexType', - location: 'Location', - timestamp: 'Moment', - numberOfParticipantsConfirmed: 'u32' - }, - AssignmentCount: { - bootstrappers: 'ParticipantIndexType', - reputables: 'ParticipantIndexType', - endorsees: 'ParticipantIndexType', - newbies: 'ParticipantIndexType' - }, - Assignment: { - bootstrappersReputables: 'AssignmentParams', - endorsees: 'AssignmentParams', - newbies: 'AssignmentParams', - locations: 'AssignmentParams' - }, - AssignmentParams: { - m: 'u64', - s1: 'u64', - s2: 'u64' - }, - CommunityCeremonyStats: { - communityCeremony: '(CommunityIdentifier, CeremonyIndexType)', - assignment: 'Assignment', - assignmentCount: 'AssignmentCount', - meetupCount: 'MeetupIndexType', - meetups: 'Vec' - }, - Meetup: { - index: 'MeetupIndexType', - location: 'LocationRpc', - time: 'Moment', - registrations: 'Vec<(AccountId, ParticipantRegistration)>' - }, - ParticipantRegistration: { - index: 'ParticipantIndexType', - registrationType: 'RegistrationType' - }, - RegistrationType: { - _enum: ['Bootstrapper', 'Reputable', 'Endorsee', 'Newbie'] - }, - // Todo: remove this type does no longer exist in ceremonies, but it still exists in the trusted stuff. - Attestation: { - claim: 'ClaimOfAttendance', - signature: 'MultiSignature', - public: 'AccountId' - }, - ProofOfAttendance: { - proverPublic: 'AccountId', - ceremonyIndex: 'CeremonyIndexType', - communityIdentifier: 'CommunityIdentifier', - attendeePublic: 'AccountId', - attendeeSignature: 'MultiSignature' - }, - - CommunityIdentifier: { - geohash: 'GeoHash', - digest: 'CidDigest' - }, - GeoHash: '[u8; 5]', - // We need to call it `CidDigest` because plain `Digest` is already a substrate type. - CidDigest: '[u8; 4]', - CommunityCeremony: '(CommunityIdentifier,CeremonyIndexType)', - NominalIncomeType: 'BalanceType', - // This is used when handling fixed-point numbers that have been serialized with `serialize_fixed` on rusts end, - // which is the case when we call any rpc-getters. - DegreeRpc: 'Text', - // This is used when we need to encode fixed-point numbers with scale-codec, e.g., when using it in an extrinsic. - DegreeFixed: 'i128', - Location: { - lat: 'DegreeFixed', - lon: 'DegreeFixed' - }, - LocationRpc: { - lat: 'DegreeRpc', - lon: 'DegreeRpc' - }, - CidName: { - cid: 'CommunityIdentifier', - name: 'Text' - }, - CommunityMetadataType: { - name: 'Text', - symbol: 'Text', - assets: 'Text', - theme: 'Option', - url: 'Option' - }, - - SystemNumber: 'u32', - SchedulerState: '(CeremonyIndexType, CeremonyPhaseType, SystemNumber)' - } - } - ], - signedExtensions: { - ChargeAssetTxPayment: { - extrinsic: { - tip: 'Compact', - assetId: 'Option' - }, - payload: {} - } - } -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/equilibrium.ts b/packages/apps-config/src/api/spec/equilibrium.ts deleted file mode 100644 index 519afeec35ff..000000000000 --- a/packages/apps-config/src/api/spec/equilibrium.ts +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { Observable } from 'rxjs'; -import type { ApiInterfaceRx, AugmentedQuery, RxResult } from '@polkadot/api/types'; -import type { AccountData, AccountId, AccountIndex, Address, Balance } from '@polkadot/types/interfaces'; -import type { Codec, OverrideBundleDefinition } from '@polkadot/types/types'; - -import { equilibrium, equilibriumNext } from '@equilab/definitions'; -import { map } from 'rxjs'; - -import { Enum } from '@polkadot/types'; -import { BN } from '@polkadot/util'; - -interface SignedBalance extends Enum { - readonly isPositive: boolean; - readonly asPositive: Balance; - readonly isNegative: boolean; - readonly asNegative: Balance; -} - -interface Currency extends Enum { - readonly isUnknown: boolean; - readonly isUsd: boolean; - readonly isEq: boolean; - readonly isEth: boolean; - readonly isBtc: boolean; - readonly isEos: boolean; - readonly isDot: boolean; -} - -type CommonBalanceMap = ApiInterfaceRx['query']['balances']['account']; - -type EqBalanceDoubleMap = AugmentedQuery< -'rxjs', -(key1: AccountIndex | AccountId | Address | string, key2: T | string) => Observable, -[AccountId, Currency] -> - -export const u64FromCurrency = (currency: string): number => { - const buf = Buffer.from(currency.toLowerCase()); - const size = buf.length; - - return buf.reduce( - (val, digit, i) => val + Math.pow(256, size - 1 - i) * digit, - 0 - ); -}; - -const transformBalanceStorage = ( - query: EqBalanceDoubleMap, - currency: string, - transform: (data: SB) => AccountData, - currencyToAsset: (arg: string, api?: ApiInterfaceRx) => T, - api?: ApiInterfaceRx -): CommonBalanceMap => { - const arg = currencyToAsset(currency, api); - - // HACK as we cannot properly transform queryMulti result, define AccountData getters on standard Enum - if (!(Enum as { hacked?: boolean }).hacked) { - (Enum as { hacked?: boolean }).hacked = true; - - for (const prop of ['free', 'reserved', 'miscFrozen', 'feeFrozen'] as Array) { - Object.defineProperty(Enum.prototype, prop, { - get () { - const accData: AccountData = transform(this as Enum); - - return accData[prop]; - }, - set () { - // Do nothing - } - }); - } - } - - // Transform result if we call the func normally - const boundFunction = (account: AccountIndex | AccountId | Address | string) => - query(account, arg).pipe(map(transform)); - - // Bind currency as second key for doubleMap for queryMulti - const boundCreator = (account: AccountIndex | AccountId | Address | string) => - query.creator([account, arg]); - - Object.assign(boundCreator, { ...query.creator }); - - return Object.assign(boundFunction, { ...query, creator: boundCreator } as unknown as CommonBalanceMap); -}; - -const signedBalancePredicate = (raw: Codec): raw is SignedBalance => - ['asNegative', 'asPositive', 'isNegative', 'isPositive'].some((key) => - Object.prototype.hasOwnProperty.call(raw, key) - ); - -export const createCustomAccount = (currency: string, currencyToAsset: (curr: string, api?: ApiInterfaceRx) => A, accountDataType = 'AccountData'): -(instanceId: string, api: ApiInterfaceRx) => RxResult<(arg: string | Uint8Array | AccountId) => Observable> => (instanceId: string, api: ApiInterfaceRx) => { - const registry = api.registry; - - const transform = (balance: SB): AccountData => { - let free = registry.createType('Balance'); - const reserved = registry.createType('Balance'); - const miscFrozen = registry.createType('Balance'); - const feeFrozen = registry.createType('Balance'); - - if (signedBalancePredicate(balance)) { - if (balance.isPositive) { - free = registry.createType('Balance', balance.asPositive); - } else if (balance.isNegative) { - free = registry.createType('Balance', balance.asNegative.mul(new BN(-1))); - } - } - - return registry.createType(accountDataType as 'AccountData', { feeFrozen, free, miscFrozen, reserved }); - }; - - return transformBalanceStorage( - api.query.eqBalances.account as unknown as EqBalanceDoubleMap, - currency, - transform, - currencyToAsset, - api - ); -}; - -const definitions: OverrideBundleDefinition = { - derives: { - ...equilibrium.instances.balances.reduce( - (all, cur) => ({ - ...all, - [cur]: { - customAccount: createCustomAccount(cur, (currency: string, api?: ApiInterfaceRx) => { - let assetsEnabled = true; - - try { - api?.registry.createType('AssetIdInnerType' as any); - } catch (_) { - assetsEnabled = false; - } - - return assetsEnabled ? { 0: u64FromCurrency(currency) } : currency; - }) - } - }), - {} - ) - }, - - instances: equilibrium.instances, - - types: [ - { - minmax: [0, 264], - types: equilibrium.types - }, - { - minmax: [265, undefined], - types: equilibriumNext.types - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/fantour.ts b/packages/apps-config/src/api/spec/fantour.ts deleted file mode 100644 index 9a55665e5b2b..000000000000 --- a/packages/apps-config/src/api/spec/fantour.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -// structs need to be in order -/* eslint-disable sort-keys */ -/* eslint-disable camelcase */ - -import { OverrideBundleDefinition } from '@polkadot/types/types'; - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Properties: 'u8', - NFTMetadata: 'Vec', - BlockNumber: 'u32', - BlockNumberOf: 'BlockNumber', - - OrderData: { - currencyId: 'Compact', - price: 'Compact', - deposit: 'Compact', - deadline: 'Compact', - categoryId: 'Compact' - }, - - CategoryId: 'u32', - CategoryIdOf: 'CategoryId', - CategoryData: { - metadata: 'NFTMetadata', - nftCount: 'Compact' - }, - - CurrencyId: 'u32', - CurrencyIdOf: 'CurrencyId', - Amount: 'i128', - AmountOf: 'Amount', - - ClassId: 'u32', - ClassIdOf: 'ClassId', - ClassInfoOf: { - metadata: 'NFTMetadata', - totalIssuance: 'TokenId', - owner: 'AccountId', - data: 'ClassData' - }, - ClassData: { - deposit: 'Compact', - properties: 'Properties', - name: 'Vec', - description: 'Vec', - createBlock: 'Compact' - }, - - TokenId: 'u64', - TokenIdOf: 'TokenId', - TokenInfoOf: { metadata: 'NFTMetadata', owner: 'AccountId', data: 'TokenData' }, - TokenData: { - deposit: 'Compact', - createBlock: 'Compact' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/galital-parachain.ts b/packages/apps-config/src/api/spec/galital-parachain.ts deleted file mode 100644 index 99598fb88153..000000000000 --- a/packages/apps-config/src/api/spec/galital-parachain.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId', - Account: { - nonce: 'U256', - balance: 'U256' - }, - Transaction: { - nonce: 'U256', - action: 'String', - gas_price: 'u64', - gas_limit: 'u64', - value: 'U256', - input: 'Vec', - signature: 'Signature' - }, - Signature: { - v: 'u64', - r: 'H256', - s: 'H256' - }, - ClassId: 'u64', - TokenId: 'u64', - ClassData: 'Vec', - TokenData: 'Vec', - ReportReason: { - _enum: [ - 'None', - 'Illigal', - 'Plagiarism', - 'Duplicate', - 'Reported' - ] - }, - ClassInfoOf: { - metadata: 'Vec', - total_issuance: 'TokenId', - - owner: 'AccountId', - class_data: 'ClassData' - }, - ExtendedInfo: { - display_flag: 'bool', - report: 'ReportReason', - frozen: 'bool' - }, - TokenInfoOf: { - metadata: 'Vec', - owner: 'AccountId', - class_data: 'ClassData' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/galital.ts b/packages/apps-config/src/api/spec/galital.ts deleted file mode 100644 index 502ff22a78d1..000000000000 --- a/packages/apps-config/src/api/spec/galital.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AccountInfo: 'AccountInfoWithTripleRefCount', - Account: { - nonce: 'U256', - balance: 'U256' - }, - Transaction: { - nonce: 'U256', - action: 'String', - gas_price: 'u64', - gas_limit: 'u64', - value: 'U256', - input: 'Vec', - signature: 'Signature' - }, - ChainId: 'u8', - ResourceId: '[u8; 32]', - DepositNonce: 'u64', - ProposalVotes: { - votes_for: 'Vec', - votes_against: 'Vec', - status: 'u8', - expiry: 'U256' - }, - ClassId: 'u64', - TokenId: 'u64', - ClassData: 'Vec', - TokenData: 'Vec', - ReportReason: { - _enum: [ - 'None', - 'Illigal', - 'Plagiarism', - 'Duplicate', - 'Reported' - ] - }, - ClassInfoOf: { - metadata: 'Vec', - total_issuance: 'TokenId', - - owner: 'AccountId', - class_data: 'ClassData' - }, - ExtendedInfo: { - display_flag: 'bool', - report: 'ReportReason', - frozen: 'bool' - }, - TokenInfoOf: { - metadata: 'Vec', - owner: 'AccountId', - class_data: 'ClassData' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/galois.ts b/packages/apps-config/src/api/spec/galois.ts deleted file mode 100644 index 7b500fbe71a8..000000000000 --- a/packages/apps-config/src/api/spec/galois.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - Balance: 'u128', - RefCount: 'u32', - Account: { - nonce: 'U256', - balance: 'U256' - }, - AccountServiceEnum: { - _enum: { - Nickname: 'String', - Ethereum: 'H160' - } - }, - MultiAddressDetails: { - nickname: 'AccountServiceEnum', - ethereum: 'AccountServiceEnum' - }, - Nickname: 'String', - Ethereum: 'H160', - TransferAmountInfo: { - date: 'u64', - daily_info: 'Balance', - monthly_info: 'Balance', - yearly_info: 'Balance' - }, - AccountLimit: { - daily_limit: 'Balance', - monthly_limit: 'Balance', - yearly_limit: 'Balance' - }, - Keys: 'SessionKeys2' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/gamepower.ts b/packages/apps-config/src/api/spec/gamepower.ts deleted file mode 100644 index 2252d19bccc6..000000000000 --- a/packages/apps-config/src/api/spec/gamepower.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - AccountInfo: 'AccountInfoWithDualRefCount', - AssetId: 'u64', - SeriesId: 'u64', - ClassId: 'u32', - ClassIdOf: 'ClassId', - ClassInfoOf: 'ClassInfo', - TokenId: 'u64', - TokenIdOf: 'TokenId', - TokenInfoOf: 'TokenInfo', - ClassInfo: { - metadata: 'Vec', - total_issuance: 'TokenId', - owner: 'AccountId', - data: 'NftClassData' - }, - TokenInfo: { - metadata: 'Vec', - owner: 'AccountId', - data: 'NftAssetData' - }, - NftSeriesData: { - name: 'Vec', - owner: 'AccountId', - properties: 'Vec' - }, - NftClassData: { - deposit: 'Balance', - properties: 'Vec', - token_type: 'TokenType', - collection_type: 'CollectionType', - total_supply: 'u64', - initial_supply: 'u64' - }, - NftAssetData: { - deposit: 'Balance', - name: 'Vec', - description: 'Vec', - properties: 'Vec' - }, - TokenType: { - _enum: [ - 'Transferrable', - 'BoundToAddress' - ] - }, - CollectionType: { - _enum: [ - 'Collectable', - 'Wearable', - 'Executable' - ] - }, - ClassProperties: { - Transferrable: 'bool', - Burnable: 'bool' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/genshiro.ts b/packages/apps-config/src/api/spec/genshiro.ts deleted file mode 100644 index 49d0e67dfbf2..000000000000 --- a/packages/apps-config/src/api/spec/genshiro.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { genshiro } from '@equilab/definitions'; - -import { createCustomAccount, u64FromCurrency } from './equilibrium'; - -const definitions: OverrideBundleDefinition = { - derives: { - ...genshiro.instances.balances.reduce( - (all, cur) => ({ - ...all, - [cur]: { - customAccount: createCustomAccount(cur, (currency: string) => ({ 0: u64FromCurrency(currency) }), 'CompatAccountData') - } - }), - {} - ) - }, - - instances: genshiro.instances, - - types: [ - { - // on all versions - minmax: [0, undefined], - types: genshiro.types - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/hanonycash.ts b/packages/apps-config/src/api/spec/hanonycash.ts deleted file mode 100644 index 7a1b7baee47f..000000000000 --- a/packages/apps-config/src/api/spec/hanonycash.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Difficulty: 'U256', - DifficultyAndTimestamp: { - difficulty: 'Difficulty', - timestamp: 'Moment' - }, - Era: { - genesisBlockHash: 'H256', - finalBlockHash: 'H256', - finalStateRoot: 'H256' - }, - RefCount: 'u8' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/hydrate.ts b/packages/apps-config/src/api/spec/hydrate.ts deleted file mode 100644 index b435dd3fe962..000000000000 --- a/packages/apps-config/src/api/spec/hydrate.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Amount: 'i128', - AmountOf: 'Amount', - Address: 'AccountId', - OrmlAccountData: { - free: 'Balance', - frozen: 'Balance', - reserved: 'Balance' - }, - Fee: { - numerator: 'u32', - denominator: 'u32' - }, - BalanceInfo: { - amount: 'Balance', - assetId: 'AssetId' - }, - CurrencyId: 'AssetId', - CurrencyIdOf: 'AssetId', - Intention: { - who: 'AccountId', - asset_sell: 'AssetId', - asset_buy: 'AssetId', - amount: 'Balance', - discount: 'bool', - sell_or_buy: 'IntentionType' - }, - IntentionId: 'u128', - IntentionType: { - _enum: [ - 'SELL', - 'BUY' - ] - }, - LookupSource: 'AccountId', - OrderedSet: 'Vec', - Price: 'Balance', - Chain: { - genesisHash: 'Vec', - lastBlockHash: 'Vec' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/idavoll.ts b/packages/apps-config/src/api/spec/idavoll.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/idavoll.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/imbue.ts b/packages/apps-config/src/api/spec/imbue.ts deleted file mode 100644 index 951463a626d5..000000000000 --- a/packages/apps-config/src/api/spec/imbue.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/index.ts b/packages/apps-config/src/api/spec/index.ts index 8c0c6f18a943..d101e24f9485 100644 --- a/packages/apps-config/src/api/spec/index.ts +++ b/packages/apps-config/src/api/spec/index.ts @@ -3,288 +3,18 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -import acala from './acala'; -import ajuna from './ajuna'; -import altair from './altair'; -import apron from './apron'; -import aresGladios from './ares-gladios'; -import aresParachain from './ares-parachain'; -import astar from './astar'; -import automata from './automata'; -import bajun from './bajun'; -import basilisk from './basilisk'; -import beresheet from './beresheet'; -import bifrost from './bifrost'; -import bifrostAsgard from './bifrost-asgard'; -import bifrostParachain from './bifrost-parachain'; -import bitcountry from './bitcountry'; -import bitcountryPioneer from './bitcountry-pioneer'; -import bitcountryParachain from './bitcountry-rococo'; -import centrifuge from './centrifuge'; -import centrifugeChain from './centrifuge-chain'; -import chainx from './chainx'; -import clover from './clover'; -import cloverRococo from './clover-rococo'; -import coinversation from './coinversation'; -import competitorsClub from './competitors-club'; -import contracts from './contracts'; -import crab from './crab'; -import crownSterlingChain from './crown-sterling'; -import crust from './crust'; -import testPara from './cumulus-test-parachain'; -import darwinia from './darwinia'; -import datahighwayParachain from './datahighway'; -import dockMainnet from './dock-mainnet'; -import dockTestnet from './dock-testnet'; -import dotmog from './dotmog'; -import eave from './eave'; -import edgeware from './edgeware'; -import encointerNodeNotee from './encointer-node-notee'; -import encointerNodeTeeproxy from './encointer-node-teeproxy'; -import encointerPara from './encointer-para'; -import equilibrium from './equilibrium'; -import fantour from './fantour'; -import frequency from './frequency'; -import galital from './galital'; -import galitalParachain from './galital-parachain'; -import galois from './galois'; -import gamepower from './gamepower'; -import genshiro from './genshiro'; -import hanonycash from './hanonycash'; -import hydrate from './hydrate'; -import idavoll from './idavoll'; -import imbue from './imbue'; -import integritee from './integritee'; -import interbtc from './interbtc'; -import ipse from './ipse'; -import jupiter from './jupiter'; -import jupiterRococo from './jupiter-rococo'; -import jur from './jur'; -import khala from './khala'; -import konomi from './konomi'; -import kpron from './kpron'; -import kulupu from './kulupu'; -import kusari from './kusari'; -import kylin from './kylin'; -import laminar from './laminar'; -import litentry from './litentry'; -import logion from './logion'; -import logionParachain from './logion-parachain'; -import mangata from './mangata'; -import manta from './manta'; -import mathchain from './mathchain'; -import moonbeam from './moonbeam'; -import mybank from './mybank'; -import neatcoin from './neatcoin'; -import nftmart from './nftmart'; -import nodle from './nodle'; -import oak from './oak'; -import opal from './opal'; -import opportunity from './opportunity'; -import origintrail from './origintrail'; -import pangolin from './pangolin'; -import pangoro from './pangoro'; -import parallel from './parallel'; -import parami from './parami'; -import phoenix from './phoenix'; -import pichiu from './pichiu'; -import polkadex from './polkadex'; -import polkafoundry from './polkafoundry'; -import polymesh from './polymesh'; -import pontem from './pontem'; -import prism from './prism'; -import quartz from './quartz'; -import realis from './realis'; -import riochain from './riochain'; -import robonomics from './robonomics'; -import rootnet from './rootnet'; -import shibuya from './shibuya'; -import shiden from './shiden'; -import snowbridge from './snowbridge'; -import soraSubstrate from './soraSubstrate'; -import spanner from './spanner'; -import stafi from './stafi'; -import standard from './standard'; -import subdao from './subdao'; -import subgame from './subgame'; -import subsocial from './subsocial'; -import subspace from './subspace'; -import substrateContractsNode from './substrateContractsNode'; -import swapdex from './swapdex'; -import t0rn from './t0rn'; -import ternoa from './ternoa'; -import trustbase from './trustbase'; -import turing from './turing'; -import uart from './uart'; -import unique from './unique'; -import unitnetwork from './unitnetwork'; -import unitv from './unitv'; -import vln from './vln'; -import vlnrococo from './vln-rococo'; -import vodka from './vodka'; -import web3games from './web3games'; -import westlake from './westlake'; -import zCloak from './zCloak'; -import zeitgeist from './zeitgeist'; -import zenlink from './zenlink'; -import zero from './zero'; +import cord from './cord'; + + // NOTE: The mapping is done from specName in state.getRuntimeVersion const spec: Record = { - Crab: crab, - Darwinia: darwinia, - 'Darwinia Crab PC2': pangolin, - 'Darwinia PC2': pangolin, - Equilibrium: equilibrium, - Genshiro: genshiro, - 'Genshiro Rococo Testnet': genshiro, - Pangolin: pangolin, - Pangoro: pangoro, - VLN: vln, - 'VLN-PC': vlnrococo, - ...acala, - ajuna, - altair, - apron, - 'ares-gladios': aresGladios, - 'ares-mars': aresParachain, - 'ares-odyssey': aresParachain, - asgard: bifrostAsgard, - astar, - automata, - bajun, - basilisk, - beresheet, - bifrost, - 'bifrost-parachain': bifrostParachain, - 'bitcountry-node': bitcountry, - 'bitcountry-parachain': bitcountryParachain, - centrifuge, - 'centrifuge-chain': centrifugeChain, - chainx, - 'chainx-parachain': chainx, - clover, - 'clover-rococo': cloverRococo, - coinversation, - 'competitors-club': competitorsClub, - contextfree: automata, - contracts, - 'crown-sterling': crownSterlingChain, - crust, - 'crust-parachain': crust, - 'cumulus-test-parachain': testPara, - datahighway: westlake, - 'datahighway-parachain': datahighwayParachain, - dawn: eave, - 'dev-parachain': zenlink, - 'dock-pos-main-runtime': dockMainnet, - 'dock-pos-test-runtime': dockTestnet, - 'dotmog-node': dotmog, - edgeware, - 'encointer-node-notee': encointerNodeNotee, - 'encointer-node-teeproxy': encointerNodeTeeproxy, - 'encointer-parachain': encointerPara, - fantour, - frequency, - 'frequency-rococo': frequency, - galital, - 'galital-collator': galitalParachain, - gamepower, - 'hack-hydra-dx': hydrate, - halongbay: polkafoundry, - hanonycash, - heiko: parallel, - 'hydra-dx': hydrate, - idavoll, - imbue, - 'integritee-parachain': integritee, - 'interbtc-parachain': interbtc, - 'interbtc-standalone': interbtc, - 'interlay-parachain': interbtc, - 'ipse-node': ipse, - 'jupiter-prep': jupiter, - 'jupiter-rococo': jupiterRococo, - 'jur-chain': jur, - kerria: parallel, - khala, - 'kintsugi-parachain': interbtc, - konomi, - kpron, - kulupu, - kusari, - kylin, - laminar, - litentry, - logion, - 'logion-parachain': logionParachain, - mangata, - 'mangata-parachain': mangata, - 'manta-node': manta, - mathchain, - 'mathchain-galois': galois, - moonbase: moonbeam, - moonbeam, - moonriver: moonbeam, - moonshadow: moonbeam, - 'mybank.network Testnet': mybank, - neatcoin, - nftmart, - 'node-moonbeam': moonbeam, - 'node-polkadex': polkadex, - 'nodle-chain': nodle, - oak, - opal, - opportunity, - 'origintrail-parachain': origintrail, - parallel, - parami, - 'phoenix-node': phoenix, - 'phoenix-parachain': phoenix, - pichiu, - 'pioneer-runtime': bitcountryPioneer, - polymesh, - 'pontem-node': pontem, - prism, - quartz, - realis, - 'riochain-runtime': riochain, - robonomics, - root: rootnet, - shibuya, - shiden, - snowbridge, - 'sora-substrate': soraSubstrate, - sora_ksm: soraSubstrate, - spanner, - stafi, - standard, - steam: eave, - subdao, - subgame, - subsocial, - subspace, - 'substrate-contracts-node': substrateContractsNode, - subzero: zero, - swapdex, - t0rn, - ternoa, - 'testnet-interlay': interbtc, - 'testnet-kintsugi': interbtc, - trustbase, - turing, - uart, - unique, - 'unit-node': unitv, - 'unit-parachain': unitv, - 'unitnetwork-node': unitnetwork, - 'unitnetwork-parachain': unitnetwork, - unorthodox: standard, - vanilla: parallel, - vara: standard, - vodka, - 'web3games-node': web3games, - 'zcloak-network': zCloak, - zeitgeist + 'cord-dev': cord, + 'cord-local': cord, + 'cord-staging': cord, + 'cord': cord, + 'cord-node': cord, + }; export default spec; diff --git a/packages/apps-config/src/api/spec/integritee.ts b/packages/apps-config/src/api/spec/integritee.ts deleted file mode 100644 index 18c03ef9da91..000000000000 --- a/packages/apps-config/src/api/spec/integritee.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - Enclave: { - mrenclave: 'Hash', - pubkey: 'AccountId', - timestamp: 'u64', - url: 'Text' - }, - LookupSource: 'MultiAddress', - Request: { - cyphertext: 'Vec', - shard: 'ShardIdentifier' - }, - ShardIdentifier: 'Hash' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/interbtc.ts b/packages/apps-config/src/api/spec/interbtc.ts deleted file mode 100644 index 562e1975e778..000000000000 --- a/packages/apps-config/src/api/spec/interbtc.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -/* eslint-disable @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */ - -import type { Observable } from 'rxjs'; -import type { ApiInterfaceRx } from '@polkadot/api/types'; -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import interbtc from '@interlay/interbtc-types'; -import { combineLatest, map } from 'rxjs'; - -import { DeriveBalancesAll } from '@polkadot/api-derive/types'; -import { memo } from '@polkadot/api-derive/util'; -import { TypeRegistry, U128 } from '@polkadot/types'; -import { Balance } from '@polkadot/types/interfaces'; -import { FrameSystemAccountInfo } from '@polkadot/types/lookup'; -import { BN, formatBalance } from '@polkadot/util'; - -function balanceOf (number: number | string): U128 { - return new U128(new TypeRegistry(), number); -} - -function defaultAccountBalance (): DeriveBalancesAll { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - return { - accountNonce: new BN(1), - additional: [], - availableBalance: balanceOf(0), - freeBalance: balanceOf(0), - lockedBalance: balanceOf(0), - lockedBreakdown: [], - namedReserves: [], - reservedBalance: balanceOf(0) - } as any; -} - -interface OrmlAccountData { - free: Balance, - reserved: Balance, - frozen: Balance, -} - -export function getBalance ( - instanceId: string, - api: ApiInterfaceRx -): () => Observable { - const nativeToken = api.registry.chainTokens[0] || formatBalance.getDefaults().unit; - - return memo( - instanceId, - (account: string): Observable => - combineLatest<[any, any]>([api.query.tokens.accounts(account, { Token: nativeToken }), api.query.system.account(account)]).pipe( - map(([data, systemAccount]: [OrmlAccountData, FrameSystemAccountInfo]): DeriveBalancesAll => { - return { - ...defaultAccountBalance(), - accountId: api.registry.createType('AccountId', account), - accountNonce: systemAccount.nonce, - availableBalance: api.registry.createType('Balance', data.free.sub(data.frozen)), - freeBalance: data.free, - lockedBalance: data.frozen, - reservedBalance: data.reserved - }; - }) - ) - ); -} - -const definitions: OverrideBundleDefinition = { - derives: { - balances: { - account: getBalance, - all: getBalance - } - }, - - ...interbtc -} as any; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/ipse.ts b/packages/apps-config/src/api/spec/ipse.ts deleted file mode 100644 index fcc3a09728e5..000000000000 --- a/packages/apps-config/src/api/spec/ipse.ts +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - test: 'u64', - Address: 'IndicesLookupSource', - LookupSource: 'IndicesLookupSource', - GIB: 'u64', - Amount: 'u128', - Miner: { - account_id: 'AccountId', - nickname: 'Vec', - region: 'Vec', - url: 'Vec', - public_key: 'Vec', - stash_address: 'AccountId', - capacity: 'u128', - unit_price: 'Balance', - violation_times: 'u64', - total_staking: 'Balance', - create_ts: 'u64', - update_ts: 'u64' - }, - Order: { - miner: 'AccountId', - label: 'Vec', - hash: '[u8; 46]', - size: 'u128', - user: 'AccountId', - orders: 'Vec>', - status: 'OrderStatus', - create_ts: 'u64', - update_ts: 'u64', - duration: 'u64' - }, - MinerOrder: { - miner: 'AccountId', - day_price: 'Balance', - total_price: 'Balance', - verify_result: 'bool', - verify_ts: 'u64', - confirm_ts: 'u64', - url: 'Option>' - }, - OrderStatus: { - _enum: [ - 'Created', - 'Confirmed', - 'Expired', - 'Deleted' - ] - }, - MiningInfo: { - miner: 'Option', - best_dl: 'u64', - block: 'u64' - }, - Difficulty: { - base_target: 'u64', - net_difficulty: 'u64', - block: 'u64' - }, - MachineInfo: { - plot_size: 'u64', - numeric_id: 'u128', - update_time: 'BlockNumber', - is_stop: 'bool', - reward_dest: 'AccountId' - }, - StakingInfo: { - miner: 'AccountId', - miner_proportion: 'Percent', - total_staking: 'Balance', - others: 'Vec<(AccountId, Balance, Balance)>' - }, - Oprate: { - _enum: [ - 'Add', - 'Sub' - ] - }, - MiningHistory: { - total_num: 'u64', - history: 'Vec<(BlockNumber, Balance)>' - }, - PostTxTransferData: { - verify_status: 'u64', - irreversible: 'bool', - is_post_transfer: 'bool', - contract_account: 'Vec', - from: 'Vec', - to: 'Vec', - quantity: 'u64', - memo: 'Vec' - }, - AddressStatus: { - _enum: [ - 'active', - 'inActive' - ] - }, - FetchFailedOf: { - block_num: 'BlockNumber', - tx: 'Vec', - err: 'Vec' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/jupiter-rococo.ts b/packages/apps-config/src/api/spec/jupiter-rococo.ts deleted file mode 100644 index dd59647c404c..000000000000 --- a/packages/apps-config/src/api/spec/jupiter-rococo.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - LookupSource: 'MultiAddress', - Address: 'MultiAddress' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/jupiter.ts b/packages/apps-config/src/api/spec/jupiter.ts deleted file mode 100644 index c4a9aad8f31d..000000000000 --- a/packages/apps-config/src/api/spec/jupiter.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, 2], - types: { - LookupSource: 'MultiAddress', - Address: 'MultiAddress', - AccountInfo: 'AccountInfoWithDualRefCount', - FullIdentification: 'AccountId', - AuthorityState: { - _enum: [ - 'Working', - 'Waiting' - ] - }, - EraIndex: 'u32', - ActiveEraInfo: { - index: 'EraIndex', - start: 'Option' - }, - UnappliedSlash: { - validator: 'AccountId', - reporters: 'Vec' - } - } - }, - { - // on all versions - minmax: [3, undefined], - types: { - LookupSource: 'MultiAddress', - Address: 'MultiAddress', - AccountInfo: 'AccountInfoWithTripleRefCount', - AliveContractInfo: { - trieId: 'TrieId', - storageSize: 'u32', - pairCount: 'u32', - codeHash: 'CodeHash', - rentAllowance: 'Balance', - rentPayed: 'Balance', - deductBlock: 'BlockNumber', - lastWrite: 'Option', - _reserved: 'Option' - }, - FullIdentification: 'AccountId', - AuthorityState: { - _enum: ['Working', 'Waiting'] - }, - EraIndex: 'u32', - ActiveEraInfo: { - index: 'EraIndex', - start: 'Option' - }, - UnappliedSlash: { - validator: 'AccountId', - reporters: 'Vec' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/khala.ts b/packages/apps-config/src/api/spec/khala.ts deleted file mode 100644 index 6d6e0d26a84a..000000000000 --- a/packages/apps-config/src/api/spec/khala.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { typesBundle } from '@phala/typedefs'; - -export default typesBundle as OverrideBundleDefinition; diff --git a/packages/apps-config/src/api/spec/konomi.ts b/packages/apps-config/src/api/spec/konomi.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/konomi.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/kpron.ts b/packages/apps-config/src/api/spec/kpron.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/kpron.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/kulupu.ts b/packages/apps-config/src/api/spec/kulupu.ts deleted file mode 100644 index 1364b6e72d04..000000000000 --- a/packages/apps-config/src/api/spec/kulupu.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - CurvePoint: { - start: 'BlockNumber', - reward: 'Balance', - taxation: 'Perbill' - }, - Difficulty: 'U256', - DifficultyAndTimestamp: { - difficulty: 'Difficulty', - timestamp: 'Moment' - }, - Era: { - genesisBlockHash: 'H256', - finalBlockHash: 'H256', - finalStateRoot: 'H256' - } - } - }, - { - // swap to MultiAddress in runtime 13 - minmax: [13, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress' - } - }, - { - // enable pallet-lockdrop in runtime 17 - minmax: [17, undefined], - types: { - CampaignIdentifier: '[u8; 4]' - } - }, - { - // enable pallet-atomic-swap in runtime 24 - minmax: [24, undefined], - types: { - HashedProof: '[u8; 32]', - PendingSwap: { - source: 'AccountId', - action: 'SwapAction', - endBlock: 'BlockNumber' - }, - SwapAction: { - value: 'Balance' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/kusari.ts b/packages/apps-config/src/api/spec/kusari.ts deleted file mode 100644 index 1cac59b62cdf..000000000000 --- a/packages/apps-config/src/api/spec/kusari.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - EvmAddress: 'H160', - EthereumTxHash: 'H256', - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - AccountInfo: 'AccountInfoWithTripleRefCount', - Account: { - nonce: 'U256', - balance: 'U256' - }, - Transaction: { - nonce: 'U256', - action: 'String', - gas_price: 'u64', - gas_limit: 'u64', - value: 'U256', - input: 'Vec', - signature: 'Signature' - }, - Signature: { - v: 'u64', - r: 'H256', - s: 'H256' - }, - ClassId: 'u64', - TokenId: 'u64', - ClassData: 'Vec', - TokenData: 'Vec', - ReportReason: { - _enum: [ - 'None', - 'Illigal', - 'Plagiarism', - 'Duplicate', - 'Reported' - ] - }, - ClassInfoOf: { - metadata: 'Vec', - total_issuance: 'TokenId', - - owner: 'AccountId', - class_data: 'ClassData' - }, - ExtendedInfo: { - display_flag: 'bool', - report: 'ReportReason', - frozen: 'bool' - }, - TokenInfoOf: { - metadata: 'Vec', - owner: 'AccountId', - class_data: 'ClassData' - }, - 'bridge::ChainId': 'u8', - ChainId: 'u8', - ResourceId: '[u8; 32]', - DepositNonce: 'u64', - ProposalVotes: { - votes_for: 'Vec', - votes_against: 'Vec', - status: 'enum' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/kylin.ts b/packages/apps-config/src/api/spec/kylin.ts deleted file mode 100644 index f9a5d9b245c7..000000000000 --- a/packages/apps-config/src/api/spec/kylin.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - DataRequest: { - para_id: 'Option', - account_id: 'Option', - requested_block_number: 'BlockNumber', - processed_block_number: 'Option', - requested_timestamp: 'u128', - processed_timestamp: 'Option', - payload: 'Text', - feed_name: 'Text', - is_query: 'bool', - url: 'Option' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/laminar.ts b/packages/apps-config/src/api/spec/laminar.ts deleted file mode 100644 index 12035f7e3d0b..000000000000 --- a/packages/apps-config/src/api/spec/laminar.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import { typesBundleForPolkadot } from '@laminar/type-definitions'; - -export default typesBundleForPolkadot.spec.laminar as unknown as OverrideBundleDefinition; diff --git a/packages/apps-config/src/api/spec/litentry.ts b/packages/apps-config/src/api/spec/litentry.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/litentry.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/logion-parachain.ts b/packages/apps-config/src/api/spec/logion-parachain.ts deleted file mode 100644 index 85ba613720ff..000000000000 --- a/packages/apps-config/src/api/spec/logion-parachain.ts +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const logionDefault = { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - PeerId: '(Vec)', - AccountInfo: 'AccountInfoWithDualRefCount', - TAssetBalance: 'u128', - AssetId: 'u64', - AssetDetails: { - owner: 'AccountId', - issuer: 'AccountId', - admin: 'AccountId', - freezer: 'AccountId', - supply: 'Balance', - deposit: 'DepositBalance', - max_zombies: 'u32', - min_balance: 'Balance', - zombies: 'u32', - accounts: 'u32', - is_frozen: 'bool' - }, - AssetMetadata: { - deposit: 'DepositBalance', - name: 'Vec', - symbol: 'Vec', - decimals: 'u8' - }, - LocId: 'u128', - LegalOfficerCaseOf: { - owner: 'AccountId', - requester: 'Requester', - metadata: 'Vec', - files: 'Vec', - closed: 'bool', - loc_type: 'LocType', - links: 'Vec', - void_info: 'Option>', - replacer_of: 'Option', - collection_last_block_submission: 'Option', - collection_max_size: 'Option' - }, - MetadataItem: { - name: 'Vec', - value: 'Vec', - submitter: 'AccountId' - }, - LocType: { - _enum: [ - 'Transaction', - 'Identity', - 'Collection' - ] - }, - LocLink: { - id: 'LocId', - nature: 'Vec' - }, - File: { - hash: 'Hash', - nature: 'Vec', - submitter: 'AccountId' - }, - LocVoidInfo: { - replacer: 'Option' - }, - StorageVersion: { - _enum: [ - 'V1', - 'V2MakeLocVoid', - 'V3RequesterEnum', - 'V4ItemSubmitter', - 'V5Collection' - ] - }, - Requester: { - _enum: { - None: null, - Account: 'AccountId', - Loc: 'LocId' - } - }, - CollectionSize: 'u32', - CollectionItemId: 'Hash', - CollectionItem: { - description: 'Vec' - } -}; - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - ...logionDefault - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/logion.ts b/packages/apps-config/src/api/spec/logion.ts deleted file mode 100644 index 71c1458ccdce..000000000000 --- a/packages/apps-config/src/api/spec/logion.ts +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -import logionDefault, { session as logionSession } from '@logion/node-api/dist/interfaces/definitions'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const defaultTypesUpTo109 = { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - PeerId: '(Vec)', - AccountInfo: 'AccountInfoWithDualRefCount', - TAssetBalance: 'u128', - AssetId: 'u64', - AssetDetails: { - owner: 'AccountId', - issuer: 'AccountId', - admin: 'AccountId', - freezer: 'AccountId', - supply: 'Balance', - deposit: 'DepositBalance', - max_zombies: 'u32', - min_balance: 'Balance', - zombies: 'u32', - accounts: 'u32', - is_frozen: 'bool' - }, - AssetMetadata: { - deposit: 'DepositBalance', - name: 'Vec', - symbol: 'Vec', - decimals: 'u8' - }, - LocId: 'u128', - LegalOfficerCaseOf: { - owner: 'AccountId', - requester: 'Requester', - metadata: 'Vec', - files: 'Vec', - closed: 'bool', - loc_type: 'LocType', - links: 'Vec', - void_info: 'Option>', - replacer_of: 'Option', - collection_last_block_submission: 'Option', - collection_max_size: 'Option' - }, - MetadataItem: { - name: 'Vec', - value: 'Vec', - submitter: 'AccountId' - }, - LocType: { - _enum: [ - 'Transaction', - 'Identity', - 'Collection' - ] - }, - LocLink: { - id: 'LocId', - nature: 'Vec' - }, - File: { - hash: 'Hash', - nature: 'Vec', - submitter: 'AccountId' - }, - LocVoidInfo: { - replacer: 'Option' - }, - StorageVersion: { - _enum: [ - 'V1', - 'V2MakeLocVoid', - 'V3RequesterEnum', - 'V4ItemSubmitter', - 'V5Collection' - ] - }, - Requester: { - _enum: { - None: null, - Account: 'AccountId', - Loc: 'LocId' - } - }, - CollectionSize: 'u32', - CollectionItemId: 'Hash', - CollectionItem: { - description: 'Vec' - } -}; - -const defaultTypesUpTo111 = { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - PeerId: '(Vec)', - AccountInfo: 'AccountInfoWithDualRefCount', - TAssetBalance: 'u128', - AssetId: 'u64', - AssetDetails: { - owner: 'AccountId', - issuer: 'AccountId', - admin: 'AccountId', - freezer: 'AccountId', - supply: 'Balance', - deposit: 'DepositBalance', - max_zombies: 'u32', - min_balance: 'Balance', - zombies: 'u32', - accounts: 'u32', - is_frozen: 'bool' - }, - AssetMetadata: { - deposit: 'DepositBalance', - name: 'Vec', - symbol: 'Vec', - decimals: 'u8' - }, - LocId: 'u128', - LegalOfficerCaseOf: { - owner: 'AccountId', - requester: 'Requester', - metadata: 'Vec', - files: 'Vec', - closed: 'bool', - loc_type: 'LocType', - links: 'Vec', - void_info: 'Option>', - replacer_of: 'Option', - collection_last_block_submission: 'Option', - collection_max_size: 'Option', - collection_can_upload: 'bool' - }, - MetadataItem: { - name: 'Vec', - value: 'Vec', - submitter: 'AccountId' - }, - LocType: { - _enum: [ - 'Transaction', - 'Identity', - 'Collection' - ] - }, - LocLink: { - id: 'LocId', - nature: 'Vec' - }, - File: { - hash: 'Hash', - nature: 'Vec', - submitter: 'AccountId' - }, - LocVoidInfo: { - replacer: 'Option' - }, - StorageVersion: { - _enum: [ - 'V1', - 'V2MakeLocVoid', - 'V3RequesterEnum', - 'V4ItemSubmitter', - 'V5Collection', - 'V6ItemUpload' - ] - }, - Requester: { - _enum: { - None: null, - Account: 'AccountId', - Loc: 'LocId' - } - }, - CollectionSize: 'u32', - CollectionItemId: 'Hash', - CollectionItem: { - description: 'Vec', - files: 'Vec>' - }, - CollectionItemFile: { - name: 'Vec', - content_type: 'Vec', - fileSize: 'u32', - hash: 'Hash' - } -}; - -const defaultTypesUpTo116 = { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - OpaquePeerId: 'Vec', - AccountInfo: 'AccountInfoWithDualRefCount', - TAssetBalance: 'u128', - AssetId: 'u64', - AssetDetails: { - owner: 'AccountId', - issuer: 'AccountId', - admin: 'AccountId', - freezer: 'AccountId', - supply: 'Balance', - deposit: 'DepositBalance', - max_zombies: 'u32', - min_balance: 'Balance', - zombies: 'u32', - accounts: 'u32', - is_frozen: 'bool' - }, - AssetMetadata: { - deposit: 'DepositBalance', - name: 'Vec', - symbol: 'Vec', - decimals: 'u8' - }, - LocId: 'u128', - LegalOfficerCaseOf: { - owner: 'AccountId', - requester: 'Requester', - metadata: 'Vec', - files: 'Vec', - closed: 'bool', - loc_type: 'LocType', - links: 'Vec', - void_info: 'Option>', - replacer_of: 'Option', - collection_last_block_submission: 'Option', - collection_max_size: 'Option', - collection_can_upload: 'bool' - }, - MetadataItem: { - name: 'Vec', - value: 'Vec', - submitter: 'AccountId' - }, - LocType: { - _enum: [ - 'Transaction', - 'Identity', - 'Collection' - ] - }, - LocLink: { - id: 'LocId', - nature: 'Vec' - }, - File: { - hash: 'Hash', - nature: 'Vec', - submitter: 'AccountId' - }, - LocVoidInfo: { - replacer: 'Option' - }, - StorageVersion: { - _enum: [ - 'V1', - 'V2MakeLocVoid', - 'V3RequesterEnum', - 'V4ItemSubmitter', - 'V5Collection', - 'V6ItemUpload', - 'V7ItemToken' - ] - }, - Requester: { - _enum: { - None: null, - Account: 'AccountId', - Loc: 'LocId' - } - }, - CollectionSize: 'u32', - CollectionItemId: 'Hash', - CollectionItem: { - description: 'Vec', - files: 'Vec>', - token: 'Option', - restricted_delivery: 'bool' - }, - CollectionItemFile: { - name: 'Vec', - content_type: 'Vec', - fileSize: 'u32', - hash: 'Hash' - }, - CollectionItemToken: { - token_type: 'Vec', - token_id: 'Vec' - } -}; - -const definitions: OverrideBundleDefinition = { - alias: { - loAuthorityList: { - StorageVersion: 'LoAuthorityListStorageVersion' - } - }, - types: [ - { - minmax: [0, 109], - types: { - ...defaultTypesUpTo109, - ...logionSession.types - } - }, - { - minmax: [110, 111], - types: { - ...defaultTypesUpTo111, - ...logionSession.types - } - }, - { - minmax: [112, 116], - types: { - ...defaultTypesUpTo116, - ...logionSession.types - } - }, - { - // Latest - minmax: [117, undefined], - types: { - ...logionDefault.types, - ...logionSession.types - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/mangata.ts b/packages/apps-config/src/api/spec/mangata.ts deleted file mode 100644 index 09d33bbe16e3..000000000000 --- a/packages/apps-config/src/api/spec/mangata.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -// Since this libary includes augmented definitions, we inmport it via -// a CJS bridge ... which hopefully just short-circuits all of that -import { typesBundleForPolkadotApps } from '../../cjs/mangata.js'; - -export default typesBundleForPolkadotApps; diff --git a/packages/apps-config/src/api/spec/manta.ts b/packages/apps-config/src/api/spec/manta.ts deleted file mode 100644 index 51a0c1766ade..000000000000 --- a/packages/apps-config/src/api/spec/manta.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: - { - CurrencyId: { - _enum: [ - 'MA' - ] - }, - CurrencyIdOf: 'CurrencyId', - Amount: 'i128', - AmountOf: 'Amount', - AccountInfo: 'AccountInfoWithDualRefCount' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/mathchain.ts b/packages/apps-config/src/api/spec/mathchain.ts deleted file mode 100644 index 7b500fbe71a8..000000000000 --- a/packages/apps-config/src/api/spec/mathchain.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'MultiAddress', - LookupSource: 'MultiAddress', - Balance: 'u128', - RefCount: 'u32', - Account: { - nonce: 'U256', - balance: 'U256' - }, - AccountServiceEnum: { - _enum: { - Nickname: 'String', - Ethereum: 'H160' - } - }, - MultiAddressDetails: { - nickname: 'AccountServiceEnum', - ethereum: 'AccountServiceEnum' - }, - Nickname: 'String', - Ethereum: 'H160', - TransferAmountInfo: { - date: 'u64', - daily_info: 'Balance', - monthly_info: 'Balance', - yearly_info: 'Balance' - }, - AccountLimit: { - daily_limit: 'Balance', - monthly_limit: 'Balance', - yearly_limit: 'Balance' - }, - Keys: 'SessionKeys2' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/moonbeam.ts b/packages/apps-config/src/api/spec/moonbeam.ts deleted file mode 100644 index 23032dca175c..000000000000 --- a/packages/apps-config/src/api/spec/moonbeam.ts +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { moonbeamDefinitions } from 'moonbeam-types-bundle'; - -export default moonbeamDefinitions; diff --git a/packages/apps-config/src/api/spec/moonsama-development.ts b/packages/apps-config/src/api/spec/moonsama-development.ts deleted file mode 100644 index f6e17ba63646..000000000000 --- a/packages/apps-config/src/api/spec/moonsama-development.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Address: 'AccountId', - LookupSource: 'AccountId' - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/mybank.ts b/packages/apps-config/src/api/spec/mybank.ts deleted file mode 100644 index cf332001c9ac..000000000000 --- a/packages/apps-config/src/api/spec/mybank.ts +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Token: 'u8', - DEXShare: '(u8, u8)', - CurrencyId: { - _enum: { - Token: 'Token', - DEXShare: 'DEXShare' - } - }, - TradingPair: '(CurrencyId, CurrencyId)', - CurrencyIds: { _: 'Vec' }, - TradingPairProvisionParameters: { - min_contribution: '(Balance, Balance)', - target_provision: '(Balance, Balance)', - accumulated_provision: '(Balance, Balance)', - not_before: 'BlockNumber' - }, - TradingPairStatus: { - _enum: { - NotEnabled: null, - Provisioning: 'TradingPairProvisionParameters', - Enabled: null - } - }, - PoolId: 'CurrencyId', - Price: 'FixedU128', - OracleKey: 'u8', - OracleValue: 'FixedU128', - Amount: 'i128', - Balance: 'u128', - Ratio: 'FixedU128', - InterestInfo: { - critical_point: 'Ratio', - base: 'Ratio', - slope_1: 'Ratio', - slope_2: 'Ratio' - }, - AssetPoolInfo: { - maximum_total_debit_ratio: 'Ratio', - minimum_deposit: 'Balance', - minimum_debit: 'Balance', - health_ratio: 'Ratio', - total_deposit: 'Balance', - total_debit: 'Balance', - deposit_rate: 'Ratio', - debit_rate: 'Ratio', - deposit_apy: 'Ratio', - debit_apy: 'Ratio', - reserve_factor: 'Ratio', - interest_info: 'InterestInfo' - }, - LoanInfo: { - deposit: 'Balance', - debit: 'Balance' - }, - TimestampedValue: { - value: 'OracleValue', - timestamp: 'u64' - }, - PoolInfo: { - total_shares: 'Compact', - total_rewards: 'Compact', - total_withdrawn_rewards: 'Compact' - } - } - } - ] -}; - -export default definitions; diff --git a/packages/apps-config/src/api/spec/neatcoin.ts b/packages/apps-config/src/api/spec/neatcoin.ts deleted file mode 100644 index 0d2adf7fb4ab..000000000000 --- a/packages/apps-config/src/api/spec/neatcoin.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2017-2023 @polkadot/apps-config authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import type { OverrideBundleDefinition } from '@polkadot/types/types'; - -// structs need to be in order -/* eslint-disable sort-keys */ - -const definitions: OverrideBundleDefinition = { - types: [ - { - minmax: [0, undefined], - types: { - Label: 'Vec', - Name: 'Vec