// truffle migrate --config '{"invitation":false, "confirmation":false}' --reset
// for i in {1..100}; do echo $i; done > simulation.txt
let fs = require('fs');
let Conference = artifacts.require("./Conference.sol");
let ConfirmationRepository = artifacts.require("./ConfirmationRepository.sol");
let arg = require('yargs').argv;

if (!(arg.i)) {
  throw('usage: truffle exec scripts/simulation.js -i simulation.txt');
}
module.exports = async function(callback) {
  let file = arg.i;
  console.log('file', file)
  repository = await ConfirmationRepository.deployed();
  conference = await Conference.deployed();
  let codes = fs.readFileSync(file, 'utf8').trim().split('\n');
  await conference.setLimitOfParticipants(codes.length + 10, {from:web3.eth.accounts[0]});

  for (var i = 0; i < codes.length; i++) {
    var code = codes[i];
    var registered = await repository.verify(code);
    var encrypted_code = await repository.encrypt.call(code);
    var deposit = web3.toWei(0.1, "ether");
    await repository.add([encrypted_code]).catch(function(){});
    console.log('registering ', codes[i] , ' as ', web3.eth.accounts[i])
    await conference.register('user' + codes[i], {from:web3.eth.accounts[i], value:deposit})
    var registered = await conference.registered.call();
    console.log('registered', registered.toString());
  }
}

@@ -28,25 +28,20 @@
  '%7B%22
-invitation%22:false
+name%22:%22Test%22
 , %22c
@@ -67,12 +67,26 @@
 ' --
-rese
+network developmen
 t%0A//
@@ -516,16 +516,19 @@
  file)%0A 
+ //
  reposit
@@ -841,24 +841,27 @@
 odes%5Bi%5D;%0A   
+ //
  var registe
@@ -896,24 +896,27 @@
 y(code);%0A   
+ //
  var encrypt
@@ -984,37 +984,47 @@
 t = 
-web3.toWei(0.1, %22ether%22
+await conference.deposit.call(
 );%0A   
+ //
  awa

Fix Simulation.js