Today I learnt on the various ways to call a function in soildity, I got hold of the two ways in which a function can be called, I'll be state them along with their differences, stay tuned 💯❤
#1. Executing a function in Solidity
Calling the function
-Cannot modify the contracts data. -Can return faster
- Runs instantly
- Free to do
#2. Sending a transaction to the function
- Can modify a contracts data
- Takes time to excute
- Returns the teturn the transaction hash
- Cost money