In this example the problem is that the address can be of an account or any other contract which will through an error. To solve this problem ERC-165 contract comes into play.
This is used to call other contract method but any change in states happened in the caller contract not in the targeted contract.
During deployment of a contract gas cost play a vital role. It increase the cost of a deployment cost. we can reduce it via inline assembly language check below example. Without inline assembly the gas cost of the below contract is 106299: With Assembly Language the gas cost of contract is: 105003
There 2 Types of bytes: Fixed size bytes from (bytes1 to bytes32) dynamic bytes (with specific length)
keccak256 returns hash of the given argument. It receives arguments with the type of bytes (not in the form of fixed bytes e.g bytes1 to bytes32). And returns hash of bytes32.