Layr-Labs / Layr-Labs/devkit-cli

Feature Request: Add Local Block Explorer Integration

Abierto
#185 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

feature
Lenguaje dominante
Go
Estrellas
27
Forks
10
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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 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:

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza revisando docker/anvil/docker-compose.yaml y las instrucciones existentes de README.md. Comprueba la configuración de Docker de Otterscan y su conexión con el servicio Anvil; después, ejecuta el stack local y verifica que el explorador sea accesible en el puerto 5100 y pueda consultar el nodo. Se considera terminado cuando el servicio funciona sin cambiar los workflows existentes y README.md explica cómo acceder.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, docker-compose
Área
blockchain, developer-experience, devops, documentation
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.