add solc wrapper
This commit is contained in:
parent
a2a27bb0c2
commit
4b119fffde
|
@ -1,6 +1,6 @@
|
|||
/*jshint esversion: 6, loopfunc: true */
|
||||
var solc = require('solc');
|
||||
var async = require('async');
|
||||
var SolcW = require('./solcW.js');
|
||||
|
||||
function asyncEachObject(object, iterator, callback) {
|
||||
async.each(
|
||||
|
@ -64,6 +64,11 @@ Compiler.prototype.compile_solidity = function(contractFiles, cb) {
|
|||
input[filename] = contractFiles[i].content.toString();
|
||||
}
|
||||
|
||||
var solcW = new SolcW();
|
||||
console.log("loading solc..");
|
||||
var solc = solcW.load_compiler(function(){
|
||||
console.log("loaded solc");
|
||||
});
|
||||
var output = solc.compile({sources: input}, 1);
|
||||
|
||||
if (output.errors) {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
var SolcW = function() {
|
||||
};
|
||||
|
||||
SolcW.prototype.load_compiler = function(done) {
|
||||
var solc = require('solc');
|
||||
done();
|
||||
return solc;
|
||||
};
|
||||
|
||||
module.exports = SolcW;
|
||||
|
|
@ -136,7 +136,7 @@ var Embark = {
|
|||
Embark.servicesMonitor.startMonitor();
|
||||
callback();
|
||||
},
|
||||
function (callback) {
|
||||
function deploy(callback) {
|
||||
var deployManager = new DeployManager({
|
||||
config: Embark.config,
|
||||
logger: Embark.logger,
|
||||
|
|
Loading…
Reference in New Issue