Remove constructor arguments #368
Replies: 3 comments 3 replies
-
It's an interesting idea. On the one hand, you are correct that removing the constructor arguments would simplify the deployment structure, reducing the side of the code base in the process. On the other hand, not initializing the comptroller and the NFT descriptor in the constructor would mean that there is a risk of the contracts remaining uninitialized after construction (this is the sort of minor issue that gets flagged during audits). However, this risk is tiny and tolerable. We could just make a new deployment if users start interacting with the contracts before the comptroller and/ or the NFT descriptor is set. Before making a decision, I want to sleep on this idea for 24 hours. |
Beta Was this translation helpful? Give feedback.
-
Technically it is feasible as "not having a comptroller" would just prevent anyone from creating streams until it's been assigned. It will probably simplify the code-base but it will make our deployment process more complex and costly: instead of the individual contract deployment we would now have to introduce 2 "linking" transactions for each lockup contract, to assign the comptroller and descriptor addresses. |
Beta Was this translation helpful? Give feedback.
-
Based on @razgraf's feedback above, and further thinking I put into this topic, I now think that removing the constructor arguments wouldn't help much. We would inevitably have to move the initialization phase somewhere else. |
Beta Was this translation helpful? Give feedback.
-
In the last PR, I suggested removing the
initialNFTDescriptor
from the constructor arguments because we implemented a setter function. This way, we can reduce some code in multiple places such as source code, scripts, and CI deployments.The same think can be done for
comptroller
.What do you think about this idea?
Beta Was this translation helpful? Give feedback.
All reactions