Added ChainX logos & endpoints (#4544)

* Added ChainX logos & endpoints

* lint fix

* add types
This commit is contained in:
qinghuan 2021-01-30 17:58:03 +08:00 committed by GitHub
parent 0644d84575
commit c53a36d4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 481 additions and 0 deletions

View File

@ -0,0 +1,450 @@
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
// structs need to be in order
/* eslint-disable sort-keys */
export default {
Address: 'AccountId',
LookupSource: 'AccountId',
Chain: {
_enum: [
'ChainX',
'Bitcoin',
'Ethereum',
'Polkadot'
]
},
NetworkType: {
_enum: [
'Mainnet',
'Testnet'
]
},
AssetType: {
_enum: [
'Usable',
'Locked',
'Reserved',
'ReservedWithdrawal',
'ReservedDexSpot'
]
},
OrderType: {
_enum: [
'Limit',
'Market'
]
},
Side: {
_enum: [
'Buy',
'Sell'
]
},
LockedType: {
_enum: [
'Bonded',
'BondedWithdrawal'
]
},
Memo: 'Text',
AssetInfo: {
token: 'String',
tokenName: 'String',
chain: 'Chain',
decimals: 'Decimals',
desc: 'String'
},
TradingPairProfile: {
id: 'TradingPairId',
currencyPair: 'CurrencyPair',
pipDecimals: 'u32',
tickDecimals: 'u32',
tradable: 'bool'
},
Order: {
props: 'OrderProperty',
status: 'OrderStatus',
remaining: 'Balance',
executedIndices: 'Vec<TradingHistoryIndex>',
alreadyFilled: 'Balance',
lastUpdateAt: 'BlockNumber'
},
TradingPairInfo: {
latestPrice: 'Price',
lastUpdated: 'BlockNumber'
},
OrderExecutedInfo: {
tradingHistoryIdx: 'TradingHistoryIndex',
pairId: 'TradingPairId',
price: 'Price',
maker: 'AccountId',
taker: 'AccountId',
makerOrderId: 'OrderId',
takerOrderId: 'OrderId',
turnover: 'Balance',
executedAt: 'BlockNumber'
},
BtcHeaderInfo: {
header: 'BtcHeader',
height: 'u32'
},
BtcParams: {
maxBits: 'u32',
blockMaxFuture: 'u32',
targetTimespanSeconds: 'u32',
targetSpacingSeconds: 'u32',
retargetingFactor: 'u32',
retargetingInterval: 'u32',
minTimespan: 'u32',
maxTimespan: 'u32'
},
MiningAssetInfo: {
assetId: 'AssetId',
miningPower: 'FixedAssetPower',
rewardPot: 'AccountId',
rewardPotBalance: 'RpcBalance',
lastTotalMiningWeight: 'RpcMiningWeight',
lastTotalMiningWeightUpdate: 'BlockNumber'
},
MiningDividendInfo: {
own: 'Balance',
other: 'Balance',
insufficientStake: 'Balance'
},
AssetLedger: {
lastTotalMiningWeight: 'MiningWeight',
lastTotalMiningWeightUpdate: 'BlockNumber'
},
MinerLedger: {
lastMiningWeight: 'MiningWeight',
lastMiningWeightUpdate: 'BlockNumber',
lastClaim: 'Option<BlockNumber>'
},
ClaimRestriction: {
stakingRequirement: 'StakingRequirement',
frequencyLimit: 'BlockNumber'
},
NominatorInfo: {
lastRebond: 'Option<BlockNumber>'
},
BondRequirement: {
selfBonded: 'Balance',
total: 'Balance'
},
Unbonded: {
value: 'Balance',
lockedUntil: 'BlockNumber'
},
ValidatorLedger: {
totalNomination: 'Balance',
lastTotalVoteWeight: 'VoteWeight',
lastTotalVoteWeightUpdate: 'BlockNumber'
},
NominatorLedger: {
nomination: 'Balance',
lastVoteWeight: 'VoteWeight',
lastVoteWeightUpdate: 'BlockNumber',
unbondedChunks: 'Vec<Unbonded>'
},
ValidatorProfile: {
registeredAt: 'BlockNumber',
isChilled: 'bool',
lastChilled: 'Option<BlockNumber>',
referralId: 'ReferralId'
},
GlobalDistribution: {
treasury: 'u32',
mining: 'u32'
},
MiningDistribution: {
asset: 'u32',
staking: 'u32'
},
InclusionFee: {
baseFee: 'Balance',
lenFee: 'Balance',
adjustedWeightFee: 'Balance'
},
FeeDetails: {
inclusionFee: 'Option<InclusionFee<Balance>>',
extraFee: 'Balance',
tip: 'Balance',
finalFee: 'Balance'
},
UnbondedIndex: 'u32',
Token: 'Text',
Desc: 'Text',
AddrStr: 'Text',
HandicapInfo: 'Handicap',
Price: 'u128',
OrderId: 'u64',
TradingPairId: 'u32',
TradingHistoryIndex: 'u64',
PriceFluctuation: 'u32',
BtcAddress: 'Text',
FixedAssetPower: 'u32',
StakingRequirement: 'u32',
Decimals: 'u8',
CurrencyPair: {
base: 'AssetId',
quote: 'AssetId'
},
OrderStatus: {
_enum: [
'Created',
'PartialFill',
'Filled',
'PartialFillAndCanceled',
'Canceled'
]
},
AssetId: 'u32',
MiningWeight: 'u128',
VoteWeight: 'u128',
ReferralId: 'Text',
AssetRestriction: {
_enum: [
'Move',
'Transfer',
'Deposit',
'Withdraw',
'DestroyWithdrawal',
'DestroyFree'
]
},
AssetRestrictions: {
bits: 'u32'
},
BtcHeader: 'Vec<u8>',
BtcNetwork: {
_enum: [
'Mainnet',
'Testnet'
]
},
OrderInfo: 'Order',
Amount: 'i128',
AmountOf: 'Amount',
CurrencyIdOf: 'AssetId',
CurrencyId: 'AssetId',
Handicap: {
highestBid: 'Price',
lowestAsk: 'Price'
},
OrderProperty: {
id: 'OrderId',
side: 'Side',
price: 'Price',
amount: 'Amount',
pairId: 'TradingPairId',
submitter: 'AccountId',
orderType: 'OrderType',
createdAt: 'BlockNumber'
},
TotalAssetInfo: {
info: 'AssetInfo',
balance: 'BTreeMap<AssetType, Balance>',
isOnline: 'bool',
restrictions: 'AssetRestrictions'
},
WithdrawalRecordId: 'u32',
WithdrawalState: {
_enum: [
'Applying',
'Processing',
'NormalFinish',
'RootFinish',
'NormalCancel',
'RootCancel'
]
},
WithdrawalRecord: {
assetId: 'AssetId',
applicant: 'AccountId',
balance: 'Balance',
addr: 'AddrStr',
ext: 'Memo',
height: 'BlockNumber'
},
WithdrawalLimit: {
minimalWithdrawal: 'Balance',
fee: 'Balance'
},
TrusteeInfoConfig: {
minTrusteeCount: 'u32',
maxTrusteeCount: 'u32'
},
GenericTrusteeIntentionProps: {
about: 'Text',
hotEntity: 'Vec<u8>',
coldEntity: 'Vec<u8>'
},
GenericTrusteeSessionInfo: {
trusteeList: 'Vec<AccountId>',
threshold: 'u16',
hotAddress: 'Vec<u8>',
coldAddress: 'Vec<u8>'
},
ChainAddress: 'Vec<u8>',
BtcTrusteeType: 'Vec<u8>',
BtcTrusteeAddrInfo: {
addr: 'BtcAddress',
redeemScript: 'Vec<u8>'
},
BtcTrusteeIntentionProps: {
about: 'Text',
hotEntity: 'BtcTrusteeType',
coldEntity: 'BtcTrusteeType'
},
BtcTrusteeSessionInfo: {
trusteeList: 'Vec<AccountId>',
threshold: 'u16',
hotAddress: 'BtcTrusteeAddrInfo',
coldAddress: 'BtcTrusteeAddrInfo'
},
BtcTransaction: 'Vec<u8>',
BtcPartialMerkleTree: 'Vec<u8>',
BtcRelayedTxInfo: {
blockHash: 'H256',
merkleProof: 'BtcPartialMerkleTree'
},
BtcHeaderIndex: {
hash: 'H256',
height: 'u32'
},
BtcTxResult: {
_enum: [
'Success',
'Failure'
]
},
BtcTxState: {
txType: 'BtcTxType',
result: 'BtcTxResult'
},
BtcTxType: {
_enum: [
'Withdrawal',
'Deposit',
'HotAndCold',
'TrusteeTransition',
'Irrelevance'
]
},
BtcDepositCache: {
txid: 'H256',
balance: 'u64'
},
BtcVoteResult: {
_enum: [
'Unfinish',
'Finish'
]
},
BtcWithdrawalProposal: {
sigState: 'BtcVoteResult',
withdrawalIdList: 'Vec<u32>',
tx: 'BtcTransaction',
trusteeList: 'Vec<(AccountId, bool)>'
},
BtcTxVerifier: {
_enum: [
'Recover',
'RuntimeInterface'
]
},
RpcTotalAssetInfo: {
info: 'AssetInfo',
balance: 'BTreeMap<AssetType, RpcBalance>',
isOnline: 'bool',
restrictions: 'AssetRestrictions'
},
RpcOrder: {
id: 'OrderId',
side: 'Side',
price: 'RpcPrice',
amount: 'RpcBalance',
pairId: 'TradingPairId',
submitter: 'AccountId',
orderType: 'OrderType',
createdAt: 'BlockNumber',
status: 'OrderStatus',
remaining: 'RpcBalance',
executedIndices: 'Vec<TradingHistoryIndex>',
alreadyFilled: 'RpcBalance',
reservedBalance: 'RpcBalance',
lastUpdateAt: 'BlockNumber'
},
RpcWithdrawalRecord: {
assetId: 'AssetId',
applicant: 'AccountId',
balance: 'RpcBalance',
addr: 'String',
ext: 'String',
height: 'BlockNumber',
state: 'WithdrawalState'
},
RpcMiningDividendInfo: {
own: 'RpcBalance',
other: 'RpcBalance',
insufficientStake: 'RpcBalance'
},
RpcInclusionFee: {
baseFee: 'RpcBalance',
lenFee: 'RpcBalance',
adjustedWeightFee: 'RpcBalance'
},
RpcFeeDetails: {
inclusionFee: 'Option<RpcInclusionFee>',
tip: 'RpcBalance',
extraFee: 'RpcBalance',
finalFee: 'RpcBalance'
},
ValidatorInfo: {
account: 'AccountId',
registeredAt: 'BlockNumber',
isChilled: 'bool',
lastChilled: 'Option<BlockNumber>',
totalNomination: 'RpcBalance',
lastTotalVoteWeight: 'RpcVoteWeight',
lastTotalVoteWeightUpdate: 'BlockNumber',
isValidating: 'bool',
selfBonded: 'RpcBalance',
referralId: 'String',
rewardPotAccount: 'AccountId',
rewardPotBalance: 'RpcBalance'
},
FullPairInfo: {
baseCurrency: 'AssetId',
highestBid: 'RpcPrice',
id: 'TradingPairId',
latestPrice: 'RpcPrice',
latestPriceUpdatedAt: 'BlockNumber',
lowestAsk: 'RpcPrice',
maxValidBid: 'RpcPrice',
minValidAsk: 'RpcPrice',
pipDecimals: 'u32',
quoteCurrency: 'AssetId',
tickDecimals: 'u32',
tradable: 'bool'
},
Depth: {
asks: 'Vec<(RpcPrice, RpcBalance)>',
bids: 'Vec<(RpcPrice, RpcBalance)>'
},
Page: {
pageIndex: 'u32',
pageSize: 'u32',
data: 'Vec<RpcOrder>'
},
String: 'Text',
Balance: 'u128',
RpcPrice: 'String',
RpcBalance: 'String',
RpcMiningWeight: 'String',
RpcVoteWeight: 'String',
FullIdentification: 'ValidatorId',
WithdrawalRecordOf: 'WithdrawalRecord'
};

View File

@ -5,6 +5,7 @@ import bifrost from './bifrost';
import bitcountry from './bitcountry';
import canvas from './canvas';
import centrifugeChain from './centrifuge-chain';
import chainx from './chainx';
import crab from './crab';
import crust from './crust';
import crustParachain from './crust-parachain';
@ -46,6 +47,7 @@ export default {
'bitcountry-node': bitcountry,
canvas,
'centrifuge-chain': centrifugeChain,
chainx: chainx,
crust,
'crust-parachain': crustParachain,
'cumulus-test-parachain': testPara,

View File

@ -53,6 +53,13 @@ export function createProduction (t: TFunction): LinkOption[] {
'Darwinia Network': 'wss://crab.darwinia.network'
}
},
{
info: 'chainx',
text: t('rpc.chainx', 'ChainX', { ns: 'apps-config' }),
providers: {
ChainX: 'wss://mainnet.chainx.org/ws'
}
},
{
info: 'darwinia',
text: t('rpc.darwinia', 'Darwinia', { ns: 'apps-config' }),

View File

@ -12,6 +12,7 @@ const emptyColor = '#99999';
const chainBitCountry = '#191a2e';
const chainCrab = '#7C30DD';
const chainCrust = '#ff8812';
const chainChainx = '#F6C94A';
const chainDarwinia = 'linear-gradient(-45deg, #FE3876 0%, #7C30DD 71%, #3A30DD 100%)';
const chainHanonycash = '#0099CC';
const chainHydrate = '#000000';
@ -72,6 +73,7 @@ export const chainColors: Record<string, any> = [
['Darwinia Crab', chainCrab],
['crust maxwell', chainCrust],
['Crust PC1', chainCrust],
['ChainX', chainChainx],
['darwinia cc1', chainDarwinia],
['Darwinia PC2', chainRoccoDarwinia],
['DataHighway', chainRoccoDataHighway],

View File

@ -25,6 +25,7 @@ import nodeBifrost from './nodes/bifrost.svg';
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 nodeCrab from './nodes/crab.svg';
import nodeCrust from './nodes/crust.svg';
import nodeDarwinia from './nodes/darwinia.png';
@ -65,6 +66,7 @@ import emptyLogo from './empty.svg';
// NOTE: This is as retrieved via system.chain RPC
export const chainLogos: Record<string, unknown> = [
['Crust PC1', nodeCrust],
['ChainX', nodeChainx],
['darwinia crab', nodeCrab],
['Darwinia PC2', nodeDarwinia],
['DataHighway', nodeDataHighway],
@ -106,6 +108,7 @@ export const nodeLogos: Record<string, unknown> = [
['Canvas Node', nodeCanvas],
['centrifuge chain', nodeCentrifuge],
['Centrifuge Chain Node', nodeCentrifuge],
['ChainX Node', nodeChainx],
['darwinia crab', nodeCrab],
['crust', nodeCrust],
['Crust Collator', nodeCrust],
@ -164,6 +167,7 @@ export const namedLogos: Record<string, unknown> = {
bitcountry: nodeBitCountry,
canvas: nodeCanvas,
centrifuge: nodeCentrifuge,
chainx: nodeChainx,
crab: nodeCrab,
crust: nodeCrust,
darwinia: nodeDarwinia,

View File

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140" viewBox="0 0 140 140">
<g fill="none" fill-rule="evenodd">
<rect width="140" height="140" fill="#FFF" rx="70"/>
<g fill-rule="nonzero" transform="translate(30 31)">
<path fill="#EA754B" d="M46.1910204,22.5785034 L33.7567347,10.1442177 C33.5138242,9.90978131 33.1288969,9.90978131 32.8859864,10.1442177 L27.957551,15.0726531 C27.7317686,15.318994 27.7317686,15.6970604 27.957551,15.9434014 L40.2438095,28.2819048 C43.2742643,31.314659 43.2742643,36.2292866 40.2438095,39.2620408 C37.2631863,42.1272711 32.5413628,42.092495 29.6032653,39.1836735 L11.7006803,21.237551 C8.77136716,18.2957247 8.73266953,13.5513951 11.6136054,10.5621769 C13.0674238,9.105235 15.0411003,8.28647049 17.0993197,8.28647049 C19.1575392,8.28647049 21.1312157,9.105235 22.585034,10.5621769 L24.370068,12.3472109 C24.6129785,12.5816473 24.9979058,12.5816473 25.2408163,12.3472109 L30.1779592,7.41877551 C30.4037416,7.1724346 30.4037416,6.79436812 30.1779592,6.54802721 L28.244898,4.64108844 C25.2728464,1.66873359 21.2416974,-0.00114346519 17.0383673,-0.00114346519 C12.8350373,-0.00114346519 8.80388829,1.66873359 5.83183673,4.64108844 L5.83183673,4.64108844 C-0.349205489,10.8370585 -0.349205489,20.866887 5.83183673,27.0628571 L23.7605442,45.0002721 C26.7325958,47.9726269 30.7637448,49.642504 34.9670748,49.642504 C39.1704049,49.642504 43.2015539,47.9726269 46.1736054,45.0002721 L46.1736054,45.0002721 C52.3690561,38.8130826 52.3768524,28.7753094 46.1910204,22.5785034 Z"/>
<path fill="#34C69A" d="M74.9344218,4.64108844 C71.9638568,1.66926311 67.9341495,-0.000396955862 63.7322449,-0.000396955862 C59.5303403,-0.000396955862 55.500633,1.66926311 52.530068,4.64108844 L40.4353741,16.7793197 L46.2345578,22.5785034 L46.2345578,22.5785034 L58.3553741,10.4489796 C61.3510209,7.62496854 66.0493039,7.69518622 68.9592197,10.6074582 C71.8691355,13.5197302 71.9355504,18.2180685 69.1091156,21.2114286 L67.2021769,23.1183673 C66.9677405,23.3612778 66.9677405,23.7462052 67.2021769,23.9891156 L72.1306122,28.9262585 C72.3769532,29.1520409 72.7550196,29.1520409 73.0013605,28.9262585 L74.9082993,27.0106122 C81.0714263,20.8318323 81.0831012,10.8342458 74.9344218,4.64108844 L74.9344218,4.64108844 Z"/>
<path fill="#34C69A" d="M64.5115646,26.7319728 C64.2652237,26.5061904 63.8871572,26.5061904 63.6408163,26.7319728 L51.1804082,39.1836735 C48.212393,42.1487654 43.4033893,42.1487654 40.4353741,39.1836735 L40.4353741,39.1836735 C37.5085952,36.216847 37.5085952,31.4490034 40.4353741,28.4821769 L34.5665306,22.6394558 C29.871828,27.3682521 28.6302218,34.5257464 31.4579592,40.5594558 C34.0748086,46.1086611 39.663922,49.6447 45.7991837,49.6326837 C49.9929993,49.633121 54.0150379,47.9666688 56.9795918,45.0002721 L69.44,32.5659864 C69.6657824,32.3196455 69.6657824,31.941579 69.44,31.6952381 L64.5115646,26.7319728 Z"/>
<path fill="#F6C94A" d="M74.9344218,51.3741497 L62.804898,39.1836735 L56.9795918,45.0263946 L69.1091156,57.1646259 C72.0347023,60.1086919 72.0618183,64.8539845 69.170068,67.8312925 C67.7166012,69.2855679 65.7447918,70.1026393 63.6887075,70.1026393 C61.6326232,70.1026393 59.6608138,69.2855679 58.2073469,67.8312925 L56.4136054,66.037551 C56.1672645,65.8117686 55.7891981,65.8117686 55.5428571,66.037551 L50.6144218,70.9659864 C50.3799854,71.2088969 50.3799854,71.5938242 50.6144218,71.8367347 L52.3559184,73.5782313 C58.6009106,79.8482029 68.7356219,79.9026488 75.047619,73.7001361 C81.1526782,67.4894501 81.1138247,57.5196485 74.9605442,51.3567347 L74.9344218,51.3741497 Z"/>
<path fill="#F6C94A" d="M52.8522449,63.3208163 C53.0866813,63.0779058 53.0866813,62.6929785 52.8522449,62.450068 L40.4353741,49.9896599 C38.999624,48.5670293 38.1919159,46.6296371 38.1919159,44.6084354 C38.1919159,42.5872337 38.999624,40.6498414 40.4353741,39.2272109 L40.4353741,39.2272109 C43.3983244,36.2909984 48.1739205,36.2909984 51.1368707,39.2272109 L56.9795918,33.3670748 C52.2532586,28.6676058 45.0925874,27.4254486 39.0595918,30.2585034 C34.3889279,32.4578318 31.0813731,36.7932892 30.1941795,41.879057 C29.3069859,46.9648249 30.9512403,52.1641073 34.6013605,55.814966 L47.0269388,68.2492517 C47.2698493,68.4836881 47.6547766,68.4836881 47.8976871,68.2492517 L52.8522449,63.3208163 Z"/>
<path fill="#46AEE2" d="M49.9004082 39.2272109C49.7373164 38.7556698 49.5483679 38.2934727 49.3344218 37.8427211 47.7638202 34.5013013 45.0793095 31.8106335 41.7414966 30.232381 41.3061224 30.0234014 40.8707483 29.8405442 40.4005442 29.675102 34.6409704 27.5940766 28.1977467 29.0217593 23.8563265 33.3409524L29.6380952 39.1836735C30.1773063 38.6541663 30.7902741 38.2054387 31.4579592 37.8514286 34.3999608 36.3050686 38.0048754 36.84422 40.3657143 39.1836735L40.3657143 39.1836735C42.7152309 41.5560975 43.2415706 45.1839555 41.6631293 48.1262585 41.3215216 48.7692225 40.8840401 49.3564461 40.3657143 49.8677551L46.1997279 55.7017687C50.4996661 51.3793284 51.9386316 44.9733925 49.9004082 39.2272109L49.9004082 39.2272109zM17.1602721 51.6527891L23.8127891 45.0002721 17.987483 39.1836735 11.334966 45.8361905C11.1091836 46.0825314 11.1091836 46.4605979 11.334966 46.7069388L16.2634014 51.6440816C16.5109473 51.8887198 16.9080231 51.8925749 17.1602721 51.6527891z"/>
<path fill="#46AEE2" d="M22.4370068,67.9183673 C19.4602295,70.8831219 14.6436664,70.8733756 11.6789117,67.8965985 C8.71415711,64.9198213 8.72390321,60.1032581 11.7006803,57.1385034 L13.5902041,55.2402721 C13.8246405,54.9973616 13.8246405,54.6124343 13.5902041,54.3695238 L8.66176871,49.432381 C8.41542779,49.2065986 8.03736132,49.2065986 7.79102041,49.432381 L5.89278912,51.3306122 C1.49441854,55.2364907 -0.378675566,61.2572403 1.02759209,66.9689793 C2.43385975,72.6807182 6.88810168,77.1436361 12.5970933,78.5610156 C18.306085,79.9783951 24.3304681,78.1170203 28.244898,73.7262585 L40.4353741,61.5880272 L34.5665306,55.7278912 L22.4370068,67.9183673 Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -8,6 +8,7 @@
"rpc.canvas": "Canvas",
"rpc.centrifuge": "Centrifuge",
"rpc.crab": "Darwinia Crab",
"rpc.chainx":"ChainX",
"rpc.crust.network": "Crust Maxwell",
"rpc.custom": "Custom environment",
"rpc.custom.entry": "Custom {{WS_URL}}",

View File

@ -1294,6 +1294,7 @@
"rpc.canvas": "Canvas",
"rpc.centrifuge": "Centrifuge",
"rpc.crab": "Darwinia Crab",
"rpc.chainx":"ChainX",
"rpc.crust.network": "Crust Maxwell",
"rpc.custom": "Environment personnalisé",
"rpc.custom.entry": "Personalisé {{WS_URL}}",