embark/lib/deploy.js

34 lines
728 B
JavaScript
Raw Normal View History

2016-08-13 14:48:00 +00:00
var async = require('async');
// needs:
// compile the contract -> file location
// gas -> config
contractObject = {
compiledCode,
abiDefinition,
gas,
gasPrice
}
2015-10-09 17:20:35 +00:00
2016-08-13 14:48:00 +00:00
function deployContract(web3, contractObject, params) {
var contractObject = web3.eth.contract(contract.compiled.info.abiDefinition);
2016-08-13 14:48:00 +00:00
var contractParams = params;
contractParams.push({
from: primaryAddress,
data: contract.compiled.code,
gas: contract.gasLimit,
gasPrice: contract.gasPrice
2016-05-30 00:14:27 +00:00
});
2015-10-08 19:30:47 +00:00
contractParams.push(callback);
2015-08-04 12:18:04 +00:00
2016-08-13 14:48:00 +00:00
contractObject["new"].apply(contractObject, contractParams);
};
2016-08-13 14:48:00 +00:00
function buildContractObject(contractCode, gas, gasPrice) {
var compiledContract = compiler.compile(contractCode);
return {
}
2016-08-13 14:48:00 +00:00
}