Layr-Labs / Layr-Labs/devkit-cli
Feature Request: Add Local Block Explorer Integration
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 27
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## Problem
Developers using the `devkit avs start` command often need to visualize and interact with their local blockchain's state. Currently, the project lacks a user-friendly interface for exploring transactions, blocks, accounts, and contracts beyond logs. This makes debugging and demos more difficult.
## Solution
Integrate a local block explorer (like Otterscan) that connects to the Anvil node. This would provide a web-based UI for querying and displaying blockchain data.
## Motivation
This change improves developer experience by:
1. Allowing developers to visually inspect transactions, blocks, token balances, and contract events without relying solely on logs
2. Enabling easier debugging of smart contracts during development
3. Providing a user-friendly interface for demonstrations and external consumption
## Implementation
Update the project's [`docker-compose.yaml`](https://github.com/Layr-Labs/devkit-cli/blob/da8b2f80705445790f56ea0a7719451c232a4b46/docker/anvil/docker-compose.yaml) to include a service for running Otterscan. Since Anvil runs on `http://localhost:8545` by default, we can configure Otterscan to connect to this node.
Steps:
1. Add a new service in `docker-compose.yaml` for the block explorer
**Details**
Example `docker-compose.yaml` modification:
```yaml
services:
devkit-devnet:
image: ${FOUNDRY_IMAGE}
container_name: ${AVS_CONTAINER_NAME}
entrypoint: anvil
command: "--host 0.0.0.0 --fork-url ${FORK_RPC_URL} --fork-block-number ${FORK_BLOCK_NUMBER} ${ANVIL_ARGS}"
ports:
- "${DEVNET_PORT}:8545"
extra_hosts:
- "host.docker.internal:host-gateway"
devkit-explorer:
image: "otterscan/otterscan:v2.8.0"
ports:
- "5100:80"
environment:
ERIGON_URL: "http://devkit-devnet:8545"
```
## Additional Considerations
1. **Performance**: Ensure this change doesn't significantly impact developer machine performance during local development.
## Documentation
Update the README.md to explain how the new block explorer service can be accessed.
## Expected Outcome
1. Developers will be able to view and interact with their local network using a visual interface.
2. Existing workflows remain unchanged unless explicitly modified by the user.
## Bonus Points
- A sourcify instance coupled with the otterscan instance so that developer deployed contracts can be verified and interacted with.
## References
1. [Otterscan Documentation](https://docs.otterscan.io)
- https://docs.otterscan.io/install/dockerhub
- https://docs.otterscan.io/config/reading/devel
- https://docs.otterscan.io/intro/networks
- https://github.com/otterscan/otterscan
- https://hub.docker.com/r/otterscan/otterscan
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando docker/anvil/docker-compose.yaml e le istruzioni esistenti in README.md. Controlla la configurazione Docker di Otterscan e la sua connessione al servizio Anvil, quindi avvia lo stack locale e verifica che l'explorer sia raggiungibile sulla porta 5100 e possa interrogare il nodo. Il lavoro è completato quando il servizio funziona senza modificare i workflow esistenti e README.md spiega come accedervi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, docker-compose
- Ambito
- blockchain, developer-experience, devops, documentation
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100