0

i am trying to call this function with help of web3.js in ganache testrpc but it is giving me error of VM Exception while processing transaction: out of gas

i have tried to increas gas of ganache to 999999999999 still its not work...

function initialEscrowDetail(uint transactionId,address partyB,uint amount,bool condition){

    escrowDetail[transactionId].originator=msg.sender;
    escrowDetail[transactionId].beneficiary=partyB;
    escrowDetail[transactionId].amount=amount;
    escrowDetail[transactionId].payoutCondition=condition;
    escrowDetail[transactionId].escrowCompleted=false;
}

enter image description here

  • please share the code – blockwala Apr 22 '18 at 15:57
  • thanks but issue is resolved. ganache testRPC is waste of time in reallife dapps testing. now i have started private test blockchain. – Akshay Pilankar Apr 22 '18 at 16:02
  • testrpc is also private EVM :) – blockwala Apr 23 '18 at 7:30
0

The default gas in web3 if it is not specified is 90k. Since each new storage modifications cost 20k with 5 storage modifications you were using more than 100k of gas.

You can add an optional last parameter with the transaction gas

escrow.initialEscrowDetail(1,"0x0",200,true, { gas: 1000000 });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.