December 2018
Beginner to intermediate
564 pages
17h 34m
English
In order to compile contracts using a different version of solidity, you need to use the useVersion method to get a reference of a different compiler. useVersion takes a string that indicates the JavaScript filename that holds the compiler, and it looks for the file in the /node_modules/solc/bin directory.
solcjs also provides another method called loadRemoteVersion, which takes the compiler filename that matches the filename in the solc-bin/bin directory of the solc-bin repository (https://github.com/ethereum/solc-bin) and downloads and uses it.
Finally, solcjs also provides another method called setupMethods, which is similar to useVersion but can load the compiler from any directory.
Here is an example ...
Read now
Unlock full access