diff --git a/packages/apps-config/src/api/spec/clover-rococo.ts b/packages/apps-config/src/api/spec/clover-rococo.ts new file mode 100644 index 0000000000..04418ef71d --- /dev/null +++ b/packages/apps-config/src/api/spec/clover-rococo.ts @@ -0,0 +1,64 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +// types for clover +/* eslint-disable sort-keys */ + +const cloverRococoTypes = { + 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 cloverRococoTypes; diff --git a/packages/apps-config/src/api/spec/clover.ts b/packages/apps-config/src/api/spec/clover.ts new file mode 100644 index 0000000000..31d2db10a6 --- /dev/null +++ b/packages/apps-config/src/api/spec/clover.ts @@ -0,0 +1,65 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +// types for clover +/* eslint-disable sort-keys */ + +const cloverTypes = { + Amount: 'i128', + Keys: 'SessionKeys3', + 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 cloverTypes; diff --git a/packages/apps-config/src/api/spec/index.ts b/packages/apps-config/src/api/spec/index.ts index af0490bc70..76849315db 100644 --- a/packages/apps-config/src/api/spec/index.ts +++ b/packages/apps-config/src/api/spec/index.ts @@ -7,6 +7,8 @@ import bitcountry from './bitcountry'; import canvas from './canvas'; import centrifugeChain from './centrifuge-chain'; import chainx from './chainx'; +import clover from './clover'; +import cloverRococo from './clover-rococo'; import crab from './crab'; import crust from './crust'; import crustParachain from './crust-parachain'; @@ -50,6 +52,8 @@ export default { canvas, 'centrifuge-chain': centrifugeChain, chainx: chainx, + clover, + 'clover-rococo': cloverRococo, crust, 'crust-parachain': crustParachain, 'cumulus-test-parachain': testPara, diff --git a/packages/apps-config/src/endpoints/testing.ts b/packages/apps-config/src/endpoints/testing.ts index b5f16f14a0..110abb7c72 100644 --- a/packages/apps-config/src/endpoints/testing.ts +++ b/packages/apps-config/src/endpoints/testing.ts @@ -62,6 +62,13 @@ export function createTesting (t: TFunction): LinkOption[] { Parity: 'wss://canvas-rpc.parity.io' } }, + { + info: 'clover', + text: t('rpc.clover.finance', 'Clover', { ns: 'apps-config' }), + providers: { + Clover: 'wss://api.clover.finance/' + } + }, { info: 'crust', text: t('rpc.crust.network', 'Crust Maxwell', { ns: 'apps-config' }), diff --git a/packages/apps-config/src/endpoints/testingRococo.ts b/packages/apps-config/src/endpoints/testingRococo.ts index 93cae933d8..f1d586e0f8 100644 --- a/packages/apps-config/src/endpoints/testingRococo.ts +++ b/packages/apps-config/src/endpoints/testingRococo.ts @@ -68,6 +68,14 @@ export function createRococo (t: TFunction): EndpointOption { Bifrost: 'wss://rococo-1.testnet.liebi.com' } }, + { + info: 'rococoClover', + paraId: 229, + text: t('rpc.rococo.clover', 'Clover PC1', { ns: 'apps-config' }), + providers: { + Clover: 'wss://api-rococo.clover.finance' + } + }, { info: 'rococoCrust', paraId: 7777, diff --git a/packages/apps-config/src/ui/colors.ts b/packages/apps-config/src/ui/colors.ts index 04469bcb0e..18c9319368 100644 --- a/packages/apps-config/src/ui/colors.ts +++ b/packages/apps-config/src/ui/colors.ts @@ -12,6 +12,7 @@ const emptyColor = '#99999'; const chainBitCountry = '#191a2e'; const chainCrab = '#7C30DD'; const chainCrust = '#ff8812'; +const chainClover = 'linear-gradient(to right, #52ad75, #7cc773)'; const chainChainx = '#F6C94A'; const chainDarwinia = 'linear-gradient(-45deg, #FE3876 0%, #7C30DD 71%, #3A30DD 100%)'; const chainHanonycash = '#0099CC'; @@ -73,6 +74,7 @@ export const chainColors: Record = [ ['Bit.Country Tewai Chain', chainBitCountry], ['Bifrost PC1', chainRoccoBifrost], ['Darwinia Crab', chainCrab], + ['Clover', chainClover], ['crust maxwell', chainCrust], ['Crust PC1', chainCrust], ['ChainX', chainChainx], diff --git a/packages/apps-config/src/ui/logos/index.ts b/packages/apps-config/src/ui/logos/index.ts index 75fe8b4572..4e8f6350d3 100644 --- a/packages/apps-config/src/ui/logos/index.ts +++ b/packages/apps-config/src/ui/logos/index.ts @@ -27,6 +27,7 @@ import nodeBitCountry from './nodes/bitcountry.svg'; import nodeCanvas from './nodes/canvas-2.png'; import nodeCentrifuge from './nodes/centrifuge.png'; import nodeChainx from './nodes/chainx.svg'; +import nodeClover from './nodes/clover.svg'; import nodeCrab from './nodes/crab.svg'; import nodeCrust from './nodes/crust.svg'; import nodeDarwinia from './nodes/darwinia.png'; @@ -113,6 +114,7 @@ export const nodeLogos: Record = [ ['centrifuge chain', nodeCentrifuge], ['Centrifuge Chain Node', nodeCentrifuge], ['ChainX Node', nodeChainx], + ['Clover Node', nodeClover], ['darwinia crab', nodeCrab], ['crust', nodeCrust], ['Crust Collator', nodeCrust], @@ -172,6 +174,7 @@ export const namedLogos: Record = { canvas: nodeCanvas, centrifuge: nodeCentrifuge, chainx: nodeChainx, + clover: nodeClover, crab: nodeCrab, crust: nodeCrust, darwinia: nodeDarwinia, @@ -202,6 +205,7 @@ export const namedLogos: Record = { rococoAcala: nodeAcala, rococoAres: nodeAres, rococoBifrost: nodeBifrost, + rococoClover: nodeClover, rococoCrust: nodeCrust, rococoDarwinia: nodeDarwinia, rococoDataHighway: nodeDataHighway, diff --git a/packages/apps-config/src/ui/logos/nodes/clover.svg b/packages/apps-config/src/ui/logos/nodes/clover.svg new file mode 100644 index 0000000000..1939215d17 --- /dev/null +++ b/packages/apps-config/src/ui/logos/nodes/clover.svg @@ -0,0 +1 @@ + clover \ No newline at end of file diff --git a/packages/apps/public/locales/en/apps-config.json b/packages/apps/public/locales/en/apps-config.json index 09f7108f0a..559bcb9af0 100644 --- a/packages/apps/public/locales/en/apps-config.json +++ b/packages/apps/public/locales/en/apps-config.json @@ -9,6 +9,7 @@ "rpc.canvas": "Canvas", "rpc.centrifuge": "Centrifuge", "rpc.chainx": "ChainX", + "rpc.clover.finance": "Clover", "rpc.crab": "Darwinia Crab", "rpc.crust.network": "Crust Maxwell", "rpc.custom": "Custom environment", @@ -57,6 +58,7 @@ "rpc.rococo.acala": "Mandala PC2", "rpc.rococo.ares": "Ares PC1", "rpc.rococo.bifrost": "Bifrost PC1", + "rpc.rococo.clover": "Clover PC1", "rpc.rococo.crust": "Crust PC1", "rpc.rococo.darwinia": "Darwinia PC2", "rpc.rococo.datahighway": "DataHighway", diff --git a/packages/apps/public/locales/fr/translation.json b/packages/apps/public/locales/fr/translation.json index 428f223381..7dba4230f2 100644 --- a/packages/apps/public/locales/fr/translation.json +++ b/packages/apps/public/locales/fr/translation.json @@ -1294,6 +1294,7 @@ "rpc.canvas": "Canvas", "rpc.centrifuge": "Centrifuge", "rpc.chainx": "ChainX", + "rpc.clover.finance": "Clover", "rpc.crab": "Darwinia Crab", "rpc.crust.network": "Crust Maxwell", "rpc.custom": "Environment personnalisé", @@ -1326,6 +1327,7 @@ "rpc.polkadot.w3f": "Polkadot", "rpc.rococo": "Rococo", "rpc.rococo.acala": "Mandala PC1", + "rpc.rococo.clover": "Clover PC1", "rpc.rococo.crust": "Crust PC1", "rpc.rococo.darwinia": "Darwinia PC1", "rpc.rococo.laminar": "Turbulence PC1",