Skip to content

Commit f512e43

Browse files
authored
Merge pull request #144 from captDaylight/master
Remove `useVersion`, no local binaries in bin
2 parents c4af72d + 2ec911c commit f512e43

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,7 @@ new BrowserWindow({
105105

106106
### Using a Legacy Version
107107

108-
In order to compile contracts using a specific version of Solidity, the `solc.useVersion` method is available. This returns a new `solc` object that uses a version of the compiler specified. **Note**: version strings must match the version substring of the files available in `/bin/soljson-*.js`. See below for an example.
109-
110-
```javascript
111-
var solc = require('solc')
112-
// by default the latest version is used
113-
// ie: solc.useVersion('latest')
114-
115-
// getting a legacy version
116-
var solcV011 = solc.useVersion('v0.1.1-2015-08-04-6ff4cd6')
117-
var output = solcV011.compile('contract t { function g() {} }', 1)
118-
```
119-
120-
If the version is not available locally, you can use `solc.loadRemoteVersion(version, callback)` to load it directly from GitHub.
108+
In order to compile contracts using a specific version of Solidity, the `solc.loadRemoteVersion(version, callback)` method is available. This returns a new `solc` object that uses a version of the compiler specified.
121109

122110
You can also load the "binary" manually and use `setupMethods` to create the familiar wrapper functions described above:
123111
`var solc = solc.setupMethods(require("/my/local/soljson.js"))`.

wrapper.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ function setupMethods (soljson) {
196196
supportsMulti: compileJSONMulti !== null,
197197
supportsImportCallback: compileJSONCallback !== null,
198198
supportsStandard: compileStandard !== null,
199-
// Use the given version if available.
200-
useVersion: function (versionString) {
201-
return setupMethods(require('./bin/soljson-' + versionString + '.js'));
202-
},
203199
// Loads the compiler of the given version from the github repository
204200
// instead of from the local filesystem.
205201
loadRemoteVersion: function (versionString, cb) {

0 commit comments

Comments
 (0)