Solidity – Inheritance
This topic is about Solidity - Inheritance. Inheritance is a way to extend functionality of a contract. Solidity supports both single as well as multiple inheritance. Following are the key…
This topic is about Solidity - Inheritance. Inheritance is a way to extend functionality of a contract. Solidity supports both single as well as multiple inheritance. Following are the key…
This topic is about Solidity - Contracts. Contract in Solidity is similar to a Class in C++. A Contract have following properties. Constructor − A special function declared with constructor keyword…
This topic is about Solidity - Restricted Access. Restricted Access to a Contract is a common practice. By Default, a contract state is read-only unless it is specified as public.…
This topic is about Solidity - Withdrawal Pattern. Withdrawal pattern ensures that direct transfer call is not made which poses a security threat. Following contract is showing the insecure use…
This toppic is about Solidity - Cryptographic Functions. Solidity provides inbuilt cryptographic functions as well. Following are important methods − keccak256(bytes memory) returns (bytes32) − computes the Keccak-256 hash of the…
This topic is about Solidity - Pure Functions. Pure functions ensure that they not read or modify the state. A function can be declared as pure. The following statements if present…
Solidity provides inbuilt mathematical functions as well. Following are heavily used methods − addmod(uint x, uint y, uint k) returns (uint) − computes (x + y) % k where the addition…
This topic is about Solidity - Function Overloading. You can have multiple definitions for the same function name in the same scope. The definition of the function must differ from…
This topic is about Solidity - Fallback Function. Fallback function is a special function available to a contract. It has following features − It is called when a non-existent function…
This topic is about Solidity - View Functions. View functions ensure that they will not modify the state. A function can be declared as view. The following statements if present in…