Add unique network types, logo, and colors (#4693)
* Add Unique Network types, logo, and color. * Debug Unique colors and logos * Lint unique types * Fix unique types * Lint unique types
This commit is contained in:
parent
810be78d38
commit
cb7e0b9ba4
117
packages/apps-config/src/api/spec/unique.ts
Normal file
117
packages/apps-config/src/api/spec/unique.ts
Normal file
@ -0,0 +1,117 @@
|
||||
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
const definitions: OverrideBundleDefinition = {
|
||||
types: [
|
||||
{
|
||||
// on all versions
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
AccessMode: {
|
||||
_enum: ['Normal', 'WhiteList']
|
||||
},
|
||||
DecimalPoints: 'u8',
|
||||
CollectionMode: {
|
||||
_enum: {
|
||||
Invalid: null,
|
||||
NFT: null,
|
||||
Fungible: 'DecimalPoints',
|
||||
ReFungible: null
|
||||
}
|
||||
},
|
||||
Ownership: {
|
||||
Owner: 'AccountId',
|
||||
Fraction: 'u128'
|
||||
},
|
||||
FungibleItemType: {
|
||||
Value: 'u128'
|
||||
},
|
||||
NftItemType: {
|
||||
Owner: 'AccountId',
|
||||
ConstData: 'Vec<u8>',
|
||||
VariableData: 'Vec<u8>'
|
||||
},
|
||||
ReFungibleItemType: {
|
||||
Owner: 'Vec<Ownership<AccountId>>',
|
||||
ConstData: 'Vec<u8>',
|
||||
VariableData: 'Vec<u8>'
|
||||
},
|
||||
CollectionType: {
|
||||
Owner: 'AccountId',
|
||||
Mode: 'CollectionMode',
|
||||
Access: 'AccessMode',
|
||||
DecimalPoints: 'DecimalPoints',
|
||||
Name: 'Vec<u16>',
|
||||
Description: 'Vec<u16>',
|
||||
TokenPrefix: 'Vec<u8>',
|
||||
MintMode: 'bool',
|
||||
OffchainSchema: 'Vec<u8>',
|
||||
SchemaVersion: 'SchemaVersion',
|
||||
Sponsor: 'AccountId',
|
||||
SponsorConfirmed: 'bool',
|
||||
Limits: 'CollectionLimits',
|
||||
VariableOnChainSchema: 'Vec<u8>',
|
||||
ConstOnChainSchema: 'Vec<u8>'
|
||||
},
|
||||
RawData: 'Vec<u8>',
|
||||
Address: 'AccountId',
|
||||
LookupSource: 'AccountId',
|
||||
Weight: 'u64',
|
||||
CreateNftData: {
|
||||
const_data: 'Vec<u8>',
|
||||
variable_data: 'Vec<u8>'
|
||||
},
|
||||
CreateFungibleData: {
|
||||
value: 'u128'
|
||||
},
|
||||
CreateReFungibleData: {
|
||||
const_data: 'Vec<u8>',
|
||||
variable_data: 'Vec<u8>',
|
||||
pieces: 'u128'
|
||||
},
|
||||
CreateItemData: {
|
||||
_enum: {
|
||||
NFT: 'CreateNftData',
|
||||
Fungible: 'CreateFungibleData',
|
||||
ReFungible: 'CreateReFungibleData'
|
||||
}
|
||||
},
|
||||
SchemaVersion: {
|
||||
_enum: [
|
||||
'ImageURL',
|
||||
'Unique'
|
||||
]
|
||||
},
|
||||
CollectionId: 'u32',
|
||||
TokenId: 'u32',
|
||||
ChainLimits: {
|
||||
CollectionNumbersLimit: 'u32',
|
||||
AccountTokenOwnershipLimit: 'u32',
|
||||
CollectionAdminsLimit: 'u64',
|
||||
CustomDataLimit: 'u32',
|
||||
NftSponsorTimeout: 'u32',
|
||||
FungibleSponsorTimeout: 'u32',
|
||||
RefungibleSponsorTimeout: 'u32',
|
||||
OffchainSchemaLimit: 'u32',
|
||||
VariableOnChainSchemaLimit: 'u32',
|
||||
ConstOnChainSchemaLimit: 'u32'
|
||||
},
|
||||
CollectionLimits: {
|
||||
AccountTokenOwnershipLimit: 'u32',
|
||||
SponsoredMintSize: 'u32',
|
||||
TokenLimit: 'u32',
|
||||
SponsorTimeout: 'u32',
|
||||
OwnerCanTransfer: 'bool',
|
||||
OwnerCanDestroy: 'bool'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default definitions;
|
||||
@ -223,6 +223,13 @@ export function createTesting (t: TFunction): LinkOption[] {
|
||||
Uniarts: 'wss://testnet.uniarts.me'
|
||||
}
|
||||
},
|
||||
{
|
||||
info: 'unique',
|
||||
text: t('rpc.unique', 'Unique', { ns: 'apps-config' }),
|
||||
providers: {
|
||||
Unique: 'wss://testnet2.uniquenetwork.io'
|
||||
}
|
||||
},
|
||||
{
|
||||
dnslink: 'westend',
|
||||
info: 'westend',
|
||||
|
||||
@ -45,6 +45,7 @@ const chainZero = '#000000';
|
||||
const chainZenlink = 'linear-gradient(45deg, #F20082 0%, #FF4D4D 100%)';
|
||||
const chainJupiter = '#7143ff';
|
||||
const chainUniarts = '#b39ef7';
|
||||
const chainUnique = 'linear-gradient(180deg, #000219 0%, #000219 7%, #77903b 7%, #77903b 100%)';
|
||||
const chainIdavoll = '#ff43ff';
|
||||
const chainSubDAO = 'linear-gradient(50deg, #F20092 0%, #FF4D5D 100%)';
|
||||
const chainTrustBase = '#ff43aa';
|
||||
@ -71,6 +72,7 @@ const nodeStafi = '#00F3AB';
|
||||
const nodeSubDAO = 'linear-gradient(50deg, #F20092 0%, #FF4D5D 100%)';
|
||||
const nodeSubsocial = '#b9018c';
|
||||
const nodeTernoa = '#d622ff';
|
||||
const nodeUnique = chainUnique;
|
||||
const nodeZero = '#0099cc';
|
||||
const nodeZenlink = 'linear-gradient(45deg, #F20082 0%, #FF4D4D 100%)';
|
||||
|
||||
@ -129,6 +131,7 @@ export const chainColors: Record<string, any> = [
|
||||
['Trick', chainRoccoTrick],
|
||||
['TrustBase PC1', chainTrustBase],
|
||||
['Uniarts', chainUniarts],
|
||||
['Unique Node', chainUnique],
|
||||
['Westend', chainWestend],
|
||||
['Zenlink PC1', chainZenlink],
|
||||
['ZΞRO Alphaville', chainZero]
|
||||
@ -161,6 +164,7 @@ export const nodeColors: Record<string, any> = [
|
||||
['subsocial node', nodeSubsocial],
|
||||
['SUBZΞRO', nodeZero],
|
||||
['Ternoa Node', nodeTernoa],
|
||||
['Unique Node', nodeUnique],
|
||||
['Zenlink Collator', nodeZenlink],
|
||||
['SubDAO Collator', nodeSubDAO]
|
||||
// ['node template', emptyColor],
|
||||
|
||||
BIN
packages/apps-config/src/ui/logos/chains/unique.png
Normal file
BIN
packages/apps-config/src/ui/logos/chains/unique.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@ -15,6 +15,7 @@ import chainRococoTick from './chains/rococo-tick.svg';
|
||||
import chainRococoTrack from './chains/rococo-track.svg';
|
||||
import chainRococoTrick from './chains/rococo-trick.svg';
|
||||
import chainSnakenet from './chains/snakenet.svg';
|
||||
import chainUnique from './chains/unique.png';
|
||||
import extensionPolkadotJs from './extensions/polkadot-js.svg';
|
||||
import externalCommonwealth from './external/commonwealth.png';
|
||||
import externalPolkascan from './external/polkascan.png';
|
||||
@ -67,6 +68,7 @@ import nodeSubstrate from './nodes/substrate-hexagon.svg';
|
||||
import nodeTernoa from './nodes/ternoa.svg';
|
||||
import nodeTrustBase from './nodes/trustbase.png';
|
||||
import nodeUniarts from './nodes/uniarts.png';
|
||||
import nodeUnique from './nodes/unique.png';
|
||||
import nodeZenlink from './nodes/zenlink.svg';
|
||||
import nodeZero from './nodes/zero.svg';
|
||||
// last-resort fallback, just something empty
|
||||
@ -106,7 +108,8 @@ export const chainLogos: Record<string, unknown> = [
|
||||
['Track', chainRococoTrack],
|
||||
['Trick', chainRococoTrick],
|
||||
['TrustBase PC1', nodeTrustBase],
|
||||
['Uniarts', nodeUniarts]
|
||||
['Uniarts', nodeUniarts],
|
||||
['Unique', chainUnique]
|
||||
].reduce((logos, [chain, logo]): Record<string, unknown> => ({
|
||||
...logos,
|
||||
[(chain as string).toLowerCase()]: logo
|
||||
@ -179,7 +182,8 @@ export const nodeLogos: Record<string, unknown> = [
|
||||
['Zenlink', nodeZenlink],
|
||||
['Zenlink Collator', nodeZenlink],
|
||||
['SubDAO Collator', nodeSubDAO],
|
||||
['Uniarts', nodeUniarts]
|
||||
['Uniarts', nodeUniarts],
|
||||
['Unique Node', nodeUnique]
|
||||
].reduce((logos, [node, logo]): Record<string, unknown> => ({
|
||||
...logos,
|
||||
[(node as string).toLowerCase().replace(/-/g, ' ')]: logo
|
||||
@ -260,6 +264,7 @@ export const namedLogos: Record<string, unknown> = {
|
||||
substrate: nodeSubstrate,
|
||||
'ternoa-chaos': nodeTernoa,
|
||||
uniarts: nodeUniarts,
|
||||
unique: nodeUnique,
|
||||
westend: nodePolkadot,
|
||||
zero: nodeZero
|
||||
};
|
||||
|
||||
BIN
packages/apps-config/src/ui/logos/nodes/unique.png
Normal file
BIN
packages/apps-config/src/ui/logos/nodes/unique.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user