Greetings and welcome to soliditylings. This project contains small exercises to get you used to writing and reading Solidity code! It is the spiritual clone of Rustlings, tailored entirely for Ethereum smart contract developers.
Install soliditylings globally so you can use it anywhere:
npm install -g .To run the soliditylings application, just use the command:
soliditylings watchThere are several options you can use:
watch: Watches for file changes and automatically compiles/tests the current exercise. This is the recommended way to usesoliditylings.verify: Verifies all exercises by running them in sequence. It will stop at the first failure.run [name]: Runs the next pending exercise, or a specific exercise if a name is provided.list: Lists all exercises and their current completion status.hint: Provides a hint for the current exercise.reset: Resets all of your completion progress so you can start from scratch.lsp: Generates aremappings.txtfile which enables LSP (Language Server Protocol) support for Solidity in your code editor.init-docs: Initializes adocs.jsonfile to easily enabledocs.pagedocumentation compatibility.
- The exercises sort themselves by difficulty and topic.
- Every exercise is broken until you fix it! Look at the compiler and test output for clues.
- Fix the exercises! When it passes its tests/compiles without errors,
soliditylingswill track it as done.
This repository is compatible with docs.page. You can initialize the documentation sidebar by running:
soliditylings init-docsThis will create a docs.json file which docs.page uses to understand the layout of your site.