codedamn

Understanding Trade smart contract

Created by Harshita Saxena about a year ago

0

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

    2

    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.

    @abhijeetra0547

    Abhijeet Ranjan

    @abhijeetra0547

Your comment