From b939eed4f260600bdbb6ee0b6718810e4b02d4f7 Mon Sep 17 00:00:00 2001 From: alecdwm Date: Sun, 1 Oct 2023 16:25:03 +0000 Subject: [PATCH] added Chain.feeToken field --- chaindata.json | 4 ++++ schemas/json/chaindata.json | 1 + scripts/build/steps/addChains.ts | 4 +++- scripts/build/types.ts | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/chaindata.json b/chaindata.json index 6cde1735cc..f462103f0e 100644 --- a/chaindata.json +++ b/chaindata.json @@ -1281,6 +1281,7 @@ "account": "*25519", "subscanUrl": "https://equilibrium.subscan.io/", "overrideNativeTokenId": "equilibrium-polkadot-substrate-equilibrium-eq", + "feeToken": "equilibrium-polkadot-substrate-equilibrium-eq", "rpcs": ["wss://equilibrium-rpc.dwellir.com", "wss://node.pol.equilibrium.io/"], "paraId": 2011, "relay": { @@ -1647,6 +1648,7 @@ "chainspecQrUrl": "https://metadata.novasama.io/qr/interlay-parachain_specs.png", "latestMetadataQrUrl": "https://metadata.novasama.io/qr/interlay-parachain_metadata_latest.apng", "overrideNativeTokenId": "interlay-substrate-tokens-intr", + "feeToken": "interlay-substrate-tokens-intr", "rpcs": [ "wss://interlay.api.onfinality.io/public-ws", "wss://interlay-rpc.dwellir.com", @@ -2266,6 +2268,7 @@ "chainspecQrUrl": "https://metadata.novasama.io/qr/kintsugi-parachain_specs.png", "latestMetadataQrUrl": "https://metadata.novasama.io/qr/kintsugi-parachain_metadata_latest.apng", "overrideNativeTokenId": "kintsugi-substrate-tokens-kint", + "feeToken": "kintsugi-substrate-tokens-kint", "rpcs": ["wss://kintsugi.api.onfinality.io/public-ws", "wss://api-kusama.interlay.io/parachain"], "paraId": 2092, "relay": { @@ -2558,6 +2561,7 @@ "chainspecQrUrl": "https://metadata.novasama.io/qr/mangata-parachain_specs.png", "latestMetadataQrUrl": "https://metadata.novasama.io/qr/mangata-parachain_metadata_latest.apng", "overrideNativeTokenId": "mangata-substrate-tokens-mgx", + "feeToken": "mangata-substrate-tokens-mgx", "rpcs": ["wss://kusama-archive.mangata.online", "wss://kusama-rpc.mangata.online"], "paraId": 2110, "relay": { diff --git a/schemas/json/chaindata.json b/schemas/json/chaindata.json index bccb907392..dcce295d3d 100644 --- a/schemas/json/chaindata.json +++ b/schemas/json/chaindata.json @@ -18,6 +18,7 @@ "chainspecQrUrl": { "type": "string" }, "latestMetadataQrUrl": { "type": "string" }, "overrideNativeTokenId": { "type": "string" }, + "feeToken": { "type": "string" }, "isUnknownFeeToken": { "type": "boolean" }, "rpcs": { "type": "array", diff --git a/scripts/build/steps/addChains.ts b/scripts/build/steps/addChains.ts index a249f5e6a6..e37a350fb9 100644 --- a/scripts/build/steps/addChains.ts +++ b/scripts/build/steps/addChains.ts @@ -3,7 +3,8 @@ import { SubstrateRpc, Chain as UpstreamChain, githubChainLogoUrl } from '@talis import { sharedData } from './_sharedData' // TODO: Switch to the updated type in `@talismn/chaindata` -type Chain = Omit & { +type Chain = Omit & { + feeToken: string | null rpcs: Array> | null balancesConfig: Array<{ moduleType: string; moduleConfig: unknown }> @@ -43,6 +44,7 @@ export const addChains = async () => { chainspecQrUrl: configChain.chainspecQrUrl ?? null, latestMetadataQrUrl: configChain.latestMetadataQrUrl ?? null, isUnknownFeeToken: configChain.isUnknownFeeToken || false, + feeToken: configChain.feeToken || null, rpcs: (configChain.rpcs || []).map((url) => ({ url })), evmNetworks: [], diff --git a/scripts/build/types.ts b/scripts/build/types.ts index fc288eea72..0b543f9262 100644 --- a/scripts/build/types.ts +++ b/scripts/build/types.ts @@ -13,6 +13,7 @@ export type ConfigChain = { latestMetadataQrUrl?: string overrideNativeTokenId?: string isUnknownFeeToken?: boolean + feeToken?: string rpcs?: string[] paraId?: number relay?: { id: string }