In this challenge you will create a command line utility to facilitate the management of multiple solc (Solidity compiler for smart contracts on the Ethereum platform) versions in user environment, along with compilation of Solidity contracts demanding different solc versions. We call this tool solc-vm. The main idea is that solc-all will take care about automatic installation of different solc versions, much like nvm (Node Version Manager) does for NodeJS.
Here is the list of client requirements:
- The tool should be cross-platform (Linux, MacOS, Windows). The exact tech stack is up to you, though using NodeJS might be a good idea, and looking into how solc-js installs solc binaries, might be a good starting point.
- $ solc-vm using x.y.z contract.sol should compile the contract using the specified compiler version. If the required version is not available in the user environment, it should be automatically installed by solc-vm. Any additional command line arguments should be passed to the solc compiler.
- $ solc-vm contract.sol should compile the contract using the latest solc version that matches pragma declaration inside the contract. The correct version should be automatically installed to the user environment, if necessary. Any additional command line arguments should be passed to the solc compiler.
- Supports commands $ solc-vm install x.y.z to manually install the specified solc version, $ solc-vm ls to list all installed solc versions, and $ solc-vm uninstall x.y.z to remove the specified solc version.
- The tool must work for solc versions from 0.4.0 to the latest 0.4.25 (and newer ones, as they are available).
- Codebase should include simple functional tests for the tool.
- Provide a one-command way to install the tool globally.
- Document solc-vm usage. The code should be Git-ready (include .gitignore that lists any build files, the documentation should be placed README.md file, in Markdown format).