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