wrapper.js
function (versionString, cb) {
      var mem = new MemoryStream(null, {readable: false});
      var url = 'https://wiseplat.github.io/solc-bin/bin/soljson-' + versionString + '.js';
      https.get(url, function (response) {
        if (response.statusCode !== 200) {
          cb(new Error('Error retrieving binary: ' + response.statusMessage));
        } else {
          response.pipe(mem);
          response.on('end', function () {
            cb(null, setupMethods(requireFromString(mem.toString(), 'soljson-' + versionString + '.js')));
          });
        }
      }).on('error', function (error) {
        cb(error);
      });
    }
function (versionString, cb) {
      var mem = new MemoryStream(null, {readable: false});
      var url = 'https://wiseplat.github.io/solc-bin/bin/soljson-' + versionString + '.js';
      https.get(url, function (response) {
        if (response.statusCode !== 200) {
          cb(new Error('Error retrieving binary: ' + response.statusMessage));
        } else {
          response.pipe(mem);
          response.on('end', function () {
            cb(null, setupMethods(requireFromString(mem.toString(), 'soljson-' + versionString + '.js')));
          });
        }
      }).on('error', function (error) {
        cb(error);
      });
    }
function ( versionString , cb ) { var mem = new MemoryStream ( null , { readable : false } ) ; var url = 'https://wiseplat.github.io/solc-bin/bin/soljson-' + versionString + '.js' ; https . get ( url , function ( response ) { if ( response . statusCode !== 200 ) { cb ( new Error ( 'Error retrieving binary: ' + response . statusMessage ) ) ; } else { response . pipe ( mem ) ; response . on ( 'end' , function ( ) { cb ( null , setupMethods ( requireFromString ( mem . toString ( ) , 'soljson-' + versionString + '.js' ) ) ) ; } ) ; } } ) . on ( 'error' , function ( error ) { cb ( error ) ; } ) ; }
Loads the compiler of the given version from the github repository instead of from the local filesystem.
Loads the compiler of the given version from the github repository instead of from the local filesystem .