Cyclic dependency among two contracts with the constructor element as the address of the corresponding contract, and this has to be done at the time of deployment only not using _getter and _setter functions. Is there any way do that?

Created by Sourajyoti Gupta, Modified on Fri, 28 Jul, 2023 at 7:28 PM by Sourajyoti Gupta

Actually, there might be a way to precompute the contract address before deploying it. check out this video in which they demonstrate how it's done https://www.youtube.com/watch?v=-XT2YCQGVEQ

Basically, you can repeat the process on both contracts and then you can use their precomputed addresses to perform the cyclic dependency.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article