mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
generate contract js file
This commit is contained in:
parent
4f90e62790
commit
0eb462a89c
@ -97,10 +97,13 @@ class Pipeline {
|
||||
|
||||
buildContractJS(contractName) {
|
||||
let contractJSON = fs.readFileSync('dist/contracts/' + contractName + '.json').toString();
|
||||
let EmbarkJSLib = fs.readFileSync(fs.embarkPath("js/embark.js")).toString();
|
||||
|
||||
let contractCode = "";
|
||||
contractCode += contractName + "JSONConfig = " + contractJSON + ";\n";
|
||||
contractCode += EmbarkJSLib + "\n";
|
||||
contractCode += contractName + " = new EmbarkJS.Contract(" + contractName + "JSONConfig);\n";
|
||||
contractCode += "module.exports = " + contractName + ";\n";
|
||||
|
||||
return contractCode;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user