August 2018
Intermediate to advanced
404 pages
11h 19m
English
Apart from the inbuilt functions for cryptographic and mathematical operations, solidity provides ABI encoding functions as well. This helps in generating function signatures without actually calling these functions. The supported operations are given here:
abi.encode(...): To ABI-encode the given parameters
abi.encodePacked(...): For packed encoding of the given parameters
abi.encodeWithSelector(bytes4 selector, ...): To encode the given parameters, starting from the second, and prepend the given four-byte selector
abi.encodeWithSignature(string signature, ...): Similar to encodeWithSelector, but accepts the signature as first parameter