Skip to content

Commit

Permalink
feat: Add Torus Network Chain (#11175)
Browse files Browse the repository at this point in the history
* feat: Add Torus Network Chain

* feat: Add Torus logo to production endpoints

* fix: Update copyright year in auto-generated Torus PNG file

* fix: sort torus url in `production.ts`
  • Loading branch information
EdSDR authored Jan 18, 2025
1 parent 88e1817 commit fc285cb
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/apps-config/src/api/spec/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ import substrateContractsNode from './substrateContractsNode.js';
import swapdex from './swapdex.js';
import t0rn from './t0rn.js';
import ternoa from './ternoa.js';
import torus from './torus.js';
import trustbase from './trustbase.js';
import turing from './turing.js';
import uart from './uart.js';
Expand Down Expand Up @@ -305,6 +306,7 @@ const spec: Record<string, OverrideBundleDefinition> = {
ternoa,
'testnet-interlay': interbtc,
'testnet-kintsugi': interbtc,
torus,
trustbase,
turing,
uart,
Expand Down
34 changes: 34 additions & 0 deletions packages/apps-config/src/api/spec/torus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2017-2025 @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: {
Balance: 'u128',
ValidatorFee: {
stakingFee: 'Percent',
weightControlFee: 'Percent'
},
AgentMetadata: {
key: 'AccountId32',
name: 'Vec<u8>',
url: 'Vec<u8>',
metadata: 'Vec<u8>',
weight_penalty_factor: 'Percent',
registration_block: 'u64',
fees: 'ValidatorFee'
}
}
}
]
};

export default definitions;
26 changes: 26 additions & 0 deletions packages/apps-config/src/api/typesBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98875,6 +98875,32 @@ export const typesBundle = {
}
}
},
"torus": {
"types": [
{
"minmax": [
0,
null
],
"types": {
"Balance": "u128",
"ValidatorFee": {
"stakingFee": "Percent",
"weightControlFee": "Percent"
},
"AgentMetadata": {
"key": "AccountId32",
"name": "Vec<u8>",
"url": "Vec<u8>",
"metadata": "Vec<u8>",
"weight_penalty_factor": "Percent",
"registration_block": "u64",
"fees": "ValidatorFee"
}
}
}
]
},
"trustbase": {
"types": [
{
Expand Down
13 changes: 12 additions & 1 deletion packages/apps-config/src/endpoints/production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { EndpointOption } from './types.js';

import { chains3dpassSVG, chainsAlephSVG, chainsAnalogSVG, chainsBittensorPNG, chainsChainflipPNG, chainsCommuneaiPNG, chainsCreditcoinPNG, chainsDebioSVG, chainsFragnovaPNG, chainsJurPNG, chainsLiberlandPNG, chainsLogionPNG, chainsMyriadPNG, chainsSpannerPNG, chainsTanglePNG, chainsVaraPNG, chainsVtbPNG } from '../ui/logos/chains/index.js';
import { chains3dpassSVG, chainsAlephSVG, chainsAnalogSVG, chainsBittensorPNG, chainsChainflipPNG, chainsCommuneaiPNG, chainsCreditcoinPNG, chainsDebioSVG, chainsFragnovaPNG, chainsJurPNG, chainsLiberlandPNG, chainsLogionPNG, chainsMyriadPNG, chainsSpannerPNG, chainsTanglePNG, chainsTorusPNG, chainsVaraPNG, chainsVtbPNG } from '../ui/logos/chains/index.js';
import { nodesAresOdysseySVG, nodesAutonomysPNG, nodesCentrifugePNG, nodesCereSVG, nodesChainxSVG, nodesCompetitorsClubPNG, nodesCrownSterlingPNG, nodesCrustSVG, nodesDatahighwayPNG, nodesDockPNG, nodesEdgewareWhitePNG, nodesEfinitySVG, nodesElysiumPNG, nodesHanyonycashPNG, nodesHumanodePNG, nodesInnovatorPNG, nodesJoystreamSVG, nodesKulupuSVG, nodesKusariSVG, nodesMathSVG, nodesMinixPNG, nodesNftmartPNG, nodesNodleSVG, nodesPolkadexSVG, nodesPolymeshSVG, nodesRiochainSVG, nodesRobonomicsSVG, nodesSherpaxPNG, nodesSoraSubstrateSVG, nodesStafiPNG, nodesSubgameSVG, nodesSubsocialSVG, nodesSwapdexSVG, nodesTernoaSVG, nodesThebifrostPNG, nodesUniartsPNG, nodesUnitnetworkPNG } from '../ui/logos/nodes/index.js';

export * from './productionRelayKusama.js';
Expand Down Expand Up @@ -605,6 +605,17 @@ export const prodChains: Omit<EndpointOption, 'teleport'>[] = [
logo: nodesTernoaSVG
}
},
{
info: 'torus',
providers: {
mainnet: 'wss://api.torus.network'
},
text: 'Torus',
ui: {
color: '#070A0E',
logo: chainsTorusPNG
}
},
{
info: 'uniarts',
providers: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2017-2025 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0

// Do not edit. Auto-generated via node scripts/imgConvert.mjs

export const chainsTorusPNG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABH2SURBVHgB7Z1tjFxVGcefc2fnZbvaHb75qTv9YqNJt8sHQZJSVqMEQltqDGjaoosRLVACGrQFmkATFFQSIVbQkEiRF1ET6RsRTQxraRSqSXe38e0Ts/0kfuFOoTjT2bnH8787F6czd2bOuXPf7/kl25mdubPd3fnv85znOc95HiKNRqPRaDQaTdZglDFK5XIl16QyN6hiWVQmblU4o0lO4j7hF8Iq9oWcKp2v48TLrH3NMMTXMsXXMT94gBHum+0nTc64aXBaXn3OqBoGmZZ4nMaoWjfNKmWI1AmwLGg2qdIimuFkbYKwhBhmxBsvxMMrlABsATO2ALEy4osctzljoTRGC6aAUkSiBQhrRk2ahdCIs4qwUrOyViqpfCBO4gs5w/ijlaOFJFvNRAkQguMNa4dwn0JwtCPtYlOgKt7KBcaso5TPzSdJkLEXYOlD5VnOrRuFhduRFBcaA6piXTtvMOPZ+nvmPMWYWArQEZ1Y+8xpKzcysRZjbASI4OH9i9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maFhdxkcT6T9vPKtkslNi8s3LI9zSpP80kSXDeJFqAbZUF9hWZ4y5oRa58yF8LEbbLECRcKofEFIbgahNYiWpjIUzUuwYNfpE6AwyiVhRtfoYolRGlYQpDcqthPMJrinJUhVnzKIVb+f8Fy4mVZAbet1CVCEV+32n622r6mxjiZxIyqZZAp3Gc1lyczydZMo9FoNBqNRqOR4X93pH3/AfJNnwAAAABJRU5ErkJggg==';
1 change: 1 addition & 0 deletions packages/apps-config/src/ui/logos/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export { chainsStandardPNG } from './generated/standardPNG.js';
export { chainsT0rnPNG } from './generated/t0rnPNG.js';
export { chainsTanglePNG } from './generated/tanglePNG.js';
export { chainsTinkerPNG } from './generated/tinkerPNG.js';
export { chainsTorusPNG } from './generated/torusPNG.js';
export { chainsTotemSVG } from './generated/totemSVG.js';
export { chainsTuringPNG } from './generated/turingPNG.js';
export { chainsUnorthodoxPNG } from './generated/unorthodoxPNG.js';
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fc285cb

Please sign in to comment.