Layr-Labs / Layr-Labs/devkit-cli
Contract Development Workflow Issues and Missing Documentation
Personne n'a encore pris cette issue.
- Langage dominant
- Go
- Étoiles
- 27
- Forks
- 10
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Summary
While developing custom contracts with DevKit, I've encountered several workflow issues and gaps in documentation that make contract development more difficult than it should be. These issues primarily relate to dependency management, build processes, and the lack of fast feedback loops for contract compilation.
Issues Identified
1. Missing Documentation for Adding Contract Dependencies
Problem: When developers need to install libraries or packages for custom contracts, there's no clear documentation on how to properly add dependencies.
Current Workaround Required:
- For Forge-based dependencies:
- Navigate to
.devkit/contracts/and useforge install <dependency> - Update remappings in
.devkit/contracts/foundry.tomlif needed
- Navigate to
- For Node.js-based dependencies:
- Create a
package.jsonfile in.devkit/contracts/ - Update remapping in
.devkit/contracts/foundry.toml - Manually modify the build command in
.devkit/scripts/buildto:cd .devkit/contracts && npm install && forge clean && forge build -- --include ../../contracts/**/*.sol >&2
- Create a
Impact: This creates a poor developer experience and requires deep knowledge of the DevKit internals.
2. Build and Test Process Doesn't Include Custom Contracts Directory
Problem: Both the build and test targets in .devkit/contracts/Makefile only work with contracts within the .devkit/contracts/ directory and don't include the main ./contracts/ directory where custom contracts are placed.
build:
forge clean
forge build
test:
forge test -vvv
While there is a deploy-custom-contracts target that references custom contracts, the basic build and test commands don't validate that custom contracts compile correctly or run tests for them.
Impact:
- Developers may write custom contracts in
./contracts/that have compilation errors, but these errors won't be caught until deployment time - Custom contract tests placed in
./contracts/test/won't be executed by the standard test command - No way to run targeted tests for custom contracts during development
3. No Fast Contract Compilation Feedback Loop
Problem: There's no quick way to verify contract compilation without running the full devkit avs build command, which includes many time-consuming steps beyond contract compilation.
Current Limitations:
devkit avs buildtakes significant time due to multiple build steps (binaries, contracts, etc.)- Calling the build command in the Makefile directly doesn't build contracts outside the
.devkitfolder - No dedicated contract-only build command for rapid iteration
Impact: Slow feedback loops significantly impact development productivity when iterating on contract code.
Additional Context
These issues became apparent while following the standard DevKit workflow for custom contract development. The current process requires significant manual intervention and deep knowledge of the build system internals, which may deter developers from effectively using DevKit for contract development.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par inspecter .devkit/contracts/Makefile, .devkit/scripts/build et .devkit/contracts/foundry.toml, puis comparez leurs targets avec le répertoire ./contracts/ et le devkit avs build flow. Done doit inclure une configuration documentée des dépendances ainsi qu’un parcours pratique de build et de test couvrant les custom contracts et fournissant un feedback plus rapide lors de la compilation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell, solidity
- Domaine
- build-system, developer-experience, documentation, testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100