Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ project-words.txt
.venv
**/.obsidian/**
test_result.txt
logs
node_modules
.vscode
**/static/frontend
tools/Blockchain/EtherView2/frontend/auto-imports.d.ts
tools/Blockchain/EtherView2/frontend/components.d.ts
5 changes: 5 additions & 0 deletions tools/Blockchain/EtherView2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/node_modules
**/logs
**/auto-imports.d.ts
**/components.d.ts
**/__pycache__
3 changes: 3 additions & 0 deletions tools/Blockchain/EtherView2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
keystore/
emulator_info/
emulator_data/
15 changes: 15 additions & 0 deletions tools/Blockchain/EtherView2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:22 AS node-image
WORKDIR /frontend
RUN npm install -g pnpm
RUN pnpm i
RUN pnpm run build-test

FROM handsonsecurity/seedemu-multiarch-base:buildx-latest
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip3 install flask web3==5.31.1 docker Flask-Cors flask-apscheduler Flask-SQLAlchemy pymysql
COPY start.sh /start.sh
RUN chmod +x /start.sh
COPY . .
ENTRYPOINT ["sh", "/start.sh"]
21 changes: 21 additions & 0 deletions tools/Blockchain/EtherView2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EtherView

EtherView is a collection of tools that can be used to
interact with the Ethereum emulator. It has the following
features:

- Viewing the balances for all the accounts

- Viewing blocks and transactions (like EtherScan)

- Viewing (or visualizing) interesting blockchain properties, such as
- base fee
- transaction pools on each node

- Viewing POA/POS related information, especially POS.

- Sample dApps. We should host some open-source dApps. Each dApp
is built into a container. They can be included when the emulator
is built. When EtherView detects it, the corresponding menu
will appear, leading us to the dApp. More thinking is needed
for this feature.
11 changes: 11 additions & 0 deletions tools/Blockchain/EtherView2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3"

services:
seedemu-etherview:
build: .
container_name: seedemu-etherview
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 5000:5000
image: handsonsecurity/seedemu-etherview
9 changes: 9 additions & 0 deletions tools/Blockchain/EtherView2/frontend/.env/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
VITE_NODE_ENV=development
VITE_OPEN=true
VITE_APP_HOST=0.0.0.0
VITE_APP_PORT=5173
VITE_URL_PREFIX=/
VITE_APP_BASE_URL=/api
VITE_APP_SERVER=http://127.0.0.1:3000
VITE_APP_TIMEOUT=10000
VITE_APP_TITLE=开发环境
7 changes: 7 additions & 0 deletions tools/Blockchain/EtherView2/frontend/.env/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
VITE_NODE_ENV=production
VITE_URL_PREFIX=/frontend
VITE_STATIC_ASSET_PREFIX=/static
VITE_APP_BASE_URL=/api
VITE_APP_SERVER=http://127.0.0.1:3000
VITE_APP_TIMEOUT=10000
VITE_APP_TITLE=生产环境
5 changes: 5 additions & 0 deletions tools/Blockchain/EtherView2/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
13 changes: 13 additions & 0 deletions tools/Blockchain/EtherView2/frontend/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="/src/assets/seed.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EtherView2</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
33 changes: 33 additions & 0 deletions tools/Blockchain/EtherView2/frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "vue3-frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc -b && vite build",
"preview": "vite preview",
"build-test": "vue-tsc --skipLibCheck && vite build"
},
"dependencies": {
"pinia": "^3.0.3",
"vue": "^3.5.21"
},
"devDependencies": {
"@element-plus/icons-vue": "^2.3.2",
"@types/decimal.js": "^7.4.3",
"@vitejs/plugin-vue": "^6.0.1",
"@vue/tsconfig": "^0.8.1",
"axios": "^1.12.2",
"decimal.js": "^10.6.0",
"element-plus": "^2.11.4",
"ethers": "~5.4.7",
"sass-embedded": "^1.93.2",
"typescript": "~5.8.3",
"unplugin-auto-import": "^20.2.0",
"unplugin-vue-components": "^29.1.0",
"vite": "^7.1.7",
"vue-router": "^4.5.1",
"vue-tsc": "^3.0.7"
}
}
Loading