August 2019
Intermediate to advanced
486 pages
13h 52m
English
To get the function type and pass it as an argument to another function, you can use the function name itself. For internal functions, you can use the function name itself, such as functionName, and for external functions, use this.functionName. You can see an example of it in the Using internal function types and Using external function types sections.
All of the public and external functions have special members available, called selector, which returns the first 4 bytes of the function signature as bytes4. You can use selector, as shown in the following example code:
contract SelectorExample { //Returns first 4 bytes of method signature 0x2c383a9f function method() public pure returns (bytes4 ...