diff --git a/infra/blockchain-devnet/README.md b/infra/blockchain-devnet/README.md index 20f8bea..fda2eac 100644 --- a/infra/blockchain-devnet/README.md +++ b/infra/blockchain-devnet/README.md @@ -21,6 +21,12 @@ The default RPC endpoint is: http://127.0.0.1:8545 ``` +The lightweight local explorer is available at: + +```text +http://127.0.0.1:8089 +``` + From another LAN host, use the Debian host IP: ```text @@ -43,6 +49,7 @@ curl -sS -X POST http://127.0.0.1:8545 \ ```bash BLOCKCHAIN_RPC_PORT=8545 +BLOCKCHAIN_EXPLORER_PORT=8089 BLOCKCHAIN_CHAIN_ID=31337 BLOCKCHAIN_BLOCK_TIME=2 ``` diff --git a/infra/blockchain-devnet/docker-compose.yml b/infra/blockchain-devnet/docker-compose.yml index 662d779..3ab227d 100644 --- a/infra/blockchain-devnet/docker-compose.yml +++ b/infra/blockchain-devnet/docker-compose.yml @@ -12,6 +12,19 @@ services: - "${BLOCKCHAIN_CHAIN_ID:-31337}" - --block-time - "${BLOCKCHAIN_BLOCK_TIME:-2}" + - --allow-origin + - "*" ports: - "${BLOCKCHAIN_RPC_PORT:-8545}:8545" restart: unless-stopped + + explorer: + image: nginx:1.27-alpine + container_name: homelab-blockchain-explorer + depends_on: + - anvil + ports: + - "${BLOCKCHAIN_EXPLORER_PORT:-8089}:80" + volumes: + - ./explorer:/usr/share/nginx/html:ro + restart: unless-stopped diff --git a/infra/blockchain-devnet/explorer/index.html b/infra/blockchain-devnet/explorer/index.html new file mode 100644 index 0000000..3b7e9d6 --- /dev/null +++ b/infra/blockchain-devnet/explorer/index.html @@ -0,0 +1,187 @@ + + + + + + Homelab Devnet Explorer + + + +
+

Homelab Devnet Explorer

+

Local Anvil chain view. Use only dev wallets and dev keys.

+ +
+ + +
+ +
+
+ Chain ID + unknown +
+
+ Latest Block + unknown +
+
+ Gas Price + unknown +
+
+ Peer Count + unknown +
+
+ +

Latest Block

+
Waiting for refresh...
+
+ + + +