You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-34Lines changed: 39 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# solc-select
2
+
2
3
A tool to quickly switch between Solidity compiler versions.
3
4
4
5
The tool is split into two CLI utilities:
6
+
5
7
-`solc-select`: manages installing and setting different `solc` compiler versions
6
8
-`solc`: wrapper around `solc` which picks the right version according to what was set via `solc-select`
7
9
@@ -12,26 +14,27 @@ The versioned binaries are stored in `~/.solc-select/artifacts/`.
12
14
13
15
## Quickstart
14
16
15
-
```
17
+
```bash
16
18
pip3 install solc-select
17
19
```
18
20
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`.
20
22
21
23
### Running on ARM (Mac M1/M2)
22
24
23
25
`solc` requires Rosetta to be installed. See the FAQ on [how to install Rosetta](#oserror-errno-86-bad-cpu-type-in-executable).
24
26
25
27
## Usage
26
28
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.
28
30
29
-
```bash
30
-
solc
31
+
```bash
32
+
solc
31
33
```
32
34
33
35
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
35
38
$ solc --version
36
39
solc, the solidity compiler commandline interface
37
40
Version: 0.5.2+commit.1df8f40c.Linux.g++
@@ -41,8 +44,10 @@ $ solc --version
41
44
solc, the solidity compiler commandline interface
42
45
Version: 0.4.24+commit.e67f0147.Linux.g++
43
46
```
47
+
44
48
Use `SOLC_VERSION` environment variable to override the global version:
45
-
```
49
+
50
+
```shell
46
51
$ solc --version
47
52
solc, the solidity compiler commandline interface
48
53
Version: 0.4.24+commit.e67f0147.Linux.g++
@@ -51,16 +56,17 @@ solc, the solidity compiler commandline interface
51
56
Version: 0.5.2+commit.1df8f40c.Linux.g++
52
57
```
53
58
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.
55
60
56
-
```bash
57
-
solc-select use 0.8.1 --always-install
61
+
```shell
62
+
$ solc-select use 0.8.1 --always-install
58
63
Installing '0.8.1'...
59
64
Version '0.8.1' installed.
60
65
```
61
66
62
67
You can list all available versions with `solc-select install`:
63
-
```
68
+
69
+
```shell
64
70
$ solc-select install
65
71
Available versions to install:
66
72
0.3.6
@@ -98,55 +104,54 @@ If it is not installed, it can be installed with the command
98
104
99
105
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.
100
106
101
-
### "Unsupported Platform" on Windows
107
+
### "Unsupported Platform" on Windows
102
108
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.
104
110
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
112
113
```
113
114
114
115
## Known Issues
115
116
116
117
### `SSL: CERTIFICATE_VERIFY_FAILED` on running `solc-select` commands [investigation ongoing]
117
118
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:
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
-
126
128
### `Connection refused`[investigation ongoing]
127
129
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
+
128
134
```bash
129
-
pip3 uninstall solc-select
135
+
pip3 uninstall solc-select
130
136
pip3 install solc-select==0.2.0
131
-
solc-select install
137
+
solc-select install
132
138
```
133
139
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
-
138
140
### `solc-select` version changes, but `solc --version does not match`
139
141
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>
143
146
```
147
+
144
148
However, when running the following command, it points to an older version of Solidity.
145
-
```
149
+
150
+
```bash
146
151
solc --version
147
152
```
148
153
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!.
150
155
151
156
Uninstall other versions Solidity from your computer.
0 commit comments