✓ Verified 💻 Development ✓ Enhanced Data

Solidity Lsp

Solidity language server providing smart contract development support including compilation, linting

Rating
4 (146 reviews)
Downloads
620 downloads
Version
1.0.0

Overview

Solidity language server providing smart contract development support including compilation, linting, security.

Complete Documentation

View Source →

Solidity LSP

Solidity language server integration providing comprehensive smart contract development support through solc (Solidity compiler) and solhint (linter).

Capabilities

  • Compilation: Compile Solidity smart contracts with solc
  • Linting: Static analysis with solhint for best practices and security
  • Security: Detect common vulnerabilities (reentrancy, overflow, etc.)
  • Gas optimization: Identify expensive operations
  • Code intelligence: Syntax highlighting, error detection
  • Supported extensions: .sol

Installation

Install Solidity compiler and linter:

bash
# Solidity compiler
npm install -g solc

# Solidity linter
npm install -g solhint

Verify installation:

bash
solcjs --version
solhint --version

Usage

Compile Solidity Contract

bash
solcjs --bin --abi contract.sol

Compile with optimization:

bash
solcjs --optimize --bin --abi contract.sol

Lint Contract

Run solhint on a file:

bash
solhint contracts/MyContract.sol

Run on entire project:

bash
solhint 'contracts/**/*.sol'

Security Analysis

solhint includes security rules by default. For advanced security analysis, consider:

bash
# Install slither (requires Python)
pip3 install slither-analyzer

# Run security analysis
slither contracts/

Configuration

solhint Configuration

Create .solhint.json in project root:

json
{
  "extends": "solhint:recommended",
  "rules": {
    "compiler-version": ["error", "^0.8.0"],
    "func-visibility": ["warn", {"ignoreConstructors": true}],
    "max-line-length": ["warn", 120],
    "not-rely-on-time": "warn",
    "avoid-low-level-calls": "warn",
    "no-inline-assembly": "warn"
  }
}

Hardhat/Foundry Integration

For full development environments, see references/frameworks.md.

Integration Pattern

When developing smart contracts:

  • Write: Edit Solidity code
  • Lint: Run solhint to catch issues early
  • Compile: Use solcjs to verify compilation
  • Analyze: Run security tools before deployment
  • Test: Write comprehensive unit tests

Common Issues

  • Compiler version mismatch: Specify pragma version in contract
  • Gas optimization: Use view/pure where possible
  • Security: Never use tx.origin for authentication
  • Best practices: Follow Checks-Effects-Interactions pattern

More Information

Installation

Terminal bash

openclaw install solidity-lsp
    
Copied!

💻Code Examples

solhint --version

solhint---version.txt
## Usage

### Compile Solidity Contract

solcjs --optimize --bin --abi contract.sol

solcjs---optimize---bin---abi-contractsol.txt
### Lint Contract

Run solhint on a file:

solhint 'contracts/**/*.sol'

solhint-contractssol.txt
### Security Analysis

solhint includes security rules by default. For advanced security analysis, consider:

slither contracts/

slither-contracts.txt
## Configuration

### solhint Configuration

Create `.solhint.json` in project root:
example.sh
# Solidity compiler
npm install -g solc

# Solidity linter
npm install -g solhint
example.sh
# Install slither (requires Python)
pip3 install slither-analyzer

# Run security analysis
slither contracts/
example.json
{
  "extends": "solhint:recommended",
  "rules": {
    "compiler-version": ["error", "^0.8.0"],
    "func-visibility": ["warn", {"ignoreConstructors": true}],
    "max-line-length": ["warn", 120],
    "not-rely-on-time": "warn",
    "avoid-low-level-calls": "warn",
    "no-inline-assembly": "warn"
  }
}

Tags

#coding_agents-and-ides #security

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author bowen31337
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install solidity-lsp