Skip to content

Conversation

@fazzatti
Copy link
Contributor

This PR introduces a contract explorer to the scaffold webap. To implement this feature we ported thecontract-explorer ported from Stellar Lab with its underlying components, hooks and other helpers. A cleanup job was performed to simplify and rewire certain mechanisms so the feature is fully functional and on par with the Lab capabilities.

Core Mechanisms

  • A /src/debug directory was added to hold the explorer-specific implementation. This ensures a separate of concerns similar to scaffold-eth. Users can easily remove the feature as a whole or consciously select which components and hooks to copy from the feature, into the general webapp project.
  • Routing was added to the project and the contract-explorer was added to the route /debug following scaffold-eth example.
  • Contract clients are directly loaded from the /contracts folder and used to load the explorer component.
  • The selected contract is displayed on the left side component and used to load a custom form for contract interaction.
  • Function Arguments have input validation for most formats
  • Simulation results are displayed in JSON format
  • Transaction Results are displayed in JSON format
  • Success transaction details are converted from XDR to JSON (Envelope, Result and Result Meta)

image

Long-term Considerations

The current intended state was to port the contract explorer as close as possible to the live version of Stellar lab. In the long-term we expect the component to be iterated over to deviate from lab and have a custom-tailored UX for scaffold. This could involve further simplifying the explorer behavior and refactoring the components for easier re-usability.

@fazzatti
Copy link
Contributor Author

Checking broken build 👀

@fazzatti
Copy link
Contributor Author

Build fixed! ✅

fazzatti and others added 23 commits June 23, 2025 09:26
* fix: upgraded wallet kit and fix popup issue

* fix: updated package lock

* fix: updated package lock

* fix: removed duplicate popup when cancel connection
- Add TypeScript types for debug components
- Add utility functions for XDR parsing, formatting, and validation
- Add comprehensive validation methods for Stellar data types
- Port validation infrastructure from Stellar Lab
…-rc.1.1 and refactor initialization in TransactionSuccessCard
@fazzatti fazzatti force-pushed the feat/contract-debugger branch from f590194 to cb1aeec Compare June 23, 2025 12:34
@zachfedor
Copy link
Contributor

We should add Prettier to the pre-commit hook so PR builds don't fail on us like this.

@fazzatti fazzatti requested a review from zachfedor July 7, 2025 17:16
@fazzatti fazzatti merged commit 3a3f587 into main Jul 9, 2025
1 check passed
@pselle pselle deleted the feat/contract-debugger branch July 9, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants