├── utils ├── format │ ├── index.ts │ ├── number.ts │ ├── graffiti.ts │ ├── formatTimeSinceLastBlock.ts │ ├── timestamp.ts │ └── units.ts ├── downloadUrl.ts ├── isObject.ts ├── safeProp.ts ├── getAverageWithAccessor.ts ├── math.ts ├── hash.ts └── currency.ts ├── components ├── ChainTree │ ├── index.tsx │ ├── Node.module.scss │ ├── types.tsx │ ├── NodeLink.tsx │ ├── utils.tsx │ ├── Node.tsx │ ├── BlockPreview.tsx │ └── ChainTree.tsx ├── BlocksTable │ ├── index.tsx │ └── BlocksTable.tsx ├── TransactionsTable │ ├── index.tsx │ └── TransactionsTable.tsx ├── CardContainer │ └── index.tsx ├── Charts │ ├── ChartBox.tsx │ ├── UniqueGraffiti.tsx │ ├── BlockSize.tsx │ ├── BlockTime.tsx │ ├── Difficulty.tsx │ ├── TransactionVolume.tsx │ └── GeneralChart.tsx ├── InfoBadge.tsx ├── Layout │ ├── Layout.tsx │ ├── NavMenu.tsx │ ├── NavListOfLinks.tsx │ ├── Footer.tsx │ └── Navbar.tsx ├── TableCellTimeStamp.tsx ├── CopyValueToClipboard.tsx ├── index.tsx ├── BorderBox.tsx ├── HashView.tsx ├── TimeStamp.tsx ├── ErrorBoundary.tsx ├── CustomAssets │ ├── AssetTransactionChart │ │ └── AssetTransactionChart.tsx │ ├── AssetHistory │ │ └── AssetHistory.tsx │ ├── CustomAssetsTable │ │ └── CustomAssetsTable.tsx │ ├── NativeAsset │ │ └── NativeAsset.tsx │ ├── MintsBurnsList │ │ └── MintsBurnsList.tsx │ └── AssetInformationGrid │ │ └── AssetInformationGrid.tsx ├── RefreshButton.tsx ├── CardsView │ └── CardsView.tsx ├── CopyToClipboardButton.tsx ├── ExplorerCommonTable.tsx ├── Card │ └── Card.tsx ├── BlocksViewButtons │ └── index.tsx ├── NavSearch │ └── NavSearch.tsx ├── ColumnTable.tsx └── Breadcrumbs │ ├── Breadcrumbs.tsx │ └── BreadcrumbLink.tsx ├── public ├── favicon.ico ├── images │ ├── home_page_logo_black.png │ └── home_page_logo_purple.png └── font │ ├── regular │ ├── favorit-regular-webfont.eot │ ├── favorit-regular-webfont.ttf │ ├── favorit-regular-webfont.woff │ └── favorit-regular-webfont.woff2 │ ├── monoregular │ ├── favoritmono-regular-webfont.eot │ ├── favoritmono-regular-webfont.ttf │ ├── favoritmono-regular-webfont.woff │ └── favoritmono-regular-webfont.woff2 │ └── extendedregular │ ├── favoritextended-regular-webfont.eot │ ├── favoritextended-regular-webfont.ttf │ ├── favoritextended-regular-webfont.woff │ └── favoritextended-regular-webfont.woff2 ├── .env.template ├── .vscode └── settings.json ├── constants ├── AssetConstants.ts ├── BlockConstants.ts ├── RoutePaths.ts └── ExternalLinks.tsx ├── types ├── common │ ├── AsyncDataType.ts │ └── ResponseType.ts ├── parameters │ ├── AssetDescriptionApi.ts │ ├── TransactionsApi.ts │ └── BlocksApi.ts ├── domain │ ├── NodeVersionType.ts │ ├── TransactionType.ts │ ├── AssetDescriptionType.ts │ ├── BlockType.ts │ ├── Metric.ts │ └── AssetType.ts └── index.ts ├── .prettierrc ├── next-env.d.ts ├── icons ├── CheckIcon.tsx ├── CaretRightIcon.tsx └── CopyIcon.tsx ├── services ├── VersionService.ts ├── AssetService.ts ├── Service.ts ├── AssetDescriptionService.ts ├── TransactionService.ts └── BlockService.ts ├── svgx ├── SearchIcon.tsx ├── ListIcon.tsx ├── TreeIcon.tsx ├── OuterReferenceIcon.tsx ├── TelegramIcon.tsx ├── RefreshIcon.tsx ├── TwitterIcon.tsx ├── CloseDetailsIcon.tsx ├── FishIcon.tsx ├── DiscordIcon.tsx ├── RedditIcon.tsx ├── GitHubIcon.tsx ├── index.tsx ├── LargeArrowRightUp.tsx └── LargeArrowLeftDown.tsx ├── hooks ├── useBlockHead.tsx ├── useNodeVersion.tsx ├── useBlockBySeq.tsx ├── useAsset.ts ├── useTransactionByHash.tsx ├── useBlockHeadWithInterval.tsx ├── useAsyncDataWrapper.tsx ├── useBlock.tsx ├── useAssetDescriptions.ts ├── useBlocksMetrics.tsx ├── useBlocks.tsx ├── useBlocksSearch.tsx ├── useInfiniteBlocks.tsx └── useBidirectionalInfiniteScroll.tsx ├── .gitignore ├── tsconfig.json ├── .eslintrc.json ├── pages ├── 404.tsx ├── _app.tsx ├── _error.tsx ├── charts.tsx ├── assets │ ├── index.tsx │ └── [id].tsx ├── blocks │ ├── index.tsx │ └── [id].tsx └── chain-explorer │ └── index.tsx ├── styles └── globals.css ├── next.config.js ├── contexts └── ServiceContexts.tsx ├── package.json ├── package-scripts.js ├── README.md └── assets └── svg ├── info-circle.svg ├── burn-action.svg └── avatar.svg /utils/format/index.ts: -------------------------------------------------------------------------------- 1 | export * from './timestamp' 2 | export * from './number' 3 | -------------------------------------------------------------------------------- /components/ChainTree/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as ChainTree } from './ChainTree' 2 | -------------------------------------------------------------------------------- /components/BlocksTable/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as BlocksTable } from './BlocksTable' 2 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /components/TransactionsTable/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as TransactionsTable } from './TransactionsTable' 2 | -------------------------------------------------------------------------------- /.env.template: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_API_BASE_URL=https://api.ironfish.network 2 | NEXT_PUBLIC_STATS_URL=https://stats.ironfish.network/ 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.enablePromptUseWorkspaceTsdk": true, 3 | "typescript.tsdk": "node_modules/typescript/lib" 4 | } -------------------------------------------------------------------------------- /constants/AssetConstants.ts: -------------------------------------------------------------------------------- 1 | export const NATIVE_ASSET_ID = 2 | '51f33a2f14f92735e562dc658a5639279ddca3d5079a6d1242b2a588a9cbf44c' 3 | -------------------------------------------------------------------------------- /public/images/home_page_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/images/home_page_logo_black.png -------------------------------------------------------------------------------- /public/images/home_page_logo_purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/images/home_page_logo_purple.png -------------------------------------------------------------------------------- /public/font/regular/favorit-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/regular/favorit-regular-webfont.eot -------------------------------------------------------------------------------- /public/font/regular/favorit-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/regular/favorit-regular-webfont.ttf -------------------------------------------------------------------------------- /public/font/regular/favorit-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/regular/favorit-regular-webfont.woff -------------------------------------------------------------------------------- /public/font/regular/favorit-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/regular/favorit-regular-webfont.woff2 -------------------------------------------------------------------------------- /public/font/monoregular/favoritmono-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/monoregular/favoritmono-regular-webfont.eot -------------------------------------------------------------------------------- /public/font/monoregular/favoritmono-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/monoregular/favoritmono-regular-webfont.ttf -------------------------------------------------------------------------------- /public/font/monoregular/favoritmono-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/monoregular/favoritmono-regular-webfont.woff -------------------------------------------------------------------------------- /types/common/AsyncDataType.ts: -------------------------------------------------------------------------------- 1 | export interface AsyncDataProps { 2 | loaded: boolean 3 | data?: T 4 | error?: object 5 | } 6 | 7 | export default AsyncDataProps 8 | -------------------------------------------------------------------------------- /utils/downloadUrl.ts: -------------------------------------------------------------------------------- 1 | export const getDownloadUrl = (content: string, type: string): string => { 2 | return URL.createObjectURL(new Blob([content], { type })) 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "endOfLine": "lf", 4 | "semi": false, 5 | "singleQuote": true, 6 | "tabWidth": 2, 7 | "trailingComma": "es5" 8 | } 9 | -------------------------------------------------------------------------------- /public/font/monoregular/favoritmono-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/monoregular/favoritmono-regular-webfont.woff2 -------------------------------------------------------------------------------- /types/parameters/AssetDescriptionApi.ts: -------------------------------------------------------------------------------- 1 | export interface AssetDescriptionParameters { 2 | after?: number 3 | before?: number 4 | limit?: number 5 | asset: string 6 | } 7 | -------------------------------------------------------------------------------- /public/font/extendedregular/favoritextended-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/extendedregular/favoritextended-regular-webfont.eot -------------------------------------------------------------------------------- /public/font/extendedregular/favoritextended-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/extendedregular/favoritextended-regular-webfont.ttf -------------------------------------------------------------------------------- /public/font/extendedregular/favoritextended-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/extendedregular/favoritextended-regular-webfont.woff -------------------------------------------------------------------------------- /utils/isObject.ts: -------------------------------------------------------------------------------- 1 | export function isObject(value: unknown): boolean { 2 | const type = typeof value 3 | return value != null && (type === 'object' || type === 'function') 4 | } 5 | -------------------------------------------------------------------------------- /constants/BlockConstants.ts: -------------------------------------------------------------------------------- 1 | export const MAX_BLOCK_SIZE = 524288 2 | 3 | export enum BlockMetricGranularity { 4 | Day = 'day', 5 | Lifetime = 'lifetime', 6 | Total = 'total', 7 | } 8 | -------------------------------------------------------------------------------- /public/font/extendedregular/favoritextended-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iron-fish/block-explorer/HEAD/public/font/extendedregular/favoritextended-regular-webfont.woff2 -------------------------------------------------------------------------------- /utils/safeProp.ts: -------------------------------------------------------------------------------- 1 | import { curry, defaultTo, pipe, propOr } from 'ramda' 2 | 3 | export const safeProp = curry((property, x) => 4 | pipe(defaultTo({}), propOr('', property))(x) 5 | ) 6 | 7 | export default safeProp 8 | -------------------------------------------------------------------------------- /types/domain/NodeVersionType.ts: -------------------------------------------------------------------------------- 1 | export interface NodeVersionType { 2 | ironfish?: { 3 | object: string 4 | version: string 5 | created_at: string 6 | } 7 | } 8 | 9 | export default NodeVersionType 10 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /utils/getAverageWithAccessor.ts: -------------------------------------------------------------------------------- 1 | import { mean, defaultTo, pipe, curry, map } from 'ramda' 2 | 3 | export const getAverageWithAccessor = curry((accessor, data) => 4 | pipe(defaultTo([]), map(accessor), mean, Math.ceil)(data) 5 | ) 6 | -------------------------------------------------------------------------------- /types/common/ResponseType.ts: -------------------------------------------------------------------------------- 1 | export interface ResponseType { 2 | data: T 3 | metadata?: { 4 | has_next: boolean 5 | has_previous: boolean 6 | } 7 | object: string 8 | } 9 | 10 | export default ResponseType 11 | -------------------------------------------------------------------------------- /utils/math.ts: -------------------------------------------------------------------------------- 1 | export function floorTo(value: number, places: number): number { 2 | const multiplier = Math.pow(10, places) 3 | const adjusted = value * multiplier 4 | const truncated = adjusted < 0 ? Math.ceil(adjusted) : Math.floor(adjusted) 5 | return truncated / multiplier 6 | } 7 | -------------------------------------------------------------------------------- /types/parameters/TransactionsApi.ts: -------------------------------------------------------------------------------- 1 | export interface TransactionsParameters { 2 | after?: number 3 | before?: number 4 | limit?: number 5 | search?: string 6 | with_blocks?: boolean 7 | } 8 | 9 | export interface FindTransactionParameters { 10 | hash?: string 11 | with_blocks?: boolean 12 | } 13 | -------------------------------------------------------------------------------- /constants/RoutePaths.ts: -------------------------------------------------------------------------------- 1 | enum RoutePaths { 2 | Home = '/', 3 | Explorer = '/blocks', 4 | Assets = '/assets', 5 | AssetsInfo = '/assets/[id]', 6 | ChainExplorer = '/chain-explorer', 7 | TransactionInfo = '/transaction/[hash]', 8 | BlockInfo = '/blocks/[id]', 9 | Charts = '/charts', 10 | } 11 | 12 | export default RoutePaths 13 | -------------------------------------------------------------------------------- /utils/format/number.ts: -------------------------------------------------------------------------------- 1 | export const formatNumberWithLanguage = ( 2 | number: number | bigint | string, 3 | language?: string 4 | ) => { 5 | const value = Number(number) 6 | let localization = language 7 | if (!localization) { 8 | localization = 9 | typeof window !== 'undefined' ? window.navigator.language : 'en-US' 10 | } 11 | return value.toLocaleString(localization) 12 | } 13 | -------------------------------------------------------------------------------- /icons/CheckIcon.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from 'react' 2 | import { Icon, IconProps } from '@ironfish/ui-kit' 3 | 4 | const CheckIcon: FC = props => ( 5 | 6 | 7 | 8 | 9 | 10 | ) 11 | 12 | export default CheckIcon 13 | -------------------------------------------------------------------------------- /services/VersionService.ts: -------------------------------------------------------------------------------- 1 | import { NodeVersionType } from 'types' 2 | import Service from './Service' 3 | 4 | class VersionService extends Service { 5 | constructor() { 6 | super('/versions') 7 | } 8 | 9 | current(): Promise { 10 | return this.fetcher.get('') 11 | } 12 | 13 | toString(): string { 14 | return 'VersionService' 15 | } 16 | } 17 | 18 | export default VersionService 19 | -------------------------------------------------------------------------------- /services/AssetService.ts: -------------------------------------------------------------------------------- 1 | import { AssetType } from 'types' 2 | import Service from './Service' 3 | 4 | class AssetService extends Service { 5 | constructor() { 6 | super('/assets') 7 | } 8 | 9 | find(query: { id: string }): Promise { 10 | return this.fetcher.get('/find', { 11 | params: query, 12 | }) 13 | } 14 | 15 | toString(): string { 16 | return 'AssetService' 17 | } 18 | } 19 | 20 | export default AssetService 21 | -------------------------------------------------------------------------------- /services/Service.ts: -------------------------------------------------------------------------------- 1 | import axios, { AxiosInstance } from 'axios' 2 | 3 | class Service { 4 | fetcher: AxiosInstance 5 | 6 | constructor(baseUrl) { 7 | this.fetcher = axios.create({ 8 | baseURL: '/api' + baseUrl, 9 | }) 10 | this.fetcher.interceptors.response.use( 11 | response => response.data, 12 | error => Promise.reject(error) 13 | ) 14 | } 15 | 16 | toString(): string { 17 | return 'Service' 18 | } 19 | } 20 | 21 | export default Service 22 | -------------------------------------------------------------------------------- /types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common/AsyncDataType' 2 | export * from './domain/BlockType' 3 | export * from './domain/AssetType' 4 | export * from './domain/AssetDescriptionType' 5 | export * from './domain/Metric' 6 | export * from './domain/NodeVersionType' 7 | export * from './common/ResponseType' 8 | export * from './domain/TransactionType' 9 | 10 | export * from './parameters/BlocksApi' 11 | export * from './parameters/TransactionsApi' 12 | export * from './parameters/AssetDescriptionApi' 13 | -------------------------------------------------------------------------------- /utils/format/graffiti.ts: -------------------------------------------------------------------------------- 1 | const sanitizeString = (s: string): string => { 2 | return s.replace(/[\u0000-\u001F\u007F-\u009F]/g, '').trim() 3 | } 4 | 5 | export function formatGraffiti(graffiti?: string | null): string { 6 | const hexRegex = /^[0-9A-Fa-f]+$/g 7 | 8 | if (hexRegex.test(graffiti ?? '') && graffiti?.length === 64) { 9 | const asBuffer = Buffer.from(graffiti, 'hex') 10 | return sanitizeString(asBuffer.toString('utf8')) 11 | } 12 | 13 | return graffiti ?? '' 14 | } 15 | -------------------------------------------------------------------------------- /svgx/SearchIcon.tsx: -------------------------------------------------------------------------------- 1 | import { Icon } from '@ironfish/ui-kit' 2 | 3 | export function SearchIcon() { 4 | return ( 5 | 6 | 13 | 14 | 15 | ) 16 | } 17 | 18 | export default SearchIcon 19 | -------------------------------------------------------------------------------- /components/CardContainer/index.tsx: -------------------------------------------------------------------------------- 1 | import { Grid } from '@ironfish/ui-kit' 2 | 3 | export const CardContainer = ({ children }) => ( 4 | 15 | {children} 16 | 17 | ) 18 | 19 | export default CardContainer 20 | -------------------------------------------------------------------------------- /svgx/ListIcon.tsx: -------------------------------------------------------------------------------- 1 | import { Icon } from "@ironfish/ui-kit"; 2 | 3 | export function ListIcon(props) { 4 | return ( 5 | 6 | 7 | 8 | ); 9 | } 10 | 11 | export default ListIcon; 12 | -------------------------------------------------------------------------------- /svgx/TreeIcon.tsx: -------------------------------------------------------------------------------- 1 | import { Icon } from "@ironfish/ui-kit"; 2 | 3 | export function TreeIcon(props) { 4 | return ( 5 | 6 | 7 | 8 | ); 9 | } 10 | 11 | export default TreeIcon; 12 | -------------------------------------------------------------------------------- /utils/hash.ts: -------------------------------------------------------------------------------- 1 | export function truncateHash(hash: string, parts = 4, chars = 4): string { 2 | const result = [] 3 | if (hash && hash.length > chars) { 4 | const blockLength = (hash.length - chars) / (parts - 1) 5 | 6 | while (result.length < parts - 1) { 7 | const startPosition = result.length * blockLength 8 | result.push(hash.slice(startPosition, startPosition + chars)) 9 | } 10 | 11 | result.push(hash.slice(hash.length - chars, hash.length)) 12 | } 13 | 14 | return result.join('...') 15 | } 16 | -------------------------------------------------------------------------------- /components/Charts/ChartBox.tsx: -------------------------------------------------------------------------------- 1 | import { FC, ReactNode } from 'react' 2 | 3 | import BorderBox from 'components/BorderBox' 4 | 5 | interface ChartBoxProps { 6 | header: string 7 | average: string | number 8 | children: ReactNode 9 | } 10 | 11 | const ChartBox: FC = ({ header, average, children }) => { 12 | return ( 13 | 14 |

{header}

15 |
Daily Average: {average.toLocaleString()}
16 | {children} 17 |
18 | ) 19 | } 20 | 21 | export default ChartBox 22 | -------------------------------------------------------------------------------- /components/ChainTree/Node.module.scss: -------------------------------------------------------------------------------- 1 | .node_group { 2 | 3 | :hover>rect { 4 | stroke: #0d0c22; 5 | } 6 | 7 | [data-theme='dark'] & :hover>rect { 8 | stroke: #ffffff; 9 | } 10 | 11 | &__focused { 12 | rect { 13 | stroke: #0d0c22; 14 | } 15 | 16 | &:focus { 17 | outline: none; 18 | } 19 | } 20 | 21 | [data-theme='dark'] &__focused { 22 | rect { 23 | stroke: #ffffff; 24 | } 25 | 26 | &:focus { 27 | outline: none; 28 | } 29 | } 30 | 31 | g:focus { 32 | outline: none; 33 | } 34 | } -------------------------------------------------------------------------------- /utils/format/formatTimeSinceLastBlock.ts: -------------------------------------------------------------------------------- 1 | import intervalToDuration from 'date-fns/intervalToDuration' 2 | import formatDuration from 'date-fns/formatDuration' 3 | 4 | const BASE_DATE = new Date(0) 5 | 6 | export const formatTimeSinceLastBlock = (miningTimeInMs?: number) => { 7 | if (!miningTimeInMs) return '' 8 | 9 | if (miningTimeInMs < 1000) { 10 | return `${miningTimeInMs}ms` 11 | } 12 | 13 | const endDate = new Date(BASE_DATE.getTime() + miningTimeInMs) 14 | 15 | return formatDuration(intervalToDuration({ start: BASE_DATE, end: endDate })) 16 | } 17 | -------------------------------------------------------------------------------- /hooks/useBlockHead.tsx: -------------------------------------------------------------------------------- 1 | import { useContext, useEffect } from 'react' 2 | 3 | import { BlockContext } from 'contexts/ServiceContexts' 4 | import { BlockHead } from 'types' 5 | import useAsyncDataWrapper from './useAsyncDataWrapper' 6 | 7 | const useBlockHead = () => { 8 | const service = useContext(BlockContext) 9 | const [result, wrapper] = useAsyncDataWrapper() 10 | 11 | useEffect(() => { 12 | wrapper(service.head()) 13 | // eslint-disable-next-line react-hooks/exhaustive-deps 14 | }, []) 15 | return result 16 | } 17 | 18 | export default useBlockHead 19 | -------------------------------------------------------------------------------- /components/InfoBadge.tsx: -------------------------------------------------------------------------------- 1 | import { FC, ReactNode } from 'react' 2 | import { Badge, NAMED_COLORS, BadgeProps } from '@ironfish/ui-kit' 3 | 4 | interface InfoBadgeProps extends BadgeProps { 5 | message: ReactNode 6 | } 7 | 8 | const InfoBadge: FC = ({ message, ...rest }) => ( 9 | 18 |
{message}
19 |
20 | ) 21 | 22 | export default InfoBadge 23 | -------------------------------------------------------------------------------- /hooks/useNodeVersion.tsx: -------------------------------------------------------------------------------- 1 | import { useContext, useEffect } from 'react' 2 | 3 | import { VersionContext } from 'contexts/ServiceContexts' 4 | import { NodeVersionType } from 'types' 5 | import useAsyncDataWrapper from './useAsyncDataWrapper' 6 | 7 | const useNodeVersion = () => { 8 | const service = useContext(VersionContext) 9 | const [result, wrapper] = useAsyncDataWrapper() 10 | 11 | useEffect(() => { 12 | wrapper(service.current()) 13 | // eslint-disable-next-line react-hooks/exhaustive-deps 14 | }, []) 15 | return result 16 | } 17 | 18 | export default useNodeVersion 19 | -------------------------------------------------------------------------------- /services/AssetDescriptionService.ts: -------------------------------------------------------------------------------- 1 | import { 2 | AssetDescriptionParameters, 3 | AssetDescriptionType, 4 | ResponseType, 5 | } from 'types' 6 | import Service from './Service' 7 | 8 | export default class AssetDescriptionService extends Service { 9 | constructor() { 10 | super('/asset_descriptions') 11 | } 12 | 13 | get( 14 | query: AssetDescriptionParameters 15 | ): Promise> { 16 | return this.fetcher.get('', { 17 | params: query, 18 | }) 19 | } 20 | 21 | toString(): string { 22 | return 'AssetDescriptionService' 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /svgx/OuterReferenceIcon.tsx: -------------------------------------------------------------------------------- 1 | import { Icon, IconProps } from '@ironfish/ui-kit' 2 | 3 | export function OuterReferenceIcon(props: IconProps) { 4 | return ( 5 | 6 | 10 | 11 | ) 12 | } 13 | 14 | export default OuterReferenceIcon 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarnrc.yml 8 | .yarn 9 | 10 | # testing 11 | /coverage 12 | 13 | # next.js 14 | /.next/ 15 | /out/ 16 | 17 | # production 18 | /build 19 | 20 | # misc 21 | .DS_Store 22 | *.pem 23 | 24 | # debug 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | .pnpm-debug.log* 29 | 30 | # local env files 31 | .env.local 32 | .env.development.local 33 | .env.test.local 34 | .env.production.local 35 | 36 | # vercel 37 | .vercel 38 | tsconfig.tsbuildinfo 39 | .env 40 | -------------------------------------------------------------------------------- /svgx/TelegramIcon.tsx: -------------------------------------------------------------------------------- 1 | import { Icon, IconProps } from '@ironfish/ui-kit' 2 | 3 | export function TelegramIcon(props: IconProps) { 4 | return ( 5 | 6 | 10 | 11 | ) 12 | } 13 | 14 | export default TelegramIcon 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "target": "es5", 5 | "lib": ["dom", "dom.iterable", "esnext"], 6 | "allowJs": true, 7 | "skipLibCheck": true, 8 | "strict": false, 9 | "forceConsistentCasingInFileNames": true, 10 | "noEmit": true, 11 | "incremental": true, 12 | "esModuleInterop": true, 13 | "module": "esnext", 14 | "moduleResolution": "node", 15 | "resolveJsonModule": true, 16 | "isolatedModules": true, 17 | "jsx": "preserve", 18 | }, 19 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /components/Layout/Layout.tsx: -------------------------------------------------------------------------------- 1 | import { FC, ReactNode } from 'react' 2 | import Navbar from './Navbar' 3 | import Footer from './Footer' 4 | import { Box } from '@ironfish/ui-kit' 5 | 6 | const Layout: FC<{ children: ReactNode }> = ({ children }) => ( 7 | <> 8 | 9 |
10 | 16 | {children} 17 | 18 |
19 |