Skip to content

Commit 21386bf

Browse files
authored
Merge pull request #220 from crytic/dev-readme
README improvements
2 parents 5a8264e + 13f7874 commit 21386bf

File tree

1 file changed

+39
-34
lines changed

1 file changed

+39
-34
lines changed

README.md

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# solc-select
2+
23
A tool to quickly switch between Solidity compiler versions.
34

45
The tool is split into two CLI utilities:
6+
57
- `solc-select`: manages installing and setting different `solc` compiler versions
68
- `solc`: wrapper around `solc` which picks the right version according to what was set via `solc-select`
79

@@ -12,26 +14,27 @@ The versioned binaries are stored in `~/.solc-select/artifacts/`.
1214

1315
## Quickstart
1416

15-
```
17+
```bash
1618
pip3 install solc-select
1719
```
1820

19-
To automatically install and use a version, run `solc-select use <version> --always-install`.
21+
To automatically install and use a version, run `solc-select use <version> --always-install`.
2022

2123
### Running on ARM (Mac M1/M2)
2224

2325
`solc` requires Rosetta to be installed. See the FAQ on [how to install Rosetta](#oserror-errno-86-bad-cpu-type-in-executable).
2426

2527
## Usage
2628

27-
By default, `solc-select` will install the most recent available Solidity file for your version. This will automatically be done when you run `solc` for the first time.
29+
By default, `solc-select` will install the most recent available Solidity file for your version. This will automatically be done when you run `solc` for the first time.
2830

29-
```bash
30-
solc
31+
```bash
32+
solc
3133
```
3234

3335
The global version of `solc` will automatically be set to to the latest version. You can reset this with the `solc-select use <version>` command:
34-
```
36+
37+
```shell
3538
$ solc --version
3639
solc, the solidity compiler commandline interface
3740
Version: 0.5.2+commit.1df8f40c.Linux.g++
@@ -41,8 +44,10 @@ $ solc --version
4144
solc, the solidity compiler commandline interface
4245
Version: 0.4.24+commit.e67f0147.Linux.g++
4346
```
47+
4448
Use `SOLC_VERSION` environment variable to override the global version:
45-
```
49+
50+
```shell
4651
$ solc --version
4752
solc, the solidity compiler commandline interface
4853
Version: 0.4.24+commit.e67f0147.Linux.g++
@@ -51,16 +56,17 @@ solc, the solidity compiler commandline interface
5156
Version: 0.5.2+commit.1df8f40c.Linux.g++
5257
```
5358

54-
By default, solc-select will halt if you try to use a version that you do not have installed already. Use the `--always-install` flags to bypass this.
59+
By default, solc-select will halt if you try to use a version that you do not have installed already. Use the `--always-install` flags to bypass this.
5560

56-
```bash
57-
solc-select use 0.8.1 --always-install
61+
```shell
62+
$ solc-select use 0.8.1 --always-install
5863
Installing '0.8.1'...
5964
Version '0.8.1' installed.
6065
```
6166

6267
You can list all available versions with `solc-select install`:
63-
```
68+
69+
```shell
6470
$ solc-select install
6571
Available versions to install:
6672
0.3.6
@@ -98,55 +104,54 @@ If it is not installed, it can be installed with the command
98104

99105
Uninstall other installations of solc on your machine. `solc-select` re-installs solc binaries for your operating system and acts as a wrapper for solc. With duplicate solc installations, this may result in your `solc` version not being up to date.
100106

101-
### "Unsupported Platform" on Windows
107+
### "Unsupported Platform" on Windows
102108

103-
The solc-select version that supports Windows is currently in beta. Uninstall `solc-select` through `pip3 uninstall solc-select` and run
109+
You might be using an old version of `solc-select` or Python if you are seeing this error message. The current stable release supports Windows; try upgrading your `solc-select` installation with the following command.
104110

105-
```bash
106-
pip install solc-select==1.0.0b1
107-
```
108-
109-
Alternatively, for the most up-to-date version, clone this repository and run
110-
```bash
111-
pip install . --user
111+
```bash
112+
pip install --upgrade solc-select
112113
```
113114

114115
## Known Issues
115116

116117
### `SSL: CERTIFICATE_VERIFY_FAILED` on running `solc-select` commands [investigation ongoing]
117118

118-
**OS X**
119+
**OS X**: Python distributions on OS X has no certificates and cannot validate SSL connections, a breaking change introduced in Python 3.6. See [StackOverflow](https://stackoverflow.com/a/42334357) post for additional details.
120+
121+
The following commands may resolve the issue; adjust the Python version to the one installed on your system:
122+
119123
```bash
120124
pip3 install certifi
121125
/Applications/Python\ 3.8/Install\ Certificates.command
122126
```
123127

124-
Python distributions on OS X has no certificates and cannot validate SSL connections, a breaking change introduced in Python 3.6. See [StackOverflow](https://stackoverflow.com/a/42334357) post for additional details.
125-
126128
### `Connection refused` [investigation ongoing]
127129

130+
Our `0.2.1` version of `solc-select` pulls older Linux binaries from [crytic/solc](https://github.com/crytic/solc) which seems to have introduced unexpected behavior in certain instances. Apparently, [certain ISPs such as Jio](https://github.com/crytic/solc-select/issues/205#issuecomment-1825171056) may be blocking access to certain GitHub domains. If possible, try using a different Internet provider to see if it resolves the problem.
131+
132+
Alternatively, try downgrading to `solc-select version 0.2.0`.
133+
128134
```bash
129-
pip3 uninstall solc-select
135+
pip3 uninstall solc-select
130136
pip3 install solc-select==0.2.0
131-
solc-select install
137+
solc-select install
132138
```
133139

134-
Try downgrading to `solc-select version 0.2.0`.
135-
136-
Our `0.2.1` version of `solc-select` pulls older Linux binaries from [crytic/solc](https://github.com/crytic/solc) which seems to have introduced unexpected behavior in certain instances.
137-
138140
### `solc-select` version changes, but `solc --version does not match`
139141

140-
Users seem to be experiencing situations in which the following command is successful:
141-
```
142-
solc-select use <version>
142+
Users seem to be experiencing situations in which the following command is successful:
143+
144+
```bash
145+
solc-select use <version>
143146
```
147+
144148
However, when running the following command, it points to an older version of Solidity.
145-
```
149+
150+
```bash
146151
solc --version
147152
```
148153

149-
`solc-select` is intended to work with custom binaries. This means that Solidity installed through other means (i.e: `brew install solidity`) will _not_ work!.
154+
`solc-select` is intended to work with custom binaries. This means that Solidity installed through other means (i.e: `brew install solidity`) will _not_ work!.
150155

151156
Uninstall other versions Solidity from your computer.
152157

0 commit comments

Comments
 (0)