Skip to content

Commit

Permalink
Merge branch 'master' into add-mimir
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo authored Oct 22, 2024
2 parents 4a98735 + cb76597 commit 2f52f3c
Show file tree
Hide file tree
Showing 109 changed files with 1,341 additions and 1,834 deletions.
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
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_PASEO_CORETIME_CHAIN="WSS endpoint of the coretime chain on Paseo"
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_POLKADOT_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Polkadot"
WS_KUSAMA_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Kusama"
WS_PASEO_RELAY_CHAIN="WSS endpoint of the coretime relay chain - Paseo"
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"
WS_REGIONX_COCOS_CHAIN="WSS endpoint of the regionx rococo chain"
WS_REGIONX_PASEO_CHAIN="WSS endpoint of the regionx paseo chain"

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

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

EXPERIMENTAL=false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The environment variables are automatically set in the Dockerfile; however, if y
```.env
WS_KUSAMA_RELAY_CHAIN="ws://127.0.0.1:9900"
WS_KUSAMA_CORETIME_CHAIN="ws://127.0.0.1:9910"
WS_REGIONX_COCOS_CHAIN="ws://127.0.0.1:9920"
WS_REGIONX_PASEO_CHAIN="ws://127.0.0.1:9920"
EXPERIMENTAL=true
```

Expand Down
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,31 @@ const nextConfig = {
env: {
WS_POLKADOT_CORETIME_CHAIN: process.env.WS_POLKADOT_CORETIME_CHAIN || '',
WS_KUSAMA_CORETIME_CHAIN: process.env.WS_KUSAMA_CORETIME_CHAIN || '',
WS_PASEO_CORETIME_CHAIN: process.env.WS_PASEO_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 || '',
REGIONX_PASEO_INDEXER: process.env.REGIONX_PASEO_INDEXER || '',

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

POLKADOT_CORETIME_DICT: process.env.POLKADOT_CORETIME_DICT || '',
KUSAMA_CORETIME_DICT: process.env.KUSAMA_CORETIME_DICT || '',
PASEO_CORETIME_DICT: process.env.PASEO_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_REGIONX_PASEO_CHAIN: process.env.WS_REGIONX_PASEO_CHAIN || '',

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

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@polkadot/ui-keyring": "3.6.6",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"@region-x/components": "^0.1.20",
"@types/humanize-duration": "^3.27.3",
"@vercel/analytics": "^1.2.2",
"apexcharts": "^3.49.1",
Expand Down
Binary file modified public/android-chrome-192x192.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 added public/android-chrome-384x384.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 removed public/android-chrome-512x512.png
Binary file not shown.
Binary file modified public/apple-touch-icon.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 public/favicon-16x16.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 public/favicon-32x32.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 public/favicon.ico
Binary file not shown.
20 changes: 19 additions & 1 deletion public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
34 changes: 5 additions & 29 deletions src/apis/orders.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fetchGraphql } from '@/utils/fetchGraphql';

import { API_COCOS_INDEXER } from '@/consts';
import { API_REGIONX_PASEO_INDEXER } from '@/consts';
import { Address, ApiResponse } from '@/models';

export const fetchUserContribution = async (
Expand All @@ -22,7 +22,8 @@ export const fetchUserContribution = async (
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query);
// TODO: don't hardcode the regionx paseo indexer.
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query);
};

export const fetchOrders = async (after: string | null): Promise<ApiResponse> => {
Expand All @@ -45,32 +46,7 @@ export const fetchOrders = async (after: string | null): Promise<ApiResponse> =>
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query);
};

export const fetchCocosRegions = async (
after: string | null,
filter?: any
): Promise<ApiResponse> => {
const query = `
query ($after: Cursor, $filter: RegionFilter){
regions(
after: $after
filter: $filter
) {
nodes {
begin
end
core
mask
}
pageInfo {
hasNextPage
endCursor
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query, { filter, after });
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query);
};

export const fetchProcessedOrders = async (
Expand All @@ -96,5 +72,5 @@ export const fetchProcessedOrders = async (
}
}
}`;
return fetchGraphql(API_COCOS_INDEXER, query);
return fetchGraphql(API_REGIONX_PASEO_INDEXER, query);
};
2 changes: 1 addition & 1 deletion src/assets/chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/config.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/dollar.png
Binary file not shown.
Binary file removed src/assets/graph.png
Binary file not shown.
Binary file removed src/assets/list.png
Binary file not shown.
1 change: 1 addition & 0 deletions src/assets/logos/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export { chainsMangataPNG } from './mangataPNG';
export { chainsMangataxPNG } from './mangataxPNG';
export { chainsMoonsamaPNG } from './moonsamaPNG';
export { chainsMyriadPNG } from './myriadPNG';
export { chainsMyxcavPNG } from './myxcavPNG';
export { chainsNeurowebTestnetPNG } from './neuroweb-testnetPNG';
export { chainsNeurowebPNG } from './neurowebPNG';
export { chainsOakPNG } from './oakPNG';
Expand Down
Loading

0 comments on commit 2f52f3c

Please sign in to comment.