Skip to content

feat(runner): Solidity & Flow EVM support (Phase 1 + 2)#159

Open
zenabot27 wants to merge 18 commits intomainfrom
worktree-vivid-soaring-allen
Open

feat(runner): Solidity & Flow EVM support (Phase 1 + 2)#159
zenabot27 wants to merge 18 commits intomainfrom
worktree-vivid-soaring-allen

Conversation

@zenabot27
Copy link
Collaborator

@zenabot27 zenabot27 commented Mar 4, 2026

Summary

  • Phase 1: Solidity LSP + Editor — Server-side Solidity Language Server via /lsp-sol WebSocket, language-aware Monaco editor, Solidity templates (Simple Storage, ERC-20), file type icons
  • Phase 2: Compile, Deploy, Dual Wallet — Server-side solc compilation (POST /compile-sol), MetaMask/EVM wallet connection via ethers.js, context-aware run button (Compile & Deploy for .sol, Run/Send for .cdc), dual wallet UI (Flow + EVM), Cross-VM template (Cadence ↔ EVM)

Key changes

  • Generalized MonacoLspAdapter to support multiple languages (Cadence + Solidity)
  • Added useEvmWallet hook for MetaMask connection with Flow EVM chain switching
  • handleRun routes .sol files through compile → deploy, .cdc through existing FCL path
  • Dual wallet header: Flow (emerald) + EVM/MetaMask (orange) side-by-side
  • Run button dynamically switches color and label based on active file type

Test plan

  • Open a .cdc file — verify existing Cadence LSP, run, wallet all work unchanged
  • Create a new project from "Simple Storage (Solidity)" template
  • Verify Solidity syntax highlighting and LSP diagnostics appear
  • Click "Compile" button — verify compilation succeeds in result panel
  • Connect MetaMask to Flow EVM testnet — verify dual wallet shows both addresses
  • Click "Compile & Deploy" — verify MetaMask prompts for deployment
  • Try "Cross-VM (Cadence ↔ EVM)" template — verify both .sol and .cdc files present

🤖 Generated with Claude Code

zenabot27 and others added 11 commits March 5, 2026 00:36
Phase 1 covers server-side Solidity LSP via WebSocket, language-aware
Monaco editor, and Solidity templates. Future phases cover compilation,
deployment, and cross-VM interaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SolidityLSPClient spawns the @nomicfoundation/solidity-language-server
over stdio and manages JSON-RPC communication, mirroring CadenceLSPClient.

SolidityWorkspace creates a temp directory with a minimal foundry.toml
configured for Flow EVM (London EVM version, Solidity 0.8.24).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactors the WebSocket server to use noServer mode with an HTTP server
that routes /lsp to the existing Cadence LSP and /lsp-sol to the new
Solidity LSP. The Solidity handler is simpler than Cadence (no import
rewriting needed) but follows the same init/JSON-RPC forwarding pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Simple Storage and ERC-20 Token Solidity templates to the template
picker. Auto-detect .sol language in createFile for proper editor support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use colored icons to distinguish file types: blue FileCode2 for .sol,
green File for .cdc. Also allow .sol extension in new file creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zenabot27 zenabot27 force-pushed the worktree-vivid-soaring-allen branch from 3d97629 to f02eb2d Compare March 4, 2026 14:10
@zenabot27 zenabot27 changed the title feat(runner): Cursor-style inline diff mode for AI edits feat(runner): add Solidity & Flow EVM editor support (Phase 1) Mar 4, 2026
zenabot27 and others added 7 commits March 5, 2026 01:21
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update WalletButton to show both FCL (Flow) and MetaMask (EVM) wallets
  side by side with connect/disconnect/switch-chain controls
- Wire useEvmWallet hook into App.tsx and pass state to WalletButton
- Make handleRun context-aware: .sol files trigger compileSolidity +
  optional deploySolidityContract via MetaMask signer
- Run button shows "Compile" or "Compile & Deploy" for Solidity files
  with orange color scheme, keeps emerald for Cadence
- Mobile floating run button also adapts to active file type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…owing

Replace 'value' with 'data' in Solidity ExecutionResult objects to match
the interface. Add explicit type narrowing for compileSolidity return.
Resolve merge conflict in frontend txId route.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a template showing how to call an EVM contract from Cadence,
including a Solidity Counter contract and a Cadence script that
calls it via EVM.run().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zenabot27 zenabot27 changed the title feat(runner): add Solidity & Flow EVM editor support (Phase 1) feat(runner): Solidity & Flow EVM support (Phase 1 + 2) Mar 4, 2026
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.

1 participant