1

Recently I came across this code in solidity:

fallback() external {
    (bool result,) = address(delegate).delegatecall(msg.data);
    if (result) {
      this;
    }
  }

I know what happens till a value is assigned to the result variable but can't figure out what the "if block" is doing.

I tried to create a similar program in remix IDE and look for this code in the docs and blogs but no luck. Here is the full code .

I'm sorry if this is dumb but I just started solidity. So if anyone was kind enough to explain about how can I tackle these sorts of situations in future I would be extra grateful.

3
  • 1
    This is just a dummy into which you can insert the processing of the results.
    – Mad Jackal
    Commented Dec 11, 2021 at 14:04
  • So it is basically the "pass" keyword in python for solidity? Commented Dec 13, 2021 at 5:56
  • Yes, it looks like it
    – Mad Jackal
    Commented Dec 13, 2021 at 6:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.