mirror of https://github.com/embarklabs/embark.git
remove unnecessary determin params call
This commit is contained in:
parent
8cc86e0b0f
commit
f4010bd66e
|
@ -134,32 +134,27 @@ class Deploy {
|
|||
contractToDeploy(contract, params, callback) {
|
||||
const self = this;
|
||||
|
||||
// TODO: refactor to async
|
||||
self.determineArguments(params || contract.args, contract, (realArgs) => {
|
||||
contract.realArgs = realArgs;
|
||||
// TODO: this whole callback is almost pointless and should be moved to deployContract
|
||||
this.deployContract(contract, contract.realArgs, function (err, address) {
|
||||
if (err) {
|
||||
self.events.emit("deploy:contract:error", contract);
|
||||
return callback(new Error(err));
|
||||
}
|
||||
contract.address = address;
|
||||
self.events.emit("deploy:contract:deployed", contract);
|
||||
|
||||
this.deployContract(contract, contract.realArgs, function (err, address) {
|
||||
if (err) {
|
||||
self.events.emit("deploy:contract:error", contract);
|
||||
return callback(new Error(err));
|
||||
}
|
||||
contract.address = address;
|
||||
self.events.emit("deploy:contract:deployed", contract);
|
||||
// TODO: can be moved into a afterDeploy event
|
||||
// just need to figure out the gasLimit coupling issue
|
||||
self.events.request('code-generator:contract:vanilla', contract, self.gasLimit, (contractCode) => {
|
||||
self.events.request('runcode:eval', contractCode);
|
||||
|
||||
// TODO: can be moved into a afterDeploy event
|
||||
// just need to figure out the gasLimit coupling issue
|
||||
self.events.request('code-generator:contract:vanilla', contract, self.gasLimit, (contractCode) => {
|
||||
self.events.request('runcode:eval', contractCode);
|
||||
let onDeployPlugins = self.plugins.getPluginsProperty('onDeployActions', 'onDeployActions');
|
||||
|
||||
let onDeployPlugins = self.plugins.getPluginsProperty('onDeployActions', 'onDeployActions');
|
||||
|
||||
async.eachLimit(onDeployPlugins, 1, function(plugin, nextEach) {
|
||||
plugin.call(plugin, contract, nextEach);
|
||||
}, () => {
|
||||
callback();
|
||||
});
|
||||
async.eachLimit(onDeployPlugins, 1, function(plugin, nextEach) {
|
||||
plugin.call(plugin, contract, nextEach);
|
||||
}, () => {
|
||||
callback();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue