├── apps └── demo-dapp │ ├── .env │ ├── src │ ├── vite-env.d.ts │ ├── components │ │ ├── ton │ │ │ ├── index.ts │ │ │ ├── Formatter.tsx │ │ │ └── links.tsx │ │ ├── ui │ │ │ ├── aspect-ratio.tsx │ │ │ ├── skeleton.tsx │ │ │ ├── collapsible.tsx │ │ │ ├── code.tsx │ │ │ ├── textarea.tsx │ │ │ ├── label.tsx │ │ │ ├── input.tsx │ │ │ ├── separator.tsx │ │ │ ├── toaster.tsx │ │ │ ├── sonner.tsx │ │ │ ├── progress.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── slider.tsx │ │ │ ├── badge.tsx │ │ │ ├── switch.tsx │ │ │ ├── hover-card.tsx │ │ │ ├── tooltip.tsx │ │ │ ├── popover.tsx │ │ │ ├── radio-group.tsx │ │ │ ├── alert.tsx │ │ │ ├── avatar.tsx │ │ │ ├── toggle.tsx │ │ │ ├── scroll-area.tsx │ │ │ ├── resizable.tsx │ │ │ ├── toggle-group.tsx │ │ │ ├── tabs.tsx │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── accordion.tsx │ │ │ ├── input-otp.tsx │ │ │ ├── calendar.tsx │ │ │ ├── breadcrumb.tsx │ │ │ ├── pagination.tsx │ │ │ ├── table.tsx │ │ │ ├── drawer.tsx │ │ │ ├── dialog.tsx │ │ │ ├── sheet.tsx │ │ │ ├── form.tsx │ │ │ ├── alert-dialog.tsx │ │ │ ├── toast.tsx │ │ │ ├── command.tsx │ │ │ ├── navigation-menu.tsx │ │ │ └── select.tsx │ │ ├── Header.tsx │ │ ├── theme-provider.tsx │ │ ├── test-steps │ │ │ └── TestStepsList.tsx │ │ ├── WelcomeCard.tsx │ │ ├── TestCaseCard.tsx │ │ └── TestGroup.tsx │ ├── polyfills.ts │ ├── types │ │ ├── test-steps.ts │ │ └── test-case.ts │ ├── constants.ts │ ├── App.css │ ├── main.tsx │ ├── lib │ │ ├── ton-client.ts │ │ └── utils.ts │ ├── hooks │ │ ├── use-mobile.tsx │ │ ├── use-ton-connect.ts │ │ ├── use-test-steps.ts │ │ └── use-toast.ts │ ├── test-cases │ │ ├── BaseTestCase.tsx │ │ ├── MockTestCase.tsx │ │ ├── TestCaseFactory.tsx │ │ ├── ExtraCurrencySupportTest.tsx │ │ ├── EmulationSupportTest.tsx │ │ ├── EmulationDisplayTest.tsx │ │ ├── EmulationDisplayNativeSendTest.tsx │ │ ├── TestCaseRenderer.tsx │ │ ├── EmulationDisplaySendTest.tsx │ │ └── EcBalanceCheckTest.tsx │ ├── index.css │ └── data │ │ └── test-cases.ts │ ├── postcss.config.js │ ├── tsconfig.node.json │ ├── vite.config.ts │ ├── index.html │ ├── components.json │ ├── tsconfig.json │ ├── package.json │ └── tailwind.config.js ├── pnpm-workspace.yaml ├── package.json ├── .gitignore └── README.md /apps/demo-dapp/.env: -------------------------------------------------------------------------------- 1 | VITE_QA_MODE=enable -------------------------------------------------------------------------------- /apps/demo-dapp/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'apps/*' 3 | - 'packages/*' -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/ton/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./links"; 2 | export * from "./Formatter"; 3 | -------------------------------------------------------------------------------- /apps/demo-dapp/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 2 | 3 | const AspectRatio = AspectRatioPrimitive.Root 4 | 5 | export { AspectRatio } 6 | -------------------------------------------------------------------------------- /apps/demo-dapp/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | import {Buffer} from 'buffer'; 2 | 3 | declare global { 4 | interface Window { 5 | Buffer: typeof Buffer; 6 | } 7 | } 8 | 9 | if (window && !window.Buffer) { 10 | window.Buffer = Buffer; 11 | } -------------------------------------------------------------------------------- /apps/demo-dapp/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } -------------------------------------------------------------------------------- /apps/demo-dapp/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import path from "path" 4 | 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { 8 | alias: { 9 | "@": path.resolve(__dirname, "./src"), 10 | }, 11 | }, 12 | }) -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 4 | 5 | const Collapsible = CollapsiblePrimitive.Root 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 12 | -------------------------------------------------------------------------------- /apps/demo-dapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Demo DApp 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /apps/demo-dapp/src/types/test-steps.ts: -------------------------------------------------------------------------------- 1 | export type TestStepType = "user-action" | "wallet-action" | "auto-check"; 2 | export type TestStepStatus = 3 | | "pending" 4 | | "running" 5 | | "success" 6 | | "failure" 7 | | "locked"; 8 | 9 | export interface TestStep { 10 | id: string; 11 | title: string; 12 | description: string; 13 | type: TestStepType; 14 | status: TestStepStatus; 15 | details?: React.ReactNode; 16 | } 17 | -------------------------------------------------------------------------------- /apps/demo-dapp/src/constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Constants for Extra Currency token configuration 3 | */ 4 | 5 | /** 6 | * The token ID for Extra Currency 7 | */ 8 | export const EC_TOKEN_ID = 100; 9 | 10 | /** 11 | * The number of decimals for Extra Currency 12 | */ 13 | export const EC_DECIMALS = 8; 14 | 15 | /** 16 | * The address of the EC swap contract 17 | */ 18 | export const EC_SWAP_ADDRESS = 19 | "kQC_rkxBuZDwS81yvMSLzeXBNLCGFNofm0avwlMfNXCwoOgr"; 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ec-testing-stand", 3 | "private": true, 4 | "version": "0.0.0", 5 | "scripts": { 6 | "dev": "pnpm --filter './apps/**' dev", 7 | "build": "pnpm --filter './apps/**' build", 8 | "lint": "pnpm --filter './apps/**' lint" 9 | }, 10 | "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0", 11 | "dependencies": { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { TonConnectButton } from '@tonconnect/ui-react'; 2 | 3 | export function Header() { 4 | return ( 5 |
6 |
7 |

Extra Currency Testing Stand

8 |
9 | 10 |
11 |
12 |
13 | ); 14 | } -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/ui/code.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | interface CodeProps extends React.HTMLAttributes { 4 | children: React.ReactNode; 5 | } 6 | 7 | export function Code({ children, className, ...props }: CodeProps) { 8 | return ( 9 | 16 | {children} 17 | 18 | ); 19 | } -------------------------------------------------------------------------------- /apps/demo-dapp/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /apps/demo-dapp/src/types/test-case.ts: -------------------------------------------------------------------------------- 1 | export type TestStatus = 'pending' | 'running' | 'success' | 'failure'; 2 | export type TestType = 'check' | 'prompt' | 'error'; 3 | 4 | export interface TestCase { 5 | id: string; 6 | title: string; 7 | description: string; 8 | type: TestType; 9 | status: TestStatus; 10 | isOptional?: boolean; 11 | isEmulationRequired?: boolean; 12 | retryable?: boolean; 13 | timeoutSeconds?: number; 14 | dependencies?: string[]; 15 | } 16 | 17 | export interface TestGroup { 18 | id: string; 19 | title: string; 20 | description: string; 21 | cases: TestCase[]; 22 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules 3 | .pnp 4 | .pnp.js 5 | 6 | # Testing 7 | coverage 8 | 9 | # Production 10 | dist 11 | dist-ssr 12 | *.local 13 | 14 | # Logs 15 | logs 16 | *.log 17 | npm-debug.log* 18 | yarn-debug.log* 19 | yarn-error.log* 20 | pnpm-debug.log* 21 | lerna-debug.log* 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | 34 | # TypeScript 35 | *.tsbuildinfo 36 | 37 | # Environment files 38 | .env.local 39 | .env.development.local 40 | .env.test.local 41 | .env.production.local -------------------------------------------------------------------------------- /apps/demo-dapp/src/App.css: -------------------------------------------------------------------------------- 1 | .app { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .card { 9 | padding: 2em; 10 | } 11 | 12 | button { 13 | padding: 0.6em 1.2em; 14 | font-size: 1em; 15 | font-weight: 500; 16 | font-family: inherit; 17 | background-color: #1a1a1a; 18 | color: white; 19 | cursor: pointer; 20 | border: 1px solid transparent; 21 | border-radius: 8px; 22 | transition: border-color 0.25s; 23 | } 24 | 25 | button:hover { 26 | border-color: #646cff; 27 | } 28 | 29 | button:focus, 30 | button:focus-visible { 31 | outline: 4px auto -webkit-focus-ring-color; 32 | } -------------------------------------------------------------------------------- /apps/demo-dapp/src/main.tsx: -------------------------------------------------------------------------------- 1 | import './polyfills' 2 | import React from 'react' 3 | import ReactDOM from 'react-dom/client' 4 | import App from './App' 5 | import './index.css' 6 | import { TonConnectUIProvider, THEME, enableQaMode } from '@tonconnect/ui-react' 7 | 8 | if (import.meta.env.VITE_QA_MODE === 'enable') { 9 | enableQaMode(); 10 | } 11 | 12 | ReactDOM.createRoot(document.getElementById('root')!).render( 13 | 14 | 18 | 19 | 20 | , 21 | ) 22 | -------------------------------------------------------------------------------- /apps/demo-dapp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | "moduleResolution": "bundler", 9 | "allowImportingTsExtensions": true, 10 | "resolveJsonModule": true, 11 | "isolatedModules": true, 12 | "noEmit": true, 13 | "jsx": "react-jsx", 14 | "strict": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "noFallthroughCasesInSwitch": true, 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } -------------------------------------------------------------------------------- /apps/demo-dapp/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |