0

I have a contract that uses

address(this).delegatecall(...)

Can I put an internal function inside the delegatecall somehow? I tried the normal way, public functions worked but internal didn't. Is there a way?

1 Answer 1

1

No, it is not possible because internal function do not have an entry point in the contract function dispatcher. The whole point of internal function is that they are not callable from outside the contract.

You can call a public function and make that function call the internal function.

2
  • but I'm not calling it outside the contract, is there no inner entry point maybe?
    – egjlmn1
    Nov 14, 2021 at 7:38
  • @egjlmn1 Using delegatecall is an external call.
    – Ismael
    Nov 14, 2021 at 17:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.