diff --git a/packages/apps-config/src/api/spec/index.ts b/packages/apps-config/src/api/spec/index.ts index a97fbc9974..80a5aa8f6b 100644 --- a/packages/apps-config/src/api/spec/index.ts +++ b/packages/apps-config/src/api/spec/index.ts @@ -107,6 +107,7 @@ 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'; @@ -257,6 +258,7 @@ const spec: Record = { 'substrate-contracts-node': substrateContractsNode, subzero: zero, swapdex, + t0rn, ternoa, trustbase, turing, diff --git a/packages/apps-config/src/api/spec/t0rn.ts b/packages/apps-config/src/api/spec/t0rn.ts new file mode 100644 index 0000000000..18e9514fa5 --- /dev/null +++ b/packages/apps-config/src/api/spec/t0rn.ts @@ -0,0 +1,203 @@ +// Copyright 2017-2022 @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: { + GatewayVendor: { _enum: ['Substrate', 'Ethereum'] }, + GatewayType: { + _enum: { + ProgrammableInternal: 'u32', + ProgrammableExternal: 'u32', + TxOnly: 'u32' + } + }, + GatewayGenesisConfig: { + modules_encoded: 'Option', + extrinsics_version: 'u8', + genesis_hash: 'Bytes' + }, + GatewaySysProps: { ss58_format: 'u16', token_symbol: 'Bytes', token_decimals: 'u8' }, + AllowedSideEffect: '[u8; 4]', + BlockNumber: 'u64', + Compose: { + name: 'Vec', + code_txt: 'Vec', + exec_type: 'Vec', + dest: 'AccountId', + value: 'Balance', + bytes: 'Vec', + input_data: 'Vec' + }, + CircuitOutboundMessage: { + name: 'Bytes', + module_name: 'Bytes', + method_name: 'Bytes', + sender: 'Option', + target: 'Option', + arguments: 'Vec', + expected_output: 'Vec', + extra_payload: 'Option' + }, + GatewayExpectedOutput: { + _enum: { + Storage: null, + Events: null, + Extrinsic: null, + Output: null + } + }, + ProofTriePointer: { _enum: { State: 0, Transaction: 1, Receipts: 2 } }, + GatewayPointer: { + id: 'ChainId', + vendor: 'GatewayVendor', + gateway_type: 'GatewayType' + }, + ExtraMessagePayload: { + signer: 'Bytes', + module_name: 'Bytes', + method_name: 'Bytes', + call_bytes: 'Bytes', + signature: 'Bytes', + extra: 'Bytes', + tx_signed: 'Bytes', + custom_payload: 'Option' + }, + ContractActionDesc: { + action_id: 'Hash', + target_id: 'Option', + to: 'Option' + }, + TargetId: '[u8; 4]', + SideEffect: { + target: 'TargetId', + prize: 'BalanceOf', + ordered_at: 'BlockNumber', + encoded_action: 'Bytes', + encoded_args: 'Vec', + signature: 'Bytes', + enforce_executioner: 'Option' + }, + SideEffectId: 'Hash', + ConfirmedSideEffect: { + err: 'Option', + output: 'Option', + encoded_effect: 'Bytes', + inclusion_proof: 'Option', + executioner: 'AccountId', + received_at: 'BlockNumber', + cost: 'Option' + }, + FullSideEffect: { input: 'SideEffect', confirmed: 'Option' }, + XtxId: 'Hash', + XdnsRecordId: 'Hash', + XdnsRecord: { + url: 'Vec', + gateway_abi: 'GatewayABIConfig', + gateway_genesis: 'GatewayGenesisConfig', + gateway_vendor: 'GatewayVendor', + gateway_type: 'GatewayType', + gateway_id: 'ChainId', + gateway_sys_props: 'GatewaySysProps', + registrant: 'Option', + last_finalized: 'Option' + }, + FetchXdnsRecordsResponse: { xdns_records: 'Vec>' }, + ChainId: '[u8; 4]', + RegistryContractId: 'Hash', + RegistryContract: { + code_txt: 'Vec', + bytes: 'Vec', + author: 'AccountId', + author_fees_per_single_use: 'Option', + abi: 'Option>', + action_descriptions: 'Vec>', + info: 'Option>', + meta: 'ContractMetadata' + }, + RawAliveContractInfo: { + trie_id: 'TrieId', + storage_size: 'u32', + pair_count: 'u32', + code_hash: 'CodeHash', + rent_allowance: 'Balance', + rent_paid: 'Balance', + deduct_block: 'BlockNumber', + last_write: 'Option', + _reserved: 'Option<()>' + }, + Address: 'MultiAddress', + LookupSource: 'MultiAddress', + DispatchMessageId: { channelId: 'ChannelId', nonce: 'u64' }, + ChannelId: { _enum: ['Basic', 'Incentivized'] }, + MessageNonce: 'u64', + Message: { data: 'Vec', proof: 'Proof' }, + Proof: { + blockHash: 'H256', + txIndex: 'u32', + data: '(Vec>, Vec>)' + }, + EthereumHeaderId: { number: 'u64', hash: 'H256' }, + EthereumHeader: { + parentHash: 'H256', + timestamp: 'u64', + number: 'u64', + author: 'H160', + transactionsRoot: 'H256', + ommersHash: 'H256', + extraData: 'Vec', + stateRoot: 'H256', + receiptsRoot: 'H256', + logBloom: 'Bloom', + gasUsed: 'U256', + gasLimit: 'U256', + difficulty: 'U256', + seal: 'Vec>', + baseFee: 'Option' + }, + StoredHeader: { + submitter: 'Option', + header: 'EthereumHeader', + totalDifficulty: 'U256', + finalized: 'bool' + }, + EthashProofData: { dagNodes: '[H512; 2]', proof: 'Vec' }, + Bloom: '[u8; 256]', + PruningRange: { oldestUnprunedBlock: 'u64', oldestBlockToKeep: 'u64' }, + EthereumDifficultyConfig: { + byzantiumForkBlock: 'u64', + constantinopleForkBlock: 'u64', + muirGlacierForkBlock: 'u64', + londonForkBlock: 'u64' + }, + AssetId: { _enum: { ETH: null, Token: 'H160' } }, + TokenId: 'u128', + TokenData: { tokenContract: 'H160', tokenId: 'U256' }, + TokenInfoOf: { owner: 'AccountId', metadata: 'Vec', data: 'TokenData' }, + GatewayABIConfig: { + block_number_type_size: 'u16', + hash_size: 'u16', + hasher: 'HasherAlgo', + crypto: 'CryptoAlgo', + address_length: 'u16', + value_type_size: 'u16', + decimals: 'u16', + structs: 'Vec' + }, + HasherAlgo: { _enum: ['Blake2', 'Keccak256'] }, + CryptoAlgo: { _enum: ['Ed25519', 'Sr25519', 'Ecdsa'] }, + StructDecl: { name: 'Type', fields: 'Vec', offsets: 'Vec' }, + Parachain: { relay_chain_id: 'ChainId', id: 'u32' } + } + } + ] +}; + +export default definitions; diff --git a/packages/apps-config/src/endpoints/testingRelayRococo.ts b/packages/apps-config/src/endpoints/testingRelayRococo.ts index 8840c07142..1ac4d5980f 100644 --- a/packages/apps-config/src/endpoints/testingRelayRococo.ts +++ b/packages/apps-config/src/endpoints/testingRelayRococo.ts @@ -189,6 +189,14 @@ export function createRococo (t: TFunction): EndpointOption { DataHighway: 'wss://spreehafen.datahighway.com' } }, + { + info: 't0rn', + paraId: 3333, + text: t('rpc.rococo.t3rn', 't0rn', { ns: 'apps-config' }), + providers: { + t3rn: 'wss://dev.net.t3rn.io' + } + }, { info: 'rococoZeitgeist', isDisabled: true, // See https://github.com/polkadot-js/apps/issues/5842 diff --git a/packages/apps-config/src/ui/colors.ts b/packages/apps-config/src/ui/colors.ts index 84142e91e0..44f2d331d5 100644 --- a/packages/apps-config/src/ui/colors.ts +++ b/packages/apps-config/src/ui/colors.ts @@ -134,6 +134,7 @@ const chainUnique = '#40BCFF'; const chainIdavoll = '#ff43ff'; const chainSubDAO = 'linear-gradient(50deg, #F20092 0%, #FF4D5D 100%)'; const chainSwapdex = '#E94082'; +const chainT0rn = '#212322'; const chainTinker = '#161616'; const chainTrustBase = '#ff43aa'; const chainTuring = '#A8278C'; @@ -410,6 +411,7 @@ export const chainColors: Record = Object.entries({ 'SubGame Staging': nodeSubGame, Subspace: nodeSubspace, swapdex: chainSwapdex, + t0rn: chainT0rn, Tick: chainRoccoTick, Track: chainRoccoTrack, Trick: chainRoccoTrick, @@ -451,6 +453,7 @@ export const nodeColors = Object.entries({ centrifuge: nodeCentrifuge, 'centrifuge chain': nodeCentrifuge, 'Centrifuge Chain Node': nodeCentrifuge, + 'Circuit Collator': chainT0rn, Coinversation: nodeCoinversation, 'Competitors Club': nodeCompetitorsClub, 'Crown Sterling': nodeCrownSterling, diff --git a/packages/apps-config/src/ui/logos/chains/t0rn.png b/packages/apps-config/src/ui/logos/chains/t0rn.png new file mode 100644 index 0000000000..6c28785247 Binary files /dev/null and b/packages/apps-config/src/ui/logos/chains/t0rn.png differ diff --git a/packages/apps-config/src/ui/logos/index.ts b/packages/apps-config/src/ui/logos/index.ts index 9254a493a5..d0fcbbb788 100644 --- a/packages/apps-config/src/ui/logos/index.ts +++ b/packages/apps-config/src/ui/logos/index.ts @@ -49,6 +49,7 @@ import chainShiden from './chains/shiden.png'; import chainSnakenet from './chains/snakenet.svg'; import chainSpanner from './chains/spanner.png'; import chainStandard from './chains/standard.png'; +import chainT0rn from './chains/t0rn.png'; import chainKusamaDataHighway from './chains/tanganika.png'; import chainTinker from './chains/tinker.png'; import nodeTotem from './chains/totem.svg'; @@ -362,6 +363,7 @@ export const chainLogos = Object.entries({ subsocialX: nodeSubsocialX, subspace: nodeSubspace, swapdex: nodeSwapdex, + t0rn: chainT0rn, Tick: chainRococoTick, Track: chainRococoTrack, Trick: chainRococoTrick, @@ -543,6 +545,7 @@ export const nodeLogos = Object.entries({ 'substrate-node': nodeSubstrate, 'subzero node': nodeZero, swapdex: nodeSwapdex, + t0rn: chainT0rn, 'Ternoa Node': nodeTernoa, 'Totem Parachain Collator': nodeTotem, 'TrustBase Collator': nodeTrustBase, @@ -797,6 +800,7 @@ export const namedLogos: Record = { substrate: nodeSubstrate, substrateContractsNode: nodeSubstrateContractsNode, swapdex: nodeSwapdex, + t0rn: chainT0rn, tanganika: chainKusamaDataHighway, 'ternoa-testnet': nodeTernoa, 'totem-parachain': nodeTotem, diff --git a/packages/apps/public/locales/en/apps-config.json b/packages/apps/public/locales/en/apps-config.json index 49e4c47c46..f458b65e0a 100644 --- a/packages/apps/public/locales/en/apps-config.json +++ b/packages/apps/public/locales/en/apps-config.json @@ -144,6 +144,7 @@ "rpc.rococo.spreehafen": "Spreehafen", "rpc.rococo.statemint": "Statemint", "rpc.rococo.subsocial": "SoonsocialX", + "rpc.rococo.t3rn": "t0rn", "rpc.rococo.tinker": "InvArch Tinkernet", "rpc.rococo.zeitgeist": "Zeitgeist PC", "rpc.spanner": "Spanner",