Understanding Trade smart contract

Created by Harshita Saxena about a year ago


Here is a tip for you: Remove lines 19 & 20 and try to run the smart contract again. See if the smart contract still runs or not and if yes, tell the reason in the comment section :)

1 Comment


    Yes the contract runs correctly even after removing lines 19 and 20 because the balance of the contract is updated automatically in a payable function and even this attempt at updating the balance of the contract was incomplete as the value of 'a' was not stored anywhere after adding the msg.value to it.


    Abhijeet Ranjan


Your comment