In Solidity, what's the difference between funtion type and funtion? And what can they be used for and how respectively? Thanks!
Function types can be internal,external, public or private functions where a function is just a normal function that can be classified as one of these types.
- Public functions can be called from anywhere.
- Private functions can only be called from inside the contract.
- Internal functions can be called inside the current contract but includes inherited functions and libraries.
- External functions can be called inside or outside the contract.