Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
app: [ethereum, solana, near, zeta, tia, sei, osmosis, mantra, injective, fetch, dydx, cronos, atom, kava, ada, sui, xtz, ton, trx]
app: [ethereum, solana, near, zeta, tia, sei, osmosis, mantra, injective, fetch, dydx, cronos, atom, kava, ada, sui, xtz, ton, trx, ksm, dot]

steps:
- name: Checkout
Expand Down Expand Up @@ -55,6 +55,8 @@ jobs:
xtz) echo "project_id=${{ secrets.VERCEL_PROJECT_ID_XTZ }}" >> $GITHUB_OUTPUT ;;
ton) echo "project_id=${{ secrets.VERCEL_PROJECT_ID_TON }}" >> $GITHUB_OUTPUT ;;
trx) echo "project_id=${{ secrets.VERCEL_PROJECT_ID_TRX }}" >> $GITHUB_OUTPUT ;;
ksm) echo "project_id=${{ secrets.VERCEL_PROJECT_ID_KSM }}" >> $GITHUB_OUTPUT ;;
dot) echo "project_id=${{ secrets.VERCEL_PROJECT_ID_DOT }}" >> $GITHUB_OUTPUT ;;
esac

- name: Pull Vercel Environment Information
Expand Down
1 change: 1 addition & 0 deletions apps/dot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vercel
13 changes: 13 additions & 0 deletions apps/dot/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Minitel - Polkadot Transaction Decoder</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
30 changes: 30 additions & 0 deletions apps/dot/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@protocols/dot",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --port 3019",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "tsc && biome check ./src",
"format": "biome check ./src --write --unsafe"
},
"dependencies": {
"@protocols/shared": "workspace:*",
"@protocols/substrate-shared": "workspace:*",
"@protocols/ui": "workspace:*",
"@uiw/react-json-view": "^2.0.0-alpha.36",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.13",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^7.0.0",
"vite-plugin-node-polyfills": "^0.24.0"
}
}
14 changes: 14 additions & 0 deletions apps/dot/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions apps/dot/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { getCurrentProtocol, PROTOCOLS, type Protocol } from '@protocols/shared';
import { Background, cn, Header, ProtocolTransactionDecoder } from '@protocols/ui';
import { dotAdapter } from '@/dot-adapter';

const currentProtocol = getCurrentProtocol();

function App() {
const onChangeProtocol = (protocol: Protocol) => {
const protocolUrl = import.meta.env.DEV ? protocol.localUrl : protocol.url;
window.open(protocolUrl, '_blank', 'noopener,noreferrer');
};

return (
<div className="relative flex flex-col min-h-screen">
<div className="flex">
<div className={cn('relative w-full transition-all duration-300 ease-in-out')}>
<Background />
<Header protocols={PROTOCOLS} currentProtocol={currentProtocol} onChangeProtocol={onChangeProtocol} />
<ProtocolTransactionDecoder adapter={dotAdapter} />
</div>
</div>
</div>
);
}

export default App;
9 changes: 9 additions & 0 deletions apps/dot/src/dot-adapter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { DOT } from '@protocols/shared';
import { createSubstrateAdapter } from '@protocols/substrate-shared';

export const dotAdapter = createSubstrateAdapter({
protocol: DOT,
name: 'dot',
displayName: 'Dot',
token: 'DOT',
});
1 change: 1 addition & 0 deletions apps/dot/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "@protocols/ui/styles/globals.css";
20 changes: 20 additions & 0 deletions apps/dot/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from '@/App';
import '@/index.css';

if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.add('dark');
}

// Listen for system theme changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
document.documentElement.classList.toggle('dark', e.matches);
});

// biome-ignore lint/style/noNonNullAssertion: <safe to use>
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
1 change: 1 addition & 0 deletions apps/dot/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
12 changes: 12 additions & 0 deletions apps/dot/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@protocols/ui": ["../../packages/ui/src"],
"@protocols/shared": ["../../packages/shared/src"]
}
},
"include": ["src"]
}
8 changes: 8 additions & 0 deletions apps/dot/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"skipLibCheck": true
},
"include": ["vite.config.ts"]
}
6 changes: 6 additions & 0 deletions apps/dot/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"installCommand": "bun install --cwd ../../",
"buildCommand": "bun --cwd ../../ --filter @protocols/dot build",
"outputDirectory": "dist",
"framework": null
}
27 changes: 27 additions & 0 deletions apps/dot/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import path from 'node:path';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

export default defineConfig({
plugins: [
react(),
tailwindcss(),
nodePolyfills({
include: ['buffer'],
globals: {
Buffer: true,
global: true,
process: true,
},
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@protocols/ui': path.resolve(__dirname, '../../packages/ui/src'),
'@protocols/shared': path.resolve(__dirname, '../../packages/shared/src'),
},
},
});
1 change: 1 addition & 0 deletions apps/ksm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vercel
13 changes: 13 additions & 0 deletions apps/ksm/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Minitel - Kusama Transaction Decoder</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
30 changes: 30 additions & 0 deletions apps/ksm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@protocols/ksm",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite --port 3020",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "tsc && biome check ./src",
"format": "biome check ./src --write --unsafe"
},
"dependencies": {
"@protocols/shared": "workspace:*",
"@protocols/substrate-shared": "workspace:*",
"@protocols/ui": "workspace:*",
"@uiw/react-json-view": "^2.0.0-alpha.36",
"react": "^19.1.1",
"react-dom": "^19.1.1"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.13",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^7.0.0",
"vite-plugin-node-polyfills": "^0.24.0"
}
}
14 changes: 14 additions & 0 deletions apps/ksm/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions apps/ksm/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { getCurrentProtocol, KSM, PROTOCOLS, type Protocol } from '@protocols/shared';
import { createSubstrateAdapter } from '@protocols/substrate-shared';
import { Background, cn, Header, ProtocolTransactionDecoder } from '@protocols/ui';

const currentProtocol = getCurrentProtocol();

function App() {
const onChangeProtocol = (protocol: Protocol) => {
const protocolUrl = import.meta.env.DEV ? protocol.localUrl : protocol.url;
window.open(protocolUrl, '_blank', 'noopener,noreferrer');
};

return (
<div className="relative flex flex-col min-h-screen">
<div className="flex">
<div className={cn('relative w-full transition-all duration-300 ease-in-out')}>
<Background />
<Header protocols={PROTOCOLS} currentProtocol={currentProtocol} onChangeProtocol={onChangeProtocol} />
<ProtocolTransactionDecoder
adapter={createSubstrateAdapter({ protocol: KSM, name: 'kusama', displayName: 'Kusama', token: 'KSM' })}
/>
</div>
</div>
</div>
);
}

export default App;
1 change: 1 addition & 0 deletions apps/ksm/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "@protocols/ui/styles/globals.css";
20 changes: 20 additions & 0 deletions apps/ksm/src/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from '@/App';
import '@/index.css';

if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.classList.add('dark');
}

// Listen for system theme changes
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
document.documentElement.classList.toggle('dark', e.matches);
});

// biome-ignore lint/style/noNonNullAssertion: <safe to use>
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
1 change: 1 addition & 0 deletions apps/ksm/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions apps/ksm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@protocols/ui": ["../../packages/ui/src"],
"@protocols/shared": ["../../packages/shared/src"],
"@protocols/cosmos-shared": ["../../packages/cosmos-shared/src"]
}
},
"include": ["src"]
}
8 changes: 8 additions & 0 deletions apps/ksm/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"skipLibCheck": true
},
"include": ["vite.config.ts"]
}
6 changes: 6 additions & 0 deletions apps/ksm/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"installCommand": "bun install --cwd ../../",
"buildCommand": "bun --cwd ../../ --filter @protocols/zeta build",
"outputDirectory": "dist",
"framework": null
}
28 changes: 28 additions & 0 deletions apps/ksm/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import path from 'node:path';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

export default defineConfig({
plugins: [
react(),
tailwindcss(),
nodePolyfills({
include: ['buffer'],
globals: {
Buffer: true,
global: true,
process: true,
},
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@protocols/ui': path.resolve(__dirname, '../../packages/ui/src'),
'@protocols/shared': path.resolve(__dirname, '../../packages/shared/src'),
'@protocols/cosmos-shared': path.resolve(__dirname, '../../packages/cosmos-shared/src'),
},
},
});
Loading