bansaltushar014 / Chapter-Solidity

Help Solidity developer to learn fast via providing simple code and examples. This repository containing the most popular smart contracts collections.
MIT License
11 stars 16 forks source link

Update ContractB.sol: Modified the contract #2

Closed 0xScratch closed 1 year ago

0xScratch commented 1 year ago

Two changes are made in particular:

  1. Added a separate function callToContractA: This function is same as CallToContractA, just the difference is that it gives user the extra ability to use the optional gas parameter provided by solidity. Also it will let solidity developers know that this gas parameter allows any user to specify the amount of gas which one wants to send along with the function, if that transaction exceeds the amount of gas provided, transaction be reverted

  2. Modified testCallDoesNotExist: Just removed that unused parameter _addr and added a require check whether our test call got succeeded or it been failed

Thanks!

bansaltushar014 commented 1 year ago

Thanks @Aryan9592 for PR , will review and revert back.

0xScratch commented 1 year ago

Hwy @bansaltushar014, any update regarding this PR?

bansaltushar014 commented 1 year ago

Merged!