I have some questions about Solidity CALL
and DELEGATECALL
. I have already read some related threads (link), but found no answers to my doubts.
1) Is there any difference in performing a CALL
to a function in a Solidity contract by directly calling the function (e.g. funct(arg1)
), or by using addressOfTheContract.call(bytes4(sha3("funct(uint256)")), _n)
?
2) Is there any difference in performing a DELEGATECALL
to a library function by directly calling the function (e.g. lib.funct(arg1)
), or by using addressOfTheLibraryContract.delegatecall(bytes4(sha3("funct(uint256)")), _n)
? Let's assume that in both cases the library is imported with an import
statement at the beginning of the contract.
3) Do both CALL
and DELEGATECALL
generate messages with the same format of a transaction (nonce
, to
, value
, ...), except for the gasPrice
and gasLimit
fields?
4) Finally, do both CALL
and DELEGATECALL
take place locally on each node?