You are viewing the documentation for the develop branch. The documentation for the release version is here .

Table of Contents

Solidity Layer

Table of ContentsClose

solidity.png

1. Description

A layer to support Solidity development in Spacemacs.

1.1. Features:

  • Syntax highlighting
  • Syntax checking
  • Gas estimation

2. Install

2.1. Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add solidity to the existing dotspacemacs-configuration-layers list in this file.

2.2. Linter

2.2.1. solc

To use the solc flycheck checker, install solc, and enable it in your ~/.spacemacs.

(solidity :variables
          solidity-flycheck-solc-checker-active t)

Please note that you can't use solc-js for the solc flycheck checker.

2.2.2. Ethlint

To use solium flycheck checker, install Ethlint.

npm i -g ethlint

Then enable it in your ~/.spacemacs:

(solidity :variables
          solidity-flycheck-solium-checker-active t)

And make sure that .soliumrc.json exists in the root directory of your DApp:

solium --init

3. Options

Variable Default value Description
solidity-flycheck-solc-checker-active nil If non-nil, use solc flycheck checker for Solidity Mode.
solidity-flycheck-solium-checker-active nil If non-nil, use solium flycheck checker for Solidity Mode.

4. Key bindings

Key binding Description
SPC m g Estimate gas at point

Author: root

Created: 2022-05-24 Tue 11:52

Validate