diff --git a/packages/apps-config/src/api/spec/index.ts b/packages/apps-config/src/api/spec/index.ts index 44b40db143..e1c957718d 100644 --- a/packages/apps-config/src/api/spec/index.ts +++ b/packages/apps-config/src/api/spec/index.ts @@ -27,6 +27,7 @@ import robonomics from './robonomics'; import stablePoc from './stable-poc'; import stafi from './stafi'; import subsocial from './subsocial'; +import uniarts from './uniarts'; import zero from './zero'; // mapping from specName in state.getRuntimeVersion @@ -59,5 +60,6 @@ export default { stable_poc: stablePoc, stafi, subsocial, - subzero: zero + subzero: zero, + uniarts: uniarts }; diff --git a/packages/apps-config/src/api/spec/uniarts.ts b/packages/apps-config/src/api/spec/uniarts.ts new file mode 100644 index 0000000000..4624a85cae --- /dev/null +++ b/packages/apps-config/src/api/spec/uniarts.ts @@ -0,0 +1,203 @@ +// Copyright 2017-2021 @polkadot/apps-config authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +// structs need to be in order +/* eslint-disable sort-keys */ +/* eslint-disable camelcase */ + +export default { + Keys: 'SessionKeys2', + Address: 'AccountId', + LookupSource: 'AccountId', + WorkId: 'u32', + Id: 'u32', + Name: 'Vec', + Value: 'Vec', + ReasonIndex: 'u32', + LottoIndex: 'u32', + LotteryKind: { + _enum: { + Routine: 'Null', + TreasuryFunded: 'ReasonIndex' + } + }, + LottoResult: { + _enum: { + Routine: '(AccountId, Balance)', + TreasuryFunded: 'Balance' + } + }, + Lottery: { + round: 'LottoIndex', + kind: 'LotteryKind', + jackpot: 'Balance', + next_ticket_id: 'u32', + players: 'BTreeMap', + tickets: 'BTreeMap', + result: 'Option' + }, + NameData: { + value: 'Value', + owner: 'AccountId', + expiration: 'Option' + }, + Token: { + hash: 'H256', + symbol: 'Vec', + total_supply: 'Balance' + }, + OrderType: { + _enum: ['Buy', 'Sell'] + }, + OrderStatus: { + _enum: ['Created', 'PartialFilled', 'Filled', 'Canceled'] + }, + TradePair: { + hash: 'H256', + base: 'H256', + quote: 'H256', + buy_one_price: 'Option', + sell_one_price: 'Option', + latest_matched_price: 'Option', + one_day_trade_volume: 'Option', + one_day_highest_price: 'Option', + one_day_lowest_price: 'Option' + }, + Price: 'u128', + LimitOrder: { + hash: 'H256', + base: 'H256', + quote: 'H256', + owner: 'AccountId', + price: 'Price', + sell_amount: 'Balance', + buy_amount: 'Balance', + remained_sell_amount: 'Balance', + remained_buy_amount: 'Balance', + otype: 'OrderType', + status: 'OrderStatus' + }, + Trade: { + hash: 'H256', + base: 'H256', + quote: 'H256', + buyer: 'AccountId', + seller: 'AccountId', + maker: 'AccountId', + taker: 'AccountId', + otype: 'OrderType', + price: 'Price', + base_amount: 'Balance', + quote_amount: 'Balance' + }, + OrderLinkedItem: { + prev: 'Option', + next: 'Option', + price: 'Option', + orders: 'Vec' + }, + CollectionMode: { + _enum: { + Invalid: null, + NFT: 'u32', + Fungible: 'u32', + ReFungible: '(u32, u32)' + } + }, + NftItemType: { + Collection: 'u64', + Owner: 'AccountId', + Data: 'Vec', + item_hash: 'H160' + }, + FungibleItemType: { + Collection: 'u64', + Owner: 'AccountId', + value: 'u128' + }, + ApprovePermissions: { + approved: 'AccountId', + amount: 'u64' + }, + AccessMode: { + _enum: ['Normal', 'WhiteList'] + }, + SaleOrder: { + collection_id: 'u64', + item_id: 'u64', + value: 'u64', + owner: 'AccountId', + price: 'u64' + }, + SaleOrderHistory: { + collection_id: 'u64', + item_id: 'u64', + value: 'u64', + seller: 'AccountId', + buyer: 'AccountId', + price: 'u64', + buy_time: 'BlockNumber' + }, + SignatureAuthentication: { + collection: 'u64', + item: 'u64', + names: 'Name', + names_owner: 'AccountId', + sign_time: 'BlockNumber', + memo: 'Vec', + expiration: 'Option' + }, + Ownership: { + owner: 'AccountId', + fraction: 'u128' + }, + ReFungibleItemType: { + Collection: 'u64', + Owner: 'Vec', + Data: 'Vec' + }, + CollectionType: { + Owner: 'AccountId', + Mode: 'CollectionMode', + Access: 'u8', + DecimalPoints: 'u32', + Name: 'Vec', + Description: 'Vec', + TokenPrefix: 'Vec', + CustomDataSize: 'u32', + OffchainSchema: 'Vec', + Sponsor: 'AccountId', + UnconfirmedSponsor: 'AccountId' + }, + Auction: { + id: 'u64', + collection_id: 'u64', + item_id: 'u64', + value: 'u64', + owner: 'AccountId', + start_price: 'u64', + increment: 'u64', + current_price: 'u64', + start_time: 'BlockNumber', + end_time: 'BlockNumber' + }, + BidHistory: { + auction_id: 'u64', + bidder: 'AccountId', + bid_price: 'u64', + bid_time: 'BlockNumber' + }, + Pool: { + id: 'Id', + account: 'AccountId', + acc_rewards_per_share: 'Balance', + last_reward_block: 'BlockNumber', + asset_id: 'Id', + total_balance: 'Balance' + }, + Staker: { + amount: 'Balance', + reward: 'Balance', + debt: 'Balance' + } +}; diff --git a/packages/apps-config/src/endpoints/testing.ts b/packages/apps-config/src/endpoints/testing.ts index acfdcc5def..75f3c79ab1 100644 --- a/packages/apps-config/src/endpoints/testing.ts +++ b/packages/apps-config/src/endpoints/testing.ts @@ -203,6 +203,13 @@ export function createTesting (t: TFunction): LinkOption[] { providers: { ZERO: 'wss://alphaville-0.zero.io' } + }, + { + info: 'uniarts', + text: t('rpc.uniarts', 'Uniarts', { ns: 'apps-config' }), + providers: { + Uniarts: 'wss://testnet.uniarts.me' + } } ]); } diff --git a/packages/apps-config/src/ui/colors.ts b/packages/apps-config/src/ui/colors.ts index 4c5a34decd..6e010fe991 100644 --- a/packages/apps-config/src/ui/colors.ts +++ b/packages/apps-config/src/ui/colors.ts @@ -31,6 +31,7 @@ const chainWestend = '#da68a7'; const chainGalois = '#000000'; const chainZero = '#000000'; const chainJupiter = '#7143ff'; +const chainUniarts = '#b39ef7'; // based on node name // alphabetical @@ -84,7 +85,8 @@ export const chainColors: Record = [ ['Trick', chainRoccoTrick], ['Westend', chainWestend], ['Galois', chainGalois], - ['ZΞRO Alphaville', chainZero] + ['ZΞRO Alphaville', chainZero], + ['Uniarts', chainUniarts] ].reduce((colors, [chain, color]): Record => ({ ...colors, [chain.toLowerCase()]: color diff --git a/packages/apps-config/src/ui/logos/index.ts b/packages/apps-config/src/ui/logos/index.ts index 60ef12a081..1e21d95903 100644 --- a/packages/apps-config/src/ui/logos/index.ts +++ b/packages/apps-config/src/ui/logos/index.ts @@ -50,6 +50,7 @@ import nodeSora from './nodes/sora-substrate.svg'; import nodeStafi from './nodes/stafi.png'; import nodeSubsocial from './nodes/subsocial.svg'; import nodeSubstrate from './nodes/substrate-hexagon.svg'; +import nodeUniarts from './nodes/uniarts.png'; import nodeZero from './nodes/zero.svg'; // last-resort fallback, just something empty import emptyLogo from './empty.svg'; @@ -70,7 +71,8 @@ export const chainLogos: Record = [ ['Rococo', chainRococo], ['Tick', chainRococoTick], ['Track', chainRococoTrack], - ['Trick', chainRococoTrick] + ['Trick', chainRococoTrick], + ['Uniarts', nodeUniarts] ].reduce((logos, [chain, logo]): Record => ({ ...logos, [(chain as string).toLowerCase()]: logo @@ -118,7 +120,8 @@ export const nodeLogos: Record = [ ['substrate-node', nodeSubstrate], ['Equilibrium Node', nodeEquilibrium], ['Equilibrium', nodeEquilibrium], - ['SUBZΞRO', nodeZero] + ['SUBZΞRO', nodeZero], + ['Uniarts', nodeUniarts] ].reduce((logos, [node, logo]): Record => ({ ...logos, [(node as string).toLowerCase().replace(/-/g, ' ')]: logo @@ -172,6 +175,7 @@ export const namedLogos: Record = { stafi: nodeStafi, subsocial: nodeSubsocial, substrate: nodeSubstrate, + uniarts: nodeUniarts, westend: nodePolkadot, zero: nodeZero }; diff --git a/packages/apps-config/src/ui/logos/nodes/uniarts.png b/packages/apps-config/src/ui/logos/nodes/uniarts.png new file mode 100644 index 0000000000..6b063a5806 Binary files /dev/null and b/packages/apps-config/src/ui/logos/nodes/uniarts.png differ