Skip to content

Commit

Permalink
Add Polkadot (#233)
Browse files Browse the repository at this point in the history
* Add Polkadot

* add missing pieces

* lint & format

* fix next.config.js

* fixes

* lint
  • Loading branch information
Szegoo authored Sep 19, 2024
1 parent f43621d commit 2399251
Show file tree
Hide file tree
Showing 19 changed files with 1,133 additions and 108 deletions.
11 changes: 7 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
WS_ROCOCO_CORETIME_CHAIN="WSS endpoint of the coretime chain on Rococo"
WS_POLKADOT_CORETIME_CHAIN="WSS endpoint of the coretime chain on Polkadot"
WS_KUSAMA_CORETIME_CHAIN="WSS endpoint of the coretime chain on Kusama"
WS_ROCOCO_CORETIME_CHAIN="WSS endpoint of the coretime chain on Rococo"
WS_WESTEND_CORETIME_CHAIN="WSS endpiont of the coretime chain on Westend"

WS_ROCOCO_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Rococo"
WS_POLKADOT_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Polkadot"
WS_KUSAMA_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Kusama"
WS_ROCOCO_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Rococo"
WS_WESTEND_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Westend"

WS_REGIONX_COCOS_CHAIN="WSS endpoint of the regionx chain"

POLKADOT_CORETIME_INDEXER="Subquery indexer for Polkadot Coretime"
ROCOCO_CORETIME_INDEXER="Subquery indexer for Rococo Coretime"
KUSAMA_CORETIME_INDEXER="Subquery indexer for Kusama Coretime"
COCOS_INDEXER="Subquery indexer for RegionX Cocos"

ROCOCO_CORETIME_DICT="Subquery dictionary for Rococo Coretime"
POLKADOT_CORETIME_DICT="Subquery dictionary for Polkadot Coretime"
KUSAMA_CORETIME_DICT="Subquery dictionary for Kusama Coretime"
ROCOCO_CORETIME_DICT="Subquery dictionary for Rococo Coretime"

EXPERIMENTAL=false
12 changes: 8 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ const nextConfig = {
domains: ['github.com'],
},
env: {
WS_ROCOCO_CORETIME_CHAIN: process.env.WS_ROCOCO_CORETIME_CHAIN || '',
WS_POLKADOT_CORETIME_CHAIN: process.env.WS_POLKADOT_CORETIME_CHAIN || '',
WS_KUSAMA_CORETIME_CHAIN: process.env.WS_KUSAMA_CORETIME_CHAIN || '',
WS_ROCOCO_CORETIME_CHAIN: process.env.WS_ROCOCO_CORETIME_CHAIN || '',
WS_WESTEND_CORETIME_CHAIN: process.env.WS_WESTEND_CORETIME_CHAIN || '',

COCOS_INDEXER: process.env.COCOS_INDEXER || '',

ROCOCO_CORETIME_INDEXER: process.env.ROCOCO_CORETIME_INDEXER || '',
POLKADOT_CORETIME_INDEXER: process.env.POLKADOT_CORETIME_INDEXER || '',
KUSAMA_CORETIME_INDEXER: process.env.KUSAMA_CORETIME_INDEXER || '',
ROCOCO_CORETIME_INDEXER: process.env.ROCOCO_CORETIME_INDEXER || '',
SUBSCAN_CORETIME_WESTEND_INDEXER: process.env.SUBSCAN_CORETIME_WESTEND_INDEXER || '',

ROCOCO_CORETIME_DICT: process.env.ROCOCO_CORETIME_DICT || '',
POLKADOT_CORETIME_DICT: process.env.POLKADOT_CORETIME_DICT || '',
KUSAMA_CORETIME_DICT: process.env.KUSAMA_CORETIME_DICT || '',
ROCOCO_CORETIME_DICT: process.env.ROCOCO_CORETIME_DICT || '',
SUBSCAN_CORETIME_WESTEND_DICT: process.env.SUBSCAN_CORETIME_WESTEND_DICT || '',

WS_REGIONX_COCOS_CHAIN: process.env.WS_REGIONX_COCOS_CHAIN || '',

WS_ROCOCO_RELAY_CHAIN: process.env.WS_ROCOCO_RELAY_CHAIN,
WS_POLKADOT_RELAY_CHAIN: process.env.WS_KUSAMA_RELAY_CHAIN,
WS_KUSAMA_RELAY_CHAIN: process.env.WS_KUSAMA_RELAY_CHAIN,
WS_ROCOCO_RELAY_CHAIN: process.env.WS_ROCOCO_RELAY_CHAIN,
WS_WESTEND_RELAY_CHAIN: process.env.WS_WESTEND_RELAY_CHAIN,

EXPERIMENTAL: process.env.EXPERIMENTAL,
Expand Down
3 changes: 2 additions & 1 deletion src/assets/networks/coretime/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import KusamaCoretime from './kusama.png';
import PolkadotCoretime from './polkadot.png';
import RococoCoretime from './rococo.png';
import WestendCoretime from './westend.png';

export { KusamaCoretime, RococoCoretime, WestendCoretime };
export { KusamaCoretime, PolkadotCoretime, RococoCoretime, WestendCoretime };
Binary file added src/assets/networks/coretime/polkadot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/assets/networks/relay/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Kusama from './kusama.png';
import Polkadot from './polkadot.png';
import Rococo from './rococo.png';
import Westend from './westend.png';

export { Kusama, Rococo, Westend };
export { Kusama, Polkadot, Rococo, Westend };
Binary file added src/assets/networks/relay/polkadot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/networks/relay/westend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/chaindata/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NetworkType } from '@/models';

import KusamaChains from './kusama';
import leases from './leases.json';
import PolkadotChains from './polkadot';
import RococoChains from './rococo';
import { BaseChainInfo, ChainDetails } from './types';
import WestendChains from './westend';
Expand All @@ -15,6 +16,7 @@ const transformData = (data: ChainDetails[]): Record<number, BaseChainInfo> => {
};

const chainData: Record<NetworkType, Record<number, BaseChainInfo>> = {
[NetworkType.POLKADOT]: transformData(PolkadotChains),
[NetworkType.KUSAMA]: transformData(KusamaChains),
[NetworkType.ROCOCO]: transformData(RococoChains),
[NetworkType.WESTEND]: transformData(WestendChains),
Expand Down
Loading

0 comments on commit 2399251

Please sign in to comment.