Solidity – Restricted Access
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 - 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…
This topic is about Solidity - Function Modifiers. Function Modifiers are used to modify the behaviour of a function. For example to add a prerequisite to a function. First we…
This topic is about Solidity - Functions. A function is a group of reusable code which can be called anywhere in your program. This eliminates the need of writing the…