Add Dock specific config (#3820)

* Add Dock specific config

Signed-off-by: lovesh <lovesh.bond@gmail.com>

* Fix linting issues

Signed-off-by: lovesh <lovesh.bond@gmail.com>
This commit is contained in:
Lovesh Harchandani 2020-10-05 20:26:20 +05:30 committed by GitHub
parent bb9fcdf223
commit 44160943d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 191 additions and 4 deletions

View File

@ -0,0 +1,122 @@
// Copyright 2017-2020 @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',
Keys: 'SessionKeys2',
Did: '[u8;32]',
Bytes32: {
value: '[u8;32]'
},
Bytes33: {
value: '[u8;33]'
},
Bytes64: {
value: '[u8;64]'
},
Bytes65: {
value: '[u8;65]'
},
PublicKey: {
_enum: {
Sr25519: 'Bytes32',
Ed25519: 'Bytes32',
Secp256k1: 'Bytes33'
}
},
DidSignature: {
_enum: {
Sr25519: 'Bytes64',
Ed25519: 'Bytes64',
Secp256k1: 'Bytes65'
}
},
KeyDetail: {
controller: 'Did',
public_key: 'PublicKey'
},
KeyUpdate: {
did: 'Did',
public_key: 'PublicKey',
controller: 'Option<Did>',
last_modified_in_block: 'BlockNumber'
},
DidRemoval: {
did: 'Did',
last_modified_in_block: 'BlockNumber'
},
RegistryId: '[u8;32]',
RevokeId: '[u8;32]',
Registry: {
policy: 'Policy',
add_only: 'bool'
},
Revoke: {
registry_id: 'RegistryId',
revoke_ids: 'BTreeSet<RevokeId>',
last_modified: 'BlockNumber'
},
UnRevoke: {
registry_id: 'RegistryId',
revoke_ids: 'BTreeSet<RevokeId>',
last_modified: 'BlockNumber'
},
RemoveRegistry: {
registry_id: 'RegistryId',
last_modified: 'BlockNumber'
},
PAuth: 'BTreeMap<Did, DidSignature>',
Policy: {
_enum: {
OneOf: 'BTreeSet<Did>'
}
},
BlobId: '[u8;32]',
Blob: {
id: 'BlobId',
blob: 'Vec<u8>',
author: 'Did'
},
EpochNo: 'u32',
EpochLen: 'u32',
SlotNo: 'u64',
Balance: 'u64',
EpochDetail: {
validator_count: 'u8',
starting_slot: 'SlotNo',
expected_ending_slot: 'SlotNo',
ending_slot: 'Option<SlotNo>',
total_emission: 'Option<Balance>',
emission_for_treasury: 'Option<Balance>',
emission_for_validators: 'Option<Balance>'
},
ValidatorStatsPerEpoch: {
block_count: 'EpochLen',
locked_reward: 'Option<Balance>',
unlocked_reward: 'Option<Balance>'
},
Payload: {
proposal: 'Vec<u8>',
round_no: 'u64'
},
Membership: {
members: 'BTreeSet<Did>',
vote_requirement: 'u64'
},
PMAuth: 'BTreeMap<Did, DidSignature>',
StateChange: {
_enum: {
KeyUpdate: 'KeyUpdate',
DidRemoval: 'DidRemoval',
Revoke: 'Revoke',
UnRevoke: 'UnRevoke',
RemoveRegistry: 'RemoveRegistry',
Blob: 'Blob',
MasterVote: 'Payload'
}
}
};

View File

@ -6,6 +6,7 @@ import centrifugeChain from './centrifuge-chain';
import crab from './crab';
import crust from './crust';
import darwiniaParachain from './darwinia-parachain';
import dock from './dock';
import testPara from './cumulus-test-parachain';
import edgeware from './edgeware';
import encointerNodeNotee from './encointer-node-notee';
@ -30,6 +31,8 @@ export default {
crust,
'cumulus-test-parachain': testPara,
'darwinia-parachain': darwiniaParachain,
'dock-main-runtime': dock,
'dock-testnet': dock,
dusty3: plasm,
edgeware,
'encointer-node': encointerNodeNotee,

View File

@ -140,6 +140,12 @@ function createLiveNetworks (t: TFunction): LinkOption[] {
text: t<string>('rpc.subsocial', 'Subsocial', { ns: 'apps-config' }),
textHoster: t<string>('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'DappForce' } }),
value: 'wss://rpc.subsocial.network'
},
{
info: 'dock-mainnet',
text: t<string>('rpc.dock-mainnet', 'Dock Mainnet', { ns: 'apps-config' }),
textHoster: t<string>('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Dock Association' } }),
value: 'wss://mainnet-node.dock.io'
}
];
}
@ -290,6 +296,12 @@ function createTestNetworks (t: TFunction): LinkOption[] {
text: t<string>('rpc.westend', 'Westend', { ns: 'apps-config' }),
textHoster: t<string>('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Parity' } }),
value: 'wss://westend-rpc.polkadot.io'
},
{
info: 'dock-testnet',
text: t<string>('rpc.dock-testnet', 'Dock Testnet', { ns: 'apps-config' }),
textHoster: t<string>('rpc.hosted.by', 'hosted by {{host}}', { ns: 'apps-config', replace: { host: 'Dock Association' } }),
value: 'wss://danforth-1.dock.io'
}
];
}

View File

@ -52,6 +52,16 @@ export default function create (t: TFunction): Option[] {
text: t<string>('ss58.stafi', 'Stafi (live)', { ns: 'apps-config' }),
value: 20
},
{
info: 'dock-testnet',
text: t<string>('ss58.dock-testnet', 'Dock Testnet (test)', { ns: 'apps-config' }),
value: 21
},
{
info: 'dock-mainnet',
text: t<string>('ss58.dock-mainnet', 'Dock Mainnet (live)', { ns: 'apps-config' }),
value: 22
},
{
info: 'subsocial',
text: t<string>('ss58.subsocial', 'Subsocial (live)', { ns: 'apps-config' }),

View File

@ -4,7 +4,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
// anything for a specific chain, most would probably fit into the node category (but allow for chain-specific)
// alphbetical
// alphabetical
import chainDusty from './chains/dusty.png';
import chainKusama from './chains/kusama-128.gif';
import chainRococo from './chains/rococo.svg';
@ -13,12 +13,14 @@ import chainRococoTrack from './chains/rococo-track.svg';
import chainRococoTrick from './chains/rococo-trick.svg';
// defaults for the node type, assuming we don't have a specific chain, but rather match on the implementation
// alphbetical
// alphabetical
import nodeAcala from './nodes/acala-circle.svg';
import nodeCentrifuge from './nodes/centrifuge.png';
import nodeCrab from './nodes/crab.svg';
import nodeCrust from './nodes/crust.svg';
import nodeDarwinia from './nodes/darwinia.png';
import nodeDockMainnet from './nodes/dock-mainnet.svg';
import nodeDockTestnet from './nodes/dock-testnet.svg';
import nodeEdgeware from './nodes/edgeware-circle.svg';
import nodeEncointerNotee from './nodes/encointer-notee.svg';
import nodeEncointerTeeproxy from './nodes/encointer-teeproxy.svg';
@ -37,11 +39,11 @@ import nodeSubsocial from './nodes/subsocial.svg';
import nodeSubstrate from './nodes/substrate-hexagon.svg';
// extensions
// alphbetical
// alphabetical
import extensionPolkadotJs from './extensions/polkadot-js.svg';
// external links
// alphbetical
// alphabetical
import externalCommonwealth from './external/commonwealth.png';
import externalPolkascan from './external/polkascan.png';
import externalPolkassembly from './external/polkassembly.png';
@ -77,6 +79,8 @@ const nodeLogos: Record<string, any> = [
['crab', nodeCrab],
['crust node', nodeCrust],
['darwinia parachain', nodeDarwinia],
['Dock Mainnet Node', nodeDockMainnet],
['Dock Testnet Node', nodeDockTestnet],
['Edgeware Node', nodeEdgeware],
['Encointer Node', nodeEncointerNotee],
['Encointer Node noTEE', nodeEncointerNotee],
@ -109,6 +113,8 @@ const namedLogos: Record<string, any> = {
centrifuge: nodeCentrifuge,
crab: nodeCrab,
crust: nodeCrust,
dockMainnet: nodeDockMainnet,
dockTestnet: nodeDockTestnet,
dusty: chainDusty,
edgeware: nodeEdgeware,
empty: emptyLogo,

View File

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.16, written by Peter Selinger 2001-2019
</metadata>
<g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M0 160 l0 -160 160 0 160 0 0 160 0 160 -160 0 -160 0 0 -160z m250
29 c0 -87 -1 -92 -29 -120 -20 -20 -39 -29 -61 -29 -45 0 -90 47 -90 95 0 38
35 85 64 85 9 0 12 7 9 20 -8 29 15 25 49 -7 l28 -27 0 37 c0 26 4 37 15 37
12 0 15 -17 15 -91z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 763 B

View File

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="32.000000pt" height="32.000000pt" viewBox="0 0 32.000000 32.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.16, written by Peter Selinger 2001-2019
</metadata>
<g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M0 160 l0 -160 160 0 160 0 0 160 0 160 -160 0 -160 0 0 -160z m250
29 c0 -87 -1 -92 -29 -120 -20 -20 -39 -29 -61 -29 -45 0 -90 47 -90 95 0 38
35 85 64 85 9 0 12 7 9 20 -8 29 15 25 49 -7 l28 -27 0 37 c0 26 4 37 15 37
12 0 15 -17 15 -91z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 763 B