Solidity LSP
name: solidity-lsp
by bowen31337 · published 2026-03-22
$ claw add gh:bowen31337/bowen31337-solidity-lsp---
name: solidity-lsp
description: Solidity language server providing smart contract development support including compilation, linting, security analysis, and code intelligence for .sol files. Use when working with Ethereum smart contracts, Substrate pallets, or any Solidity code that needs compilation, security checks, gas optimization, or code navigation. Essential for ClawChain pallet development.
---
# Solidity LSP
Solidity language server integration providing comprehensive smart contract development support through solc (Solidity compiler) and solhint (linter).
Capabilities
Installation
Install Solidity compiler and linter:
# Solidity compiler
npm install -g solc
# Solidity linter
npm install -g solhintVerify installation:
solcjs --version
solhint --versionUsage
Compile Solidity Contract
solcjs --bin --abi contract.solCompile with optimization:
solcjs --optimize --bin --abi contract.solLint Contract
Run solhint on a file:
solhint contracts/MyContract.solRun on entire project:
solhint 'contracts/**/*.sol'Security Analysis
solhint includes security rules by default. For advanced security analysis, consider:
# Install slither (requires Python)
pip3 install slither-analyzer
# Run security analysis
slither contracts/Configuration
solhint Configuration
Create `.solhint.json` in project root:
{
"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:
1. **Write**: Edit Solidity code
2. **Lint**: Run `solhint` to catch issues early
3. **Compile**: Use `solcjs` to verify compilation
4. **Analyze**: Run security tools before deployment
5. **Test**: Write comprehensive unit tests
Common Issues
More Information
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...