Getting Started

Getting started with soliditylings is easy. Follow the steps below to start completing the exercises on your own machine.

Prerequisites

Before installing soliditylings, ensure you have the following installed:

  1. Node.js & npm: Download Node.js
  2. Foundry: Soliditylings uses Foundry for compiling and testing.
    curl -L https://foundry.paradigm.xyz | bash
    foundryup
    

Installation

To get started, clone the repository, install dependencies, build the project, and then install it globally:

git clone https://github.com/BradMyrick/soliditylings.git
cd soliditylings
npm install
npm run build
npm install -g .

*Note: Building the project ensures the CLI binary is generated correctly before global installation.

First Steps

To run the soliditylings application, just use the command:

soliditylings watch

This watches for file changes and automatically compiles or tests the current exercise. This is the recommended way to run soliditylings because your terminal stays open, showing real-time feedback for any bugs or compiler errors you might encounter.

Editor Support (LSP)

In order to get proper feedback and code intelligence in IDEs like VS Code, initialize your workspace correctly by generating a remappings.txt file for Solidity:

soliditylings lsp

This enables Language Server Protocol (LSP) support for your code editor so you get rich completions, go-to-definitions, and more!