OpenZeppelin CLI: Could not retrieve solc releases list behind network proxy

Asked on GitHub:

I don’t know if there is an out of the box way to do this.

Looking at the code:

You should be able to create a .solc directory in your home directory.
Download list.json from https://solc-bin.ethereum.org/bin/list.json
Download the compiler that you need.

You can then specify the version to compile with using npx oz compile --solc-version (https://docs.openzeppelin.com/cli/2.8/commands#compile)

My .solc directory looks as follows:

abcoathup@OpenZeppelin:~/.solc$ ls -l
total 45480
-rw-r--r-- 1 abcoathup abcoathup   358651 May  7 18:01 list.json
-rw-r--r-- 1 abcoathup abcoathup 12395217 Mar 26 15:38 soljson-v0.5.17+commit.d19bba13.js
-rw-r--r-- 1 abcoathup abcoathup  8270154 Mar 30 17:01 soljson-v0.6.4+commit.1dca32f3.js
-rw-r--r-- 1 abcoathup abcoathup  8438962 Apr  7 17:24 soljson-v0.6.5+commit.f956cc89.js
-rw-r--r-- 1 abcoathup abcoathup  8442418 Apr 15 11:11 soljson-v0.6.6+commit.6c089d02.js
-rw-r--r-- 1 abcoathup abcoathup  8648980 May  7 18:55 soljson-v0.6.7+commit.b8d736ae.js
1 Like