Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions packages/apps-config/src/api/spec/crust.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
export default {
Address: 'AccountId',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ranking with alphabetical order

LookupSource: 'AccountId',
Identity: {
pub_key: 'Vec<u8>',
code: 'Vec<u8>',
},
SworkerCode: 'Vec<u8>',
// ValidatorPrefs: {
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
// fee: 'Compact<Perbill>'
// },
// fee: 'commission',
WorkReport: {
block_number: 'u64',
used: 'u64',
reserved: 'u64',
cached_reserved: 'u64',
files: 'Vec<(Vec<u8>, u64)>',
},
StakingLedger: {
stash: 'AccountId',
total: 'Compact<Balance>',
active: 'Compact<Balance>',
unlocking: 'Vec<UnlockChunk>',
claimed_rewards: 'Vec<EraIndex>'
},
UnlockChunk: {
value:'Compact<Balance>',
era: 'Compact<EraIndex>'
},
ReportSlot: 'u64',
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
AddressInfo: 'Vec<u8>',
MerkleRoot: 'Vec<u8>',
MerchantInfo: {
address: 'Vec<u8>',
storage_price: 'Balance',
file_map: 'Vec<(Vec<u8>, Vec<Hash>)>',
},
OrderStatus: {
_enum: ['Success', 'Failed', 'Pending'],
},
StorageOrder: {
file_identifier: 'Vec<u8>',
file_size: 'u64',
created_on: 'BlockNumber',
completed_on: 'BlockNumber',
expired_on: 'BlockNumber',
provider: 'AccountId',
client: 'AccountId',
amount: 'Balance',
order_status: 'OrderStatus',
},
Pledge: {
total: 'Balance',
used: 'Balance',
},
// Payment ledger
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
PaymentLedger: {
total: 'Balance',
paid: 'Balance',
unreserved: 'Balance',
},
MerchantPunishment: {
success: 'EraIndex',
failed: 'EraIndex',
value: 'Balance',
},
SworkerCert: 'Vec<u8>',
IASSig: 'Vec<u8>',
ISVBody: 'Vec<u8>',
SworkerPubKey: 'Vec<u8>',
SworkerSignature: 'Vec<u8>',
// TODO: remove util upgrade newest polkadot-js/api
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
Releases: {
_enum: ['V1_0_0', 'V2_0_0'],
},
Status: {
_enum: ['Free', 'Reserved']
},
Guarantee: {
targets: 'Vec<IndividualExposure<AccountId, Balance>>',
total: 'Compact<Balance>',
submitted_in: 'EraIndex',
suppressed: 'bool'
},
FileAlias: 'Vec<u8>'
};
4 changes: 3 additions & 1 deletion packages/apps-config/src/api/spec/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import nodle from './nodle';
import plasm from './plasm';
import stablePoc from './stable-poc';
import subsocialNode from './subsocial';
import crust from './crust';

export default {
Crab: crab,
Expand All @@ -38,5 +39,6 @@ export default {
plasm,
'stable-poc': stablePoc,
stable_poc: stablePoc,
subsocial: subsocialNode
subsocial: subsocialNode,
'crust': crust
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
};
5 changes: 5 additions & 0 deletions packages/apps-config/src/settings/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ function createTestNetworks (t: TFunction): LinkOption[] {
info: 'westend',
text: t<string>('rpc.westend', 'Westend (Polkadot Testnet, hosted by Parity)', { ns: 'apps-config' }),
value: 'wss://westend-rpc.polkadot.io'
},
{
info: 'crust',
text: t<string>('rpc.crust.network', 'Maxwell CC2 (Crust BetaNet, hosted by Crust Network)', { ns: 'apps-config' }),
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
value: 'wss://api.crust.network/'
}
];
}
Expand Down
4 changes: 3 additions & 1 deletion packages/apps-config/src/ui/general/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const chainRoccoDarwinia = '#7C30DD';
const laminarRoccoAcala = '#004FFF';
const chainWestend = '#da68a7';
const chainPhala = '#4dc56a';
const chainCrust = '#ff8812'

const nodeCentrifuge = '#fcc367';
const nodeEdgeware = '#0a95df';
Expand All @@ -43,7 +44,8 @@ const chainColors: Record<string, any> = [
['darwinia parachain', chainRoccoDarwinia],
['laminar turbulence pc1', laminarRoccoAcala],
['Westend', chainWestend],
['phala poc 2', chainPhala]
['phala poc 2', chainPhala],
['Crust Maxwell CC2', chainCrust]
Comment thread
yashirooooo marked this conversation as resolved.
Outdated
].reduce((colors, [chain, color]): Record<string, any> => ({
...colors,
[chain.toLowerCase()]: color
Expand Down
1 change: 1 addition & 0 deletions packages/apps-config/src/ui/logos/chains/chainCrust.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions packages/apps-config/src/ui/logos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import chainRococo from './chains/rococo.svg';
import chainRococoTick from './chains/rococo-tick.svg';
import chainRococoTrack from './chains/rococo-track.svg';
import chainRococoTrick from './chains/rococo-trick.svg';
import chainCrust from './chains/chainCrust.svg';

// defaults for the node type, assuming we don't have a specific chain, but rather match on the implementation
import nodeAcala from './nodes/acala-circle.svg';
Expand Down Expand Up @@ -54,7 +55,8 @@ const chainLogos: Record<string, any> = [
['Rococo', chainRococo],
['Tick', chainRococoTick],
['Track', chainRococoTrack],
['Trick', chainRococoTrick]
['Trick', chainRococoTrick],
['Crust Maxwell CC2', chainCrust]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why other chains do not add this, like Phala

].reduce((logos, [chain, logo]): Record<string, any> => ({
...logos,
[(chain as string).toLowerCase()]: logo
Expand All @@ -79,7 +81,8 @@ const nodeLogos: Record<string, any> = [
['polkadot-js', nodePolkadotJs],
['subsocial-node', nodeSubsocial],
['substrate-node', nodeSubstrate],
['phala-substrate-node', nodePhala]
['phala-substrate-node', nodePhala],
['crust', chainCrust]
].reduce((logos, [node, logo]): Record<string, any> => ({
...logos,
[(node as string).toLowerCase().replace(/-/g, ' ')]: logo
Expand Down Expand Up @@ -112,7 +115,8 @@ const namedLogos: Record<string, any> = {
rococoTrick: chainRococoTrick,
subsocial: nodeSubsocial,
substrate: nodeSubstrate,
westend: nodePolkadot
westend: nodePolkadot,
crust: chainCrust
};

// extension logos
Expand Down