Add crust mainnet endpoint (#5929)
* Add crust mainnet endpoint * Fix lint * Fix * Fix test * Fix lint
This commit is contained in:
parent
07144846a6
commit
fe3a4f1894
103
packages/apps-config/src/api/chain/crust-maxwell.ts
Normal file
103
packages/apps-config/src/api/chain/crust-maxwell.ts
Normal file
@ -0,0 +1,103 @@
|
||||
// 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 {
|
||||
AccountInfo: 'AccountInfoWithProviders',
|
||||
Address: 'AccountId',
|
||||
AddressInfo: 'Vec<u8>',
|
||||
LookupSource: 'AccountId',
|
||||
EraBenefits: {
|
||||
total_benefits: 'Balance',
|
||||
total_funds: 'Balance',
|
||||
used_benefits: 'Balance',
|
||||
active_era: 'EraIndex'
|
||||
},
|
||||
FeeReductionBenefit: {
|
||||
funds: 'Balance',
|
||||
total_fee_reduction_count: 'u32',
|
||||
used_fee_reduction_quota: 'Balance',
|
||||
used_fee_reduction_count: 'u32',
|
||||
refreshed_at: 'EraIndex'
|
||||
},
|
||||
CsmBalance: 'Balance',
|
||||
CsmBalanceOf: 'Balance',
|
||||
ETHAddress: 'Vec<u8>',
|
||||
EthereumTxHash: 'H256',
|
||||
CSMLedger: {
|
||||
total: 'Compact<Balance>',
|
||||
active: 'Compact<Balance>',
|
||||
unlocking: 'Vec<CSMUnlockChunk<Balance>>'
|
||||
},
|
||||
CSMUnlockChunk: {
|
||||
value: 'Compact<Balance>',
|
||||
bn: 'Compact<BlockNumber>'
|
||||
},
|
||||
FileInfo: {
|
||||
file_size: 'u64',
|
||||
expired_on: 'BlockNumber',
|
||||
calculated_at: 'BlockNumber',
|
||||
amount: 'Balance',
|
||||
prepaid: 'Balance',
|
||||
reported_replica_count: 'u32',
|
||||
replicas: 'Vec<Replica<AccountId>>'
|
||||
},
|
||||
MerchantLedger: {
|
||||
reward: 'Balance',
|
||||
collateral: 'Balance'
|
||||
},
|
||||
Releases: {
|
||||
_enum: ['V1_0_0', 'V2_0_0']
|
||||
},
|
||||
Replica: {
|
||||
who: 'AccountId',
|
||||
valid_at: 'BlockNumber',
|
||||
anchor: 'SworkerAnchor',
|
||||
is_reported: 'bool'
|
||||
},
|
||||
Status: {
|
||||
_enum: ['Free', 'Reserved']
|
||||
},
|
||||
UsedInfo: {
|
||||
used_size: 'u64',
|
||||
reported_group_count: 'u32',
|
||||
groups: 'BTreeMap<SworkerAnchor, bool>'
|
||||
},
|
||||
Guarantee: {
|
||||
targets: 'Vec<IndividualExposure<AccountId, Balance>>',
|
||||
total: 'Compact<Balance>',
|
||||
submitted_in: 'EraIndex',
|
||||
suppressed: 'bool'
|
||||
},
|
||||
ValidatorPrefs: {
|
||||
guarantee_fee: 'Compact<Perbill>'
|
||||
},
|
||||
IASSig: 'Vec<u8>',
|
||||
Identity: {
|
||||
anchor: 'SworkerAnchor',
|
||||
punishment_deadline: 'u64',
|
||||
group: 'Option<AccountId>'
|
||||
},
|
||||
ISVBody: 'Vec<u8>',
|
||||
MerkleRoot: 'Vec<u8>',
|
||||
ReportSlot: 'u64',
|
||||
PKInfo: {
|
||||
code: 'SworkerCode',
|
||||
anchor: 'Option<SworkerAnchor>'
|
||||
},
|
||||
SworkerAnchor: 'Vec<u8>',
|
||||
SworkerCert: 'Vec<u8>',
|
||||
SworkerCode: 'Vec<u8>',
|
||||
SworkerPubKey: 'Vec<u8>',
|
||||
SworkerSignature: 'Vec<u8>',
|
||||
WorkReport: {
|
||||
report_slot: 'u64',
|
||||
used: 'u64',
|
||||
free: 'u64',
|
||||
reported_files_size: 'u64',
|
||||
reported_srd_root: 'MerkleRoot',
|
||||
reported_files_root: 'MerkleRoot'
|
||||
}
|
||||
};
|
||||
@ -3,7 +3,10 @@
|
||||
|
||||
import { typesChain } from '@phala/typedefs';
|
||||
|
||||
import CrustMaxwell from './crust-maxwell';
|
||||
|
||||
// alphabetical, based on the actual displayed name
|
||||
export default {
|
||||
...typesChain
|
||||
...typesChain,
|
||||
'Crust Maxwell': CrustMaxwell
|
||||
};
|
||||
|
||||
@ -33,6 +33,13 @@ export function createProduction (t: TFunction, firstOnly?: boolean): LinkOption
|
||||
'Patract Elara': 'wss://chainx.elara.patract.io'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'crust',
|
||||
text: t('rpc.prod.crust', 'Crust Network', { ns: 'apps-config' }),
|
||||
providers: {
|
||||
'Crust Network': 'wss://rpc.crust.network'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'darwinia',
|
||||
text: t('rpc.prod.darwinia', 'Darwinia', { ns: 'apps-config' }),
|
||||
|
||||
@ -76,7 +76,7 @@ export function createTesting (t: TFunction, firstOnly?: boolean): LinkOption[]
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'crust',
|
||||
info: 'Crust Maxwell',
|
||||
text: t('rpc.test.crust.network', 'Crust Maxwell', { ns: 'apps-config' }),
|
||||
providers: {
|
||||
'Crust Network': 'wss://api.crust.network/',
|
||||
|
||||
@ -19,6 +19,7 @@ const chainBitCountry = '#191a2e';
|
||||
const chainBeastEave = '#900048';
|
||||
const chainCrab = '#7C30DD';
|
||||
const chainCrust = '#ff8812';
|
||||
const chainCrustMaxwell = '#2E333B';
|
||||
const chainClover = 'linear-gradient(to right, #52ad75, #7cc773)';
|
||||
const chainChainx = '#F6C94A';
|
||||
const chainDarwinia = 'linear-gradient(-45deg, #FE3876 0%, #7C30DD 71%, #3A30DD 100%)';
|
||||
@ -169,7 +170,8 @@ export const chainColors: Record<string, string> = Object.entries({
|
||||
'Bit.Country Tewai Chain': chainBitCountry,
|
||||
ChainX: chainChainx,
|
||||
Clover: chainClover,
|
||||
'crust maxwell': chainCrust,
|
||||
crust: chainCrust,
|
||||
'crust maxwell': chainCrustMaxwell,
|
||||
'Crust PC1': chainCrust,
|
||||
'darwinia cc1': chainDarwinia,
|
||||
'Darwinia Crab': chainCrab,
|
||||
|
||||
@ -46,6 +46,7 @@ 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 nodeCrustMaxwell from './nodes/crust-maxwell.svg';
|
||||
import nodeDarwinia from './nodes/darwinia.png';
|
||||
import nodeDataHighway from './nodes/datahighway.png';
|
||||
import nodeDockMainnet from './nodes/dock-mainnet.png';
|
||||
@ -141,6 +142,7 @@ export const chainLogos = Object.entries({
|
||||
'Bifrost Asgard CC4': nodeBifrost,
|
||||
ChainX: nodeChainx,
|
||||
'Charcoal Testnet': nodeCentrifuge,
|
||||
'Crust Maxwell': nodeCrustMaxwell,
|
||||
'Crust PC1': nodeCrust,
|
||||
'darwinia crab': nodeCrab,
|
||||
'Darwinia Crab PC2': nodeCrab,
|
||||
@ -269,6 +271,7 @@ export const nodeLogos = Object.entries({
|
||||
'Clover Node': nodeClover,
|
||||
crust: nodeCrust,
|
||||
'Crust Collator': nodeCrust,
|
||||
'Crust Maxwell': nodeCrustMaxwell,
|
||||
darwinia: nodeDarwinia,
|
||||
'darwinia crab': nodeCrab,
|
||||
'darwinia parachain': nodeDarwinia,
|
||||
@ -419,6 +422,7 @@ export const namedLogos: Record<string, unknown> = {
|
||||
crab: nodeCrab,
|
||||
crab_redirect: nodeCrab,
|
||||
crust: nodeCrust,
|
||||
'Crust Maxwell': nodeCrustMaxwell,
|
||||
darwinia: nodeDarwinia,
|
||||
datahighway: nodeDataHighway,
|
||||
'dock-mainnet': nodeDockMainnet,
|
||||
|
||||
28
packages/apps-config/src/ui/logos/nodes/crust-maxwell.svg
Normal file
28
packages/apps-config/src/ui/logos/nodes/crust-maxwell.svg
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="tucen_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1028 1028" style="enable-background:new 0 0 1028 1028;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill:url(#SVGID_1_);}
|
||||
.st2{fill:url(#SVGID_2_);}
|
||||
</style>
|
||||
<title>ziyuan 1</title>
|
||||
<circle class="st0" cx="514" cy="514" r="514"/>
|
||||
<g>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="251.3642" y1="331.0095" x2="776.0202" y2="331.0095">
|
||||
<stop offset="0" style="stop-color:#2E333B"/>
|
||||
<stop offset="1" style="stop-color:#575859"/>
|
||||
</linearGradient>
|
||||
<path class="st1" d="M267.1,325.2l283.2-163.5c9.8-5.6,21.8-5.6,31.5,0l178.4,103c15.1,8.7,20.3,28,11.6,43.1
|
||||
c-1.4,2.4-3,4.5-4.9,6.5L706.3,375c-10.1,10.1-25.7,12.2-38.1,5.1l-86.1-49.7c-10-5.7-22.2-5.7-32.2,0L251.4,504.5v-152
|
||||
C251.4,341.3,257.4,330.8,267.1,325.2z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="251.3642" y1="661.7465" x2="776.6142" y2="661.7465">
|
||||
<stop offset="0" style="stop-color:#2E333B"/>
|
||||
<stop offset="1" style="stop-color:#575859"/>
|
||||
</linearGradient>
|
||||
<path class="st2" d="M760.9,762.9L581.8,866.3c-9.7,5.6-21.8,5.6-31.5,0L267.1,702.8c-9.8-5.6-15.8-16-15.8-27.3V537.6L397.3,453
|
||||
v138.2c0,11.3,6,21.7,15.8,27.3l137.3,79.2c9.7,5.6,21.8,5.6,31.5,0l86.9-50.1c12.4-7.1,28-5.1,38,5l60.6,60.7
|
||||
c12.3,12.3,12.3,32.3,0,44.6C765.5,759.9,763.3,761.5,760.9,762.9z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@ -1,26 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="1028px" height="1028px" viewBox="0 0 1028 1028" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>group</title>
|
||||
<defs>
|
||||
<radialGradient cx="49.9966152%" cy="50.0014665%" fx="49.9966152%" fy="50.0014665%" r="64.1690427%" gradientTransform="translate(0.499966,0.500015),scale(0.660584,1.000000),translate(-0.499966,-0.500015)" id="radialGradient-1">
|
||||
<stop stop-color="#FDA649" offset="0%"></stop>
|
||||
<stop stop-color="#FFBC75" offset="50%"></stop>
|
||||
<stop stop-color="#FA8C16" offset="100%"></stop>
|
||||
</radialGradient>
|
||||
<radialGradient cx="50.002707%" cy="50.0051014%" fx="50.002707%" fy="50.0051014%" r="56.8694256%" gradientTransform="translate(0.500027,0.500051),scale(0.794171,1.000000),translate(-0.500027,-0.500051)" id="radialGradient-2">
|
||||
<stop stop-color="#FDA649" offset="0%"></stop>
|
||||
<stop stop-color="#FFBC75" offset="50%"></stop>
|
||||
<stop stop-color="#FA8C16" offset="100%"></stop>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<g id="page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="group" transform="translate(-0.004229, 0.000000)" fill-rule="nonzero">
|
||||
<circle id="oval" fill="#FFFFFF" transform="translate(514.000000, 514.000000) rotate(-90.000000) translate(-514.000000, -514.000000) " cx="514" cy="514" r="514"></circle>
|
||||
<g id="group-2" transform="translate(225.004229, 158.000000)">
|
||||
<path d="M16.4596698,174.958777 L312.248797,4.41061054 C322.436829,-1.47020351 334.99396,-1.47020351 345.181991,4.41061054 L531.503233,111.836861 C540.364532,116.936624 546.351885,125.856896 547.708553,135.980393 C549.065221,146.10389 545.637348,156.282549 538.430703,163.529864 L475.224464,226.914672 C464.692808,237.489935 448.352024,239.659741 435.41922,232.200199 L345.528365,180.368832 C335.12217,174.378698 322.308618,174.378698 311.902424,180.368832 L0,362 L0,203.434205 C0,191.687348 6.27300337,180.832205 16.4596698,174.958777 Z" id="route" fill="url(#radialGradient-1)"></path>
|
||||
<path d="M532.544967,632.653603 L345.375743,740.584309 C335.185824,746.471897 322.623879,746.471897 312.43396,740.584309 L16.470892,569.851008 C6.2772803,563.971204 0,553.104277 0,541.344669 L0,397.372421 L152.508257,309 L152.508257,453.332387 C152.509512,465.091229 158.78763,475.956831 168.979148,481.838725 L312.461688,564.587447 C322.651608,570.475035 335.213553,570.475035 345.403472,564.587447 L436.187477,512.228865 C449.097531,504.779507 465.406031,506.921271 475.950539,517.450872 L539.324652,580.84908 C546.577031,588.080688 550.049991,598.271079 548.721582,608.421638 C547.393173,618.572198 541.414546,627.527957 532.544967,632.653603 L532.544967,632.653603 Z" id="route" fill="url(#radialGradient-2)"></path>
|
||||
</g>
|
||||
</g>
|
||||
<path d="" id="route-2" stroke="#979797"></path>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="tucen_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1028 1028" style="enable-background:new 0 0 1028 1028;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.st1{fill:#F08727;}
|
||||
.st2{fill:#191919;}
|
||||
</style>
|
||||
<title>ziyuan 1</title>
|
||||
<circle class="st0" cx="514" cy="514" r="514"/>
|
||||
<path class="st1" d="M267.1,325.2l283.2-163.5c9.8-5.6,21.8-5.6,31.5,0l178.4,103c15.1,8.7,20.3,28,11.6,43.1
|
||||
c-1.4,2.4-3,4.5-4.9,6.5L706.3,375c-10.1,10.1-25.7,12.2-38.1,5.1l-86.1-49.7c-10-5.7-22.2-5.7-32.2,0L251.4,504.5v-152
|
||||
C251.4,341.3,257.4,330.8,267.1,325.2z"/>
|
||||
<path class="st2" d="M760.9,762.9L581.8,866.3c-9.7,5.6-21.8,5.6-31.5,0L267.1,702.8c-9.8-5.6-15.8-16-15.8-27.3V537.6l146-84.6
|
||||
v138.2c0,11.3,6,21.7,15.8,27.3l137.3,79.2c9.7,5.6,21.8,5.6,31.5,0l86.9-50.1c12.4-7.1,28-5.1,38,5l60.6,60.7
|
||||
c12.3,12.3,12.3,32.3,0,44.6C765.5,759.9,763.3,761.5,760.9,762.9z"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue
Block a user