add clover types (#4555)

* add clover types

* fix lint

* adjust for review comments
This commit is contained in:
superpw 2021-02-01 17:18:26 +08:00 committed by GitHub
parent 2240ed55b3
commit 7473eaef62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 159 additions and 0 deletions

View File

@ -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<CurrencyTypeEnum>'
},
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<String>'
]
},
ExitFatal: {
_enum: ['NotSupported', 'UnhandledInterrupt', 'CallErrorAsFatal', 'Other<String>']
},
ExitReason: {
_enum: ['Succeed<ExitSucceed>',
'Error<ExitError>',
'Revert<ExitRevert>',
'Fatal<ExitFatal>'
]
}
};
export default cloverRococoTypes;

View File

@ -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<CurrencyTypeEnum>'
},
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<String>'
]
},
ExitFatal: {
_enum: ['NotSupported', 'UnhandledInterrupt', 'CallErrorAsFatal', 'Other<String>']
},
ExitReason: {
_enum: ['Succeed<ExitSucceed>',
'Error<ExitError>',
'Revert<ExitRevert>',
'Fatal<ExitFatal>'
]
}
};
export default cloverTypes;

View File

@ -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,

View File

@ -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' }),

View File

@ -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,

View File

@ -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<string, any> = [
['Bit.Country Tewai Chain', chainBitCountry],
['Bifrost PC1', chainRoccoBifrost],
['Darwinia Crab', chainCrab],
['Clover', chainClover],
['crust maxwell', chainCrust],
['Crust PC1', chainCrust],
['ChainX', chainChainx],

View File

@ -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<string, unknown> = [
['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<string, unknown> = {
canvas: nodeCanvas,
centrifuge: nodeCentrifuge,
chainx: nodeChainx,
clover: nodeClover,
crab: nodeCrab,
crust: nodeCrust,
darwinia: nodeDarwinia,
@ -202,6 +205,7 @@ export const namedLogos: Record<string, unknown> = {
rococoAcala: nodeAcala,
rococoAres: nodeAres,
rococoBifrost: nodeBifrost,
rococoClover: nodeClover,
rococoCrust: nodeCrust,
rococoDarwinia: nodeDarwinia,
rococoDataHighway: nodeDataHighway,

View File

@ -0,0 +1 @@
<svg id="layer_1" data-name="layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 43 43"><defs><style>.cls-1{fill:#f9fff3;}.cls-2{fill:#7ccb3c;}</style></defs><title>clover</title><circle class="cls-1" cx="21.5" cy="21.5" r="21.17"/><path class="cls-2" d="M27.1,21.5a5.6,5.6,0,0,1-5.6-5.56,5.6,5.6,0,0,1-5.57,5.56,5.6,5.6,0,0,1,5.57,5.6A5.6,5.6,0,0,1,27.1,21.5Zm-5.6,6a6,6,0,1,1-6-6,6,6,0,1,1,6-6,6,6,0,1,1,6,6,6,6,0,1,1-6,6Z"/></svg>

After

Width:  |  Height:  |  Size: 440 B

View File

@ -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",

View File

@ -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",