Skip to content
Permalink
Browse files

BLD: fix relative paths issue

  • Loading branch information
lacabra committed Jun 7, 2019
1 parent 01ba1d9 commit 9ab3c55d5375a9c0ce8cce266b74b39e2ced7c0e
Showing with 10 additions and 1 deletion.
  1. +7 −0 config/2_deploy_contracts.js
  2. +1 −1 config/test_simple_addition.js
  3. +2 −0 src/contracts.js
@@ -56,6 +56,13 @@ async function deploySecretContract(config){
// Verify deployed contract
var result = await enigma.admin.isDeployed(scTask.scAddr);
if(result) {

fs.writeFile(path.join('../test/',config.filename.replace(/\.wasm$/, '.txt')), scTask.scAddr, 'utf8', function(err) {
if(err) {
return console.log(err);
}
});

return scTask.scAddr;
} else {
console.log('Something went wrong deploying Secret Contract "${contract}", aborting');
@@ -47,7 +47,7 @@ contract("Sample", accounts => {
];
let taskGasLimit = 100000;
let taskGasPx = utils.toGrains(1);
const contractAddr = fs.readFileSync(path.join('test/simple_addition.txt'), 'utf-8');
const contractAddr = fs.readFileSync('test/simple_addition.txt', 'utf-8');
task = await new Promise((resolve, reject) => {
enigma.computeTask(taskFn, taskArgs, taskGasLimit, taskGasPx, accounts[0], contractAddr)
.on(eeConstants.SEND_TASK_INPUT_RESULT, (result) => resolve(result))
@@ -11,6 +11,8 @@ const constants = require('./constants');

async function prepTruffle(){
const baseFolder = deps.findBasePath();
process.chdir(baseFolder);

const network = 'development';
const config = TruffleConfig.detect({network: network});
config.contracts_build_directory = path.join(baseFolder, constants.FOLDER.BUILD, constants.FOLDER.SMART_CONTRACTS);

0 comments on commit 9ab3c55

Please sign in to comment.
You can’t perform that action at this time.