├── packages ├── ui │ ├── index.ts │ ├── tsconfig.json │ ├── icons │ │ ├── asset │ │ │ ├── pha.png │ │ │ └── vpha.png │ │ └── chain │ │ │ ├── khala.png │ │ │ ├── phala.png │ │ │ └── ethereum.png │ └── package.json ├── lib │ ├── tsconfig.json │ ├── src │ │ ├── sleep.ts │ │ ├── getDecimalPattern.ts │ │ ├── trimAddress.ts │ │ ├── JotaiDevTools.tsx │ │ ├── transformSs58Format.ts │ │ ├── toPercentage.ts │ │ ├── compactFormat.ts │ │ ├── toFixed.ts │ │ ├── toCurrency.ts │ │ ├── useTimeout.ts │ │ ├── useInterval.ts │ │ ├── validateAddress.ts │ │ ├── index.ts │ │ └── useConnectPolkadotWallet.ts │ └── package.json └── store │ ├── tsconfig.json │ ├── src │ ├── index.ts │ ├── walletAtoms.ts │ └── polkadotAccountAtoms.ts │ └── package.json ├── apps └── app │ ├── README.md │ ├── types │ └── reset.d.ts │ ├── .gitignore │ ├── app │ ├── icon.ico │ ├── apple-icon.png │ ├── icon-192.png │ ├── icon-512.png │ ├── not-found.tsx │ ├── staking │ │ ├── page.tsx │ │ └── content.tsx │ ├── page.tsx │ ├── khala-assets │ │ ├── page.tsx │ │ └── content.tsx │ ├── gpu-mining │ │ ├── page.tsx │ │ └── content.tsx │ ├── manifest.ts │ ├── layout.tsx │ ├── providers.tsx │ └── content.tsx │ ├── store │ └── ui.ts │ ├── assets │ ├── powered_by_slpx.png │ ├── phala_logo.svg │ ├── khala_claimer_abi.ts │ ├── dephy.svg │ ├── phala_claimer_abi.ts │ └── pha_vault_abi.ts │ ├── hooks │ ├── use-valid-connection.ts │ ├── use-add-token-to-wallet.ts │ ├── use-notice.tsx │ ├── staking.ts │ └── khala-assets.ts │ ├── components │ ├── polkadot-provider.tsx │ ├── layout.tsx │ ├── snackbar-provider.tsx │ ├── scroll-top.tsx │ ├── page-header.tsx │ ├── wallet-button.tsx │ ├── metamask-button.tsx │ ├── gradient-text.tsx │ ├── chain-badge.tsx │ ├── wrap-decimal.tsx │ ├── web3-provider.tsx │ ├── switch-chain-button.tsx │ ├── staking │ │ ├── index.tsx │ │ ├── staking-stats.tsx │ │ ├── unstake.tsx │ │ └── stake.tsx │ ├── footer.tsx │ ├── property.tsx │ ├── quick-actions.tsx │ ├── portfolio-summary.tsx │ ├── metamask-icon.tsx │ ├── top-bar │ │ └── index.tsx │ ├── wallet-dialog.tsx │ ├── asset-card.tsx │ └── claim-assets.tsx │ ├── config.ts │ ├── tsconfig.json │ ├── lib │ ├── styles.ts │ ├── wagmi.ts │ └── theme.ts │ ├── next.config.ts │ └── package.json ├── README.md ├── lefthook.yml ├── turbo.json ├── .github └── workflows │ └── ci.yml ├── tsconfig.base.json ├── package.json ├── .vscode └── settings.json ├── biome.json └── .gitignore /packages/ui/index.ts: -------------------------------------------------------------------------------- 1 | export type {} 2 | -------------------------------------------------------------------------------- /apps/app/README.md: -------------------------------------------------------------------------------- 1 | # [Phala App](https://app.phala.network) 2 | -------------------------------------------------------------------------------- /apps/app/types/reset.d.ts: -------------------------------------------------------------------------------- 1 | import '@total-typescript/ts-reset' 2 | -------------------------------------------------------------------------------- /apps/app/.gitignore: -------------------------------------------------------------------------------- 1 | # Sentry Config File 2 | .env.sentry-build-plugin 3 | -------------------------------------------------------------------------------- /packages/lib/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/store/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json" 3 | } 4 | -------------------------------------------------------------------------------- /apps/app/app/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/apps/app/app/icon.ico -------------------------------------------------------------------------------- /apps/app/app/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/apps/app/app/apple-icon.png -------------------------------------------------------------------------------- /apps/app/app/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/apps/app/app/icon-192.png -------------------------------------------------------------------------------- /apps/app/app/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/apps/app/app/icon-512.png -------------------------------------------------------------------------------- /apps/app/store/ui.ts: -------------------------------------------------------------------------------- 1 | import {atom} from 'jotai' 2 | 3 | export const walletDialogOpenAtom = atom(false) 4 | -------------------------------------------------------------------------------- /packages/store/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './polkadotAccountAtoms' 2 | export * from './walletAtoms' 3 | -------------------------------------------------------------------------------- /packages/ui/icons/asset/pha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/packages/ui/icons/asset/pha.png -------------------------------------------------------------------------------- /packages/ui/icons/asset/vpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/packages/ui/icons/asset/vpha.png -------------------------------------------------------------------------------- /packages/ui/icons/chain/khala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/packages/ui/icons/chain/khala.png -------------------------------------------------------------------------------- /packages/ui/icons/chain/phala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/packages/ui/icons/chain/phala.png -------------------------------------------------------------------------------- /apps/app/assets/powered_by_slpx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/apps/app/assets/powered_by_slpx.png -------------------------------------------------------------------------------- /packages/ui/icons/chain/ethereum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Phala-Network/apps/HEAD/packages/ui/icons/chain/ethereum.png -------------------------------------------------------------------------------- /apps/app/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | import {redirect} from 'next/navigation' 2 | 3 | export default function NotFound() { 4 | redirect('/') 5 | } 6 | -------------------------------------------------------------------------------- /packages/lib/src/sleep.ts: -------------------------------------------------------------------------------- 1 | export const sleep = async (ms: number): Promise => { 2 | await new Promise((resolve) => setTimeout(resolve, ms)) 3 | } 4 | -------------------------------------------------------------------------------- /packages/lib/src/getDecimalPattern.ts: -------------------------------------------------------------------------------- 1 | const getDecimalPattern = (decimals: number): string => 2 | `^[0-9]+\\.?[0-9]{0,${decimals}}$` 3 | 4 | export default getDecimalPattern 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Phala Network Apps 2 | 3 | [![Discord](https://img.shields.io/discord/697726436211163147?color=%235865F2&label=discord&style=for-the-badge)](https://discord.gg/phala-network) 4 | -------------------------------------------------------------------------------- /packages/lib/src/trimAddress.ts: -------------------------------------------------------------------------------- 1 | const trimAddress = (str: string, start = 4, end = 6): string => { 2 | if (str.length < start + end) return str 3 | 4 | return `${str.slice(0, start)}…${str.slice(-end)}` 5 | } 6 | 7 | export default trimAddress 8 | -------------------------------------------------------------------------------- /lefthook.yml: -------------------------------------------------------------------------------- 1 | pre-commit: 2 | commands: 3 | check: 4 | glob: '*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}' 5 | run: bunx biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again 6 | -------------------------------------------------------------------------------- /packages/lib/src/JotaiDevTools.tsx: -------------------------------------------------------------------------------- 1 | import {DevTools} from 'jotai-devtools' 2 | import 'jotai-devtools/styles.css' 3 | import type {FC} from 'react' 4 | 5 | const JotaiDevTools: FC = () => { 6 | return 7 | } 8 | 9 | export default JotaiDevTools 10 | -------------------------------------------------------------------------------- /packages/ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@phala/ui", 3 | "version": "0.0.1", 4 | "sideEffects": false, 5 | "main": "index.ts", 6 | "files": [ 7 | "icons" 8 | ], 9 | "scripts": { 10 | "check": "tsc --project ./tsconfig.json --noEmit" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/app/app/staking/page.tsx: -------------------------------------------------------------------------------- 1 | import type {Metadata} from 'next' 2 | 3 | import StakingContent from './content' 4 | 5 | export const metadata: Metadata = { 6 | title: 'Staking', 7 | description: 'Stake PHA tokens on Ethereum with SLPx', 8 | } 9 | 10 | export default function StakingPage() { 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /packages/lib/src/transformSs58Format.ts: -------------------------------------------------------------------------------- 1 | import {decodeAddress, encodeAddress} from '@polkadot/keyring' 2 | 3 | const transformSs58Format = (address: string, ss58Format: number): string => { 4 | try { 5 | return encodeAddress(decodeAddress(address), ss58Format) 6 | } catch (err) { 7 | return '' 8 | } 9 | } 10 | 11 | export default transformSs58Format 12 | -------------------------------------------------------------------------------- /apps/app/hooks/use-valid-connection.ts: -------------------------------------------------------------------------------- 1 | import {useConnection} from 'wagmi' 2 | 3 | import {ethChain} from '@/config' 4 | 5 | export function useValidConnection() { 6 | const {address, chainId, isConnected} = useConnection() 7 | const isValidConnection = isConnected && chainId === ethChain.id 8 | 9 | return {address, isConnected, chainId, isValidConnection} 10 | } 11 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "tasks": { 4 | "build": { 5 | "dependsOn": ["^build"], 6 | "outputs": [ 7 | "out/**", 8 | ".next/**", 9 | "build/**", 10 | ".svelte-kit/**", 11 | ".vercel/**" 12 | ], 13 | "env": ["NODE_ENV", "VERCEL_ENV"] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/app/app/page.tsx: -------------------------------------------------------------------------------- 1 | import type {Metadata} from 'next' 2 | 3 | import HomeContent from './content' 4 | 5 | export const metadata: Metadata = { 6 | title: 'Portfolio | Phala Network App', 7 | description: 8 | 'Manage your PHA assets - stake, bridge, swap and claim your Phala tokens', 9 | } 10 | 11 | export default function HomePage() { 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /apps/app/app/khala-assets/page.tsx: -------------------------------------------------------------------------------- 1 | import type {Metadata} from 'next' 2 | 3 | import KhalaAssetsContent from './content' 4 | 5 | export const metadata: Metadata = { 6 | title: 'Claim Phala/Khala Assets', 7 | description: 8 | 'Claim your Phala and Khala assets on Ethereum after chain termination.', 9 | } 10 | 11 | export default function KhalaAssetsPage() { 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /apps/app/app/gpu-mining/page.tsx: -------------------------------------------------------------------------------- 1 | import type {Metadata} from 'next' 2 | 3 | import GpuMiningContent from './content' 4 | 5 | export const metadata: Metadata = { 6 | title: 'GPU Mining', 7 | description: 8 | 'Start mining with your GPU on the Phala Network. Manage stake pools and monitor mining operations.', 9 | } 10 | 11 | export default function GpuMiningPage() { 12 | return 13 | } 14 | -------------------------------------------------------------------------------- /packages/lib/src/toPercentage.ts: -------------------------------------------------------------------------------- 1 | import Decimal from 'decimal.js' 2 | 3 | import {toFixed} from './toFixed' 4 | 5 | export function toPercentage( 6 | value: Decimal | string | number | null | undefined, 7 | fractionDigits = 2, 8 | ): string | undefined | null { 9 | if (value == null) return null 10 | const decimal = new Decimal(value) 11 | 12 | return `${toFixed(decimal.times(100), fractionDigits)}%` 13 | } 14 | -------------------------------------------------------------------------------- /packages/lib/src/compactFormat.ts: -------------------------------------------------------------------------------- 1 | import type Decimal from 'decimal.js' 2 | 3 | const compactFormat = ( 4 | value: Decimal | number, 5 | maximumFractionDigits = 2, 6 | ): string => { 7 | return Intl.NumberFormat('en-US', { 8 | notation: 'compact', 9 | maximumFractionDigits, 10 | }).format( 11 | typeof value === 'number' ? value : BigInt(value.floor().toString()), 12 | ) 13 | } 14 | 15 | export default compactFormat 16 | -------------------------------------------------------------------------------- /packages/lib/src/toFixed.ts: -------------------------------------------------------------------------------- 1 | import Decimal from 'decimal.js' 2 | 3 | export function toFixed( 4 | value: number | Decimal | string, 5 | fractionDigits = 4, 6 | ): string { 7 | const decimalValue = new Decimal(value) 8 | // NOTE: https://stackoverflow.com/a/63988968/7920298 9 | const str = decimalValue.toFixed(fractionDigits, Decimal.ROUND_DOWN) 10 | if (fractionDigits > 0) { 11 | return str.replace(/(\.0+|0+)$/, '') 12 | } 13 | 14 | return str 15 | } 16 | -------------------------------------------------------------------------------- /apps/app/components/polkadot-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import {useConnectPolkadotWallet} from '@phala/lib' 4 | import type {FC, ReactNode} from 'react' 5 | 6 | import WalletDialog from './wallet-dialog' 7 | 8 | const PolkadotProvider: FC<{children: ReactNode}> = ({children}) => { 9 | useConnectPolkadotWallet('Phala App', 30) 10 | 11 | return ( 12 | <> 13 | {children} 14 | 15 | 16 | ) 17 | } 18 | 19 | export default PolkadotProvider 20 | -------------------------------------------------------------------------------- /packages/store/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@phala/store", 3 | "version": "0.0.1", 4 | "sideEffects": false, 5 | "type": "module", 6 | "main": "src/index.ts", 7 | "scripts": { 8 | "check": "tsc --project ./tsconfig.json --noEmit" 9 | }, 10 | "peerDependencies": { 11 | "@talismn/connect-wallets": "^1", 12 | "jotai": "^2", 13 | "react": ">=17" 14 | }, 15 | "peerDependenciesMeta": { 16 | "@talismn/connect-wallets": { 17 | "optional": true 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/lib/src/toCurrency.ts: -------------------------------------------------------------------------------- 1 | import Decimal from 'decimal.js' 2 | 3 | import {toFixed} from './toFixed' 4 | 5 | export function toCurrency( 6 | value: Decimal | string | number, 7 | fractionDigits = 2, 8 | ): string { 9 | const fixedValue = toFixed( 10 | typeof value === 'string' ? new Decimal(value) : value, 11 | fractionDigits, 12 | ) 13 | 14 | const n = fixedValue 15 | const p = n.indexOf('.') 16 | return n.replace(/\d(?=(?:\d{3})+(?:\.|$))/g, (m, i) => 17 | p < 0 || i < p ? `${m},` : m, 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /packages/lib/src/useTimeout.ts: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import {useEffect, useRef} from 'react' 3 | 4 | export const useTimeout = ( 5 | callback: () => void, 6 | delay: number | null, 7 | ): void => { 8 | const savedCallback = useRef(callback) 9 | savedCallback.current = callback 10 | useEffect(() => { 11 | if (delay == null) { 12 | return 13 | } 14 | const id = setTimeout(() => { 15 | savedCallback.current() 16 | }, delay) 17 | return () => { 18 | clearTimeout(id) 19 | } 20 | }, [delay]) 21 | } 22 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | name: Test 15 | runs-on: ubuntu-latest 16 | env: 17 | TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} 18 | TURBO_TEAM: ${{ secrets.TURBO_TEAM }} 19 | 20 | steps: 21 | - uses: actions/checkout@v4 22 | - uses: oven-sh/setup-bun@v2 23 | - run: bun install --frozen-lockfile 24 | - run: bunx biome ci . 25 | -------------------------------------------------------------------------------- /packages/lib/src/useInterval.ts: -------------------------------------------------------------------------------- 1 | 'use client' 2 | import {useEffect, useRef} from 'react' 3 | 4 | export const useInterval = ( 5 | callback: () => void, 6 | delay: number | null, 7 | ): void => { 8 | const savedCallback = useRef(callback) 9 | savedCallback.current = callback 10 | useEffect(() => { 11 | if (delay == null) { 12 | return 13 | } 14 | const id = setInterval(() => { 15 | savedCallback.current() 16 | }, delay) 17 | return () => { 18 | clearInterval(id) 19 | } 20 | }, [delay]) 21 | } 22 | -------------------------------------------------------------------------------- /packages/lib/src/validateAddress.ts: -------------------------------------------------------------------------------- 1 | import {decodeAddress, encodeAddress} from '@polkadot/keyring' 2 | import {hexToU8a, isHex} from '@polkadot/util' 3 | 4 | // https://polkadot.js.org/docs/util-crypto/examples/validate-address 5 | export const validateAddress = (address: string): boolean => { 6 | // forbid public key 7 | if (address.startsWith('0x')) return false 8 | try { 9 | encodeAddress(isHex(address) ? hexToU8a(address) : decodeAddress(address)) 10 | 11 | return true 12 | } catch (error) { 13 | return false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/app/assets/phala_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/store/src/walletAtoms.ts: -------------------------------------------------------------------------------- 1 | import type {Wallet} from '@talismn/connect-wallets' 2 | import {atom} from 'jotai' 3 | import {atomWithStorage} from 'jotai/utils' 4 | 5 | export const walletNameAtom = atomWithStorage( 6 | 'jotai:wallet_name', 7 | null, 8 | ) 9 | 10 | const originalWalletAtom = atom(null) 11 | export const walletAtom = atom( 12 | (get) => get(originalWalletAtom), 13 | (_get, set, newWallet: Wallet | null) => { 14 | set(originalWalletAtom, newWallet) 15 | set(walletNameAtom, newWallet != null ? newWallet.title : null) 16 | }, 17 | ) 18 | -------------------------------------------------------------------------------- /packages/lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@phala/lib", 3 | "version": "0.0.1", 4 | "sideEffects": false, 5 | "type": "module", 6 | "main": "src/index.ts", 7 | "scripts": { 8 | "check": "tsc --project ./tsconfig.json --noEmit" 9 | }, 10 | "dependencies": { 11 | "@polkadot/keyring": "^13.3.1", 12 | "@polkadot/util": "^13.3.1", 13 | "decimal.js": "^10.4.3" 14 | }, 15 | "peerDependencies": { 16 | "@phala/store": "workspace:*", 17 | "@polkadot/api": ">=15", 18 | "@polkadot/types": ">=15", 19 | "@talismn/connect-wallets": "^1", 20 | "jotai": "^2", 21 | "react": ">=18" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/app/config.ts: -------------------------------------------------------------------------------- 1 | import {mainnet} from 'wagmi/chains' 2 | 3 | export const ethChain = mainnet 4 | export const explorerUrl = ethChain.blockExplorers.default.url 5 | 6 | export const PHA_CONTRACT_ADDRESS = '0x6c5bA91642F10282b576d91922Ae6448C9d52f4E' 7 | export const VAULT_CONTRACT_ADDRESS = 8 | '0x21d6eC8fc14CaAcc55aFA23cBa66798DAB3a0ec0' 9 | export const L2_VPHA_CONTRACT_ADDRESS = 10 | '0xFdCEBD2E111D64Fc8a682703Eac62918093ec856' 11 | export const KHALA_CLAIMER_CONTRACT_ADDRESS = 12 | '0xa139F849000C5438855032eBFeed9Ee104023a73' 13 | export const PHALA_CLAIMER_CONTRACT_ADDRESS = 14 | '0x8b6d7AB0BE8d1f6AE40738C4CFF75134110a777F' 15 | -------------------------------------------------------------------------------- /packages/lib/src/index.ts: -------------------------------------------------------------------------------- 1 | export {default as compactFormat} from './compactFormat' 2 | export {default as getDecimalPattern} from './getDecimalPattern' 3 | export {default as JotaiDevTools} from './JotaiDevTools' 4 | export * from './sleep' 5 | export * from './toCurrency' 6 | export * from './toFixed' 7 | export * from './toPercentage' 8 | export {default as transformSs58Format} from './transformSs58Format' 9 | export {default as trimAddress} from './trimAddress' 10 | export {useConnectPolkadotWallet} from './useConnectPolkadotWallet' 11 | export {useInterval} from './useInterval' 12 | export {useTimeout} from './useTimeout' 13 | export * from './validateAddress' 14 | -------------------------------------------------------------------------------- /apps/app/app/manifest.ts: -------------------------------------------------------------------------------- 1 | import type {MetadataRoute} from 'next' 2 | 3 | export default function manifest(): MetadataRoute.Manifest { 4 | return { 5 | name: 'Phala App', 6 | short_name: 'Phala App', 7 | description: 'Phala Network App - Staking, GPU Mining', 8 | start_url: '/', 9 | display: 'standalone', 10 | background_color: '#000000', 11 | theme_color: '#000000', 12 | icons: [ 13 | { 14 | src: '/icon-192.png', 15 | sizes: '192x192', 16 | type: 'image/png', 17 | }, 18 | { 19 | src: '/icon-512.png', 20 | sizes: '512x512', 21 | type: 'image/png', 22 | }, 23 | ], 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowImportingTsExtensions": true, 4 | "allowJs": true, 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "incremental": true, 8 | "isolatedModules": true, 9 | "jsx": "preserve", 10 | "lib": ["ESNext"], 11 | "module": "ESNext", 12 | "moduleResolution": "Bundler", 13 | "noEmit": true, 14 | "noFallthroughCasesInSwitch": true, 15 | // "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "resolveJsonModule": true, 18 | "skipLibCheck": true, 19 | "strict": true, 20 | "strictNullChecks": true, 21 | "target": "ESNext" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "jsx": "preserve", 6 | "baseUrl": ".", 7 | "paths": { 8 | "@/assets/*": ["assets/*"], 9 | "@/components/*": ["components/*"], 10 | "@/hooks/*": ["hooks/*"], 11 | "@/lib/*": ["lib/*"], 12 | "@/store/*": ["store/*"], 13 | "@/config": ["config"] 14 | }, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "strictNullChecks": true 21 | }, 22 | "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts"], 23 | "exclude": ["node_modules", "polkadot-types/**/*.ts"] 24 | } 25 | -------------------------------------------------------------------------------- /apps/app/components/layout.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import {Box, Container} from '@mui/material' 4 | import type {FC, ReactNode} from 'react' 5 | 6 | import {useNotice} from '@/hooks/use-notice' 7 | import Footer from './footer' 8 | import ScrollTop from './scroll-top' 9 | import TopBar from './top-bar' 10 | 11 | const Layout: FC<{children: ReactNode}> = ({children}) => { 12 | useNotice() 13 | 14 | return ( 15 | 16 | 17 | 18 | {children} 19 | 20 |