Skip to content

Commit

Permalink
final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Nov 16, 2023
1 parent b5d77c7 commit f122c8c
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 60 deletions.
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import { json } from 'express';

import packageJSON from '../package.json';
import App from './App';
import tempTypesBundle from './overrideTypes/typesBundle';
import { getControllersForSpec } from './chains-config';
import { consoleOverride } from './logging/consoleOverride';
import { Log } from './logging/Log';
import * as middleware from './middleware';
import tempTypesBundle from './override-types/typesBundle';
import { parseArgs } from './parseArgs';
import { SidecarConfig } from './SidecarConfig';
import Metrics_App from './util/metrics';
Expand All @@ -51,8 +51,8 @@ async function main() {
: new WsProvider(config.SUBSTRATE.URL),
/* eslint-disable @typescript-eslint/no-var-requires */
typesBundle: TYPES_BUNDLE
? (tempTypesBundle as OverrideBundleType)
: undefined,
? (require(TYPES_BUNDLE) as OverrideBundleType)
: (tempTypesBundle as OverrideBundleType),
typesChain: TYPES_CHAIN
? (require(TYPES_CHAIN) as Record<string, RegistryTypes>)
: undefined,
Expand Down
59 changes: 59 additions & 0 deletions src/override-types/typesBundle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { OverrideBundleDefinition } from '@polkadot/types/types';

const definitionsWestmint: OverrideBundleDefinition = {
types: [
{
minmax: [0, 9434],
types: {
TempAssetId: 'Option<AssetId>',
},
},
{
minmax: [9435, undefined],
types: {
TempAssetId: 'Option<MultiLocation>',
},
},
],
signedExtensions: {
ChargeAssetTxPayment: {
extrinsic: {
tip: 'Compact<Balance>',
// eslint-disable-next-line sort-keys
assetId: 'TempAssetId',
},
payload: {},
},
},
};

const definitionsStatemine: OverrideBundleDefinition = {
types: [
{
minmax: [0, 9999],
types: {
TempAssetId: 'Option<AssetId>',
},
},
{
minmax: [10000, undefined],
types: {
TempAssetId: 'Option<MultiLocation>',
},
},
],
signedExtensions: {
ChargeAssetTxPayment: {
extrinsic: {
tip: 'Compact<Balance>',
// eslint-disable-next-line sort-keys
assetId: 'TempAssetId',
},
payload: {},
},
},
};

export default {
spec: { statemine: definitionsStatemine, westmint: definitionsWestmint },
};
57 changes: 0 additions & 57 deletions src/overrideTypes/typesBundle.ts

This file was deleted.

0 comments on commit f122c8c

Please sign in to comment.