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; }
Best Answer
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