1

I want to call other contract's constructor, but I'm not sure if the delegatecall function will work for that case. I have no way to test it out on Remix, because my Remix seem to not work with even simple contracts that use the delegatecall function :/

Any help?

1 Answer 1

2

Since the constructor is only once used when you deploy a smart contract there is no way to use delegatecall for it. If you can explain why you want to do something like this maybe I can help with more info.

1
  • Unless they are using an upgradeable contract and they're trying to call the initializer function... But of course that is not a constructor
    – Casareafer
    Commented Jan 15, 2023 at 1:47

Your Answer

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

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