By default, Remix online compiler uses the version v0.5.1+commit.c8a2cb62.js
, which is set in the configuration files.
Github repo: https://github.com/ethereum/remix-ide
File compilerContainer.js (line 26).
defaultVersion: 'soljson-v0.5.1+commit.c8a2cb62.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler
File package.json (line 155).
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.5.1+commit.c8a2cb62.js -O soljson.js",
File makeMockCompiler.js (line 6).
var defaultVersion = 'v0.5.1+commit.c8a2cb62'
When you visit Remix online, you can see pressing F12 (console) the following:
Loading https://solc-bin.ethereum.org/bin/soljson-v0.5.1+commit.c8a2cb62.js without worker
Change default version
Option 1: Remix online
You can customize the URL with your preferred compiler version, like that:
https://remix.ethereum.org/#version=soljson-v0.5.10+commit.5a6ea5b1.js
Option 2: Remix running locally
You can run Remix in localhost following the instructions here (cloning the repository).
$ git clone https://github.com/ethereum/remix-ide.git
$ cd remix-ide
Before you do npm install
make sure you've changed the compiler version in the three files above:
File compilerContainer.js:
defaultVersion: 'soljson-v0.5.10+commit.5a6ea5b1.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler
File package.json:
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.5.10+commit.5a6ea5b1.js -O soljson.js",
File makeMockCompiler.js:
var defaultVersion = 'v0.5.10+commit.5a6ea5b1'
After that you can continue the instalation with npm install
. To run, write npm start
, visit 127.0.0.1:8080
and in the console (F12) you will see the following:
Loading https://solc-bin.ethereum.org/bin/soljson-v0.5.10+commit.5a6ea5b1.js without worker
Remix will load locally with your preferred compiler version.