Layr-Labs / Layr-Labs/devkit-cli
Feature Request: Add Local Block Explorer Integration
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 27
- Forks
- 10
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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:
- Allowing developers to visually inspect transactions, blocks, token balances, and contract events without relying solely on logs
- Enabling easier debugging of smart contracts during development
- Providing a user-friendly interface for demonstrations and external consumption
Implementation
Update the project's 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:
- Add a new service in
docker-compose.yamlfor the block explorer
Details
Example docker-compose.yaml modification:
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
- 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
- Developers will be able to view and interact with their local network using a visual interface.
- 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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Durchsicht von docker/anvil/docker-compose.yaml und den vorhandenen Anweisungen in README.md. Überprüfe die Docker-Konfiguration von Otterscan und ihre Verbindung zum Anvil-Dienst. Starte anschließend den lokalen Stack und verifiziere, dass der Explorer über Port 5100 erreichbar ist und den Node abfragen kann. Als erledigt gilt die Aufgabe, wenn der Dienst funktioniert, ohne bestehende Workflows zu ändern, und README.md den Zugriff erklärt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, docker-compose
- Bereich
- blockchain, developer-experience, devops, documentation
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100