- Common Function Types:
- public: Anyone can call this function,but it isn't really used for any type of security per se.
- private: Only contract can call this function.
- view: This function returns data and doesn't modify the contract's data.
- constant: the same function type as "view".
- pure: Function will not modify or not even read the contract's data.
- payable: We might attempt to call it and send money to the contract at the same time.
Ex:
contract Indox{
String public message;
*Function format
function getMessage() public view returns (String){
return message; }
}