1
function() public {
  if(delegate.delegatecall(msg.data)) {
    this;

What are the requirements for "if" to execute "this" and what does "this" refer to in this function?

3
  • It's a weird example. Where did you find it? Feb 22 '20 at 22:01
  • It's a snippet of a solidity smart contract. I have updated the question to show the rest of the code. Feb 23 '20 at 10:00
  • In which version of solidity did you find this code? delegatecall may return a boolean: true if the delegate call is successful. this refer to the instance of the contract. And this is a fallback function.
    – Thykof
    Aug 21 '20 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.