Skip to content

Commit 1a8e9c1

Browse files
feat: added tezos-provider dapp example
1 parent e3fa343 commit 1a8e9c1

21 files changed

+5423
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM node:21-bullseye
5.59 KB
Loading
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
// These tasks will run in order when initializing your CodeSandbox project.
3+
"setupTasks": [
4+
{
5+
"name": "Install Dependencies",
6+
"command": "yarn install"
7+
}
8+
],
9+
10+
// These tasks can be run from CodeSandbox. Running one will open a log in the app.
11+
"tasks": {
12+
"dev": {
13+
"name": "dev",
14+
"command": "yarn dev",
15+
"runAtStart": true,
16+
"preview": {
17+
"port": 5176
18+
}
19+
},
20+
"build": {
21+
"name": "build",
22+
"command": "yarn build",
23+
"runAtStart": false
24+
},
25+
"preview": {
26+
"name": "preview",
27+
"command": "yarn preview",
28+
"runAtStart": false
29+
}
30+
}
31+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "React (Vite + TS)",
3+
"description": "React running from the Vite dev server!",
4+
"iconUrl": "https://github.com/codesandbox/sandbox-templates/blob/main/react-vite-ts/.codesandbox/icon.png?raw=true",
5+
"tags": [
6+
"react",
7+
"vite",
8+
"javascript",
9+
"typescript"
10+
],
11+
"published": true
12+
}

dapps/tezos-provider/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_PROJECT_ID=YOUR_PROJECT_ID

dapps/tezos-provider/.eslintrc.cjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:react/recommended"
10+
],
11+
"overrides": [
12+
{
13+
"env": {
14+
"node": true
15+
},
16+
"files": [
17+
".eslintrc.{js,cjs}"
18+
],
19+
"parserOptions": {
20+
"sourceType": "script"
21+
}
22+
}
23+
],
24+
"parser": "@typescript-eslint/parser",
25+
"parserOptions": {
26+
"ecmaVersion": "latest",
27+
"sourceType": "module"
28+
},
29+
"plugins": [
30+
"@typescript-eslint",
31+
"react"
32+
],
33+
"rules": {
34+
"react/react-in-jsx-scope": "off"
35+
}
36+
}

dapps/tezos-provider/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

dapps/tezos-provider/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Vite + React
2+
3+
This is a [Vite](https://vitejs.dev) project together with React.
4+
5+
[![Edit in CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/github/codesandbox/codesandbox-template-vite-react/main)
6+
7+
[Configuration](https://codesandbox.io/docs/projects/learn/setting-up/tasks) `.codesandbox/tasks.json` has been added to optimize it for [CodeSandbox](https://codesandbox.io/dashboard).
8+
9+
## Usage
10+
11+
1. Go to [WalletConnect Cloud](https://cloud.walletconnect.com) and create a new project.
12+
2. Copy your `Project ID`
13+
3. Rename `.env.example` to `.env` and paste your `Project ID` as the value for `VITE_PROJECT_ID`
14+
4. Run `yarn` to install dependencies
15+
5. Run `yarn dev` to start the development server
16+
6. Open dapp in your browser: `http://localhost:5176/`
17+
18+
## Resources
19+
20+
- [CodeSandbox — Docs](https://codesandbox.io/docs/learn)
21+
- [CodeSandbox — Discord](https://discord.gg/Ggarp3pX5H)
22+
- [Vite — GitHub](https://github.com/vitejs/vite)
23+
- [Vite — Docs](https://vitejs.dev/guide/)

dapps/tezos-provider/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

dapps/tezos-provider/package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "sandbox",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite --port 5176",
8+
"build": "tsc && vite build",
9+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
14+
"@solana/web3.js": "^1.78.4",
15+
"@taquito/taquito": "^20.0.1",
16+
"@airgap/beacon-types": "^4.2.2",
17+
"@walletconnect/modal": "^2.6.2",
18+
"@walletconnect/universal-provider": "^2.14.0",
19+
"bs58": "^5.0.0",
20+
"react": "^18.2.0",
21+
"react-dom": "^18.2.0",
22+
"tweetnacl": "^1.0.3"
23+
},
24+
"devDependencies": {
25+
"@types/react": "^18.2.21",
26+
"@types/react-dom": "^18.2.7",
27+
"@typescript-eslint/eslint-plugin": "^6.4.1",
28+
"@typescript-eslint/parser": "^6.4.1",
29+
"@vitejs/plugin-react-swc": "^3.3.2",
30+
"eslint": "^8.48.0",
31+
"eslint-plugin-react": "^7.33.2",
32+
"eslint-plugin-react-hooks": "^4.6.0",
33+
"eslint-plugin-react-refresh": "^0.4.3",
34+
"typescript": "^5.2.2",
35+
"vite": "^4.4.9"
36+
}
37+
}

0 commit comments

Comments
 (0)