Can constructors be used when deploying implementations if only assigning to immutable?

@shark0der asked on Telegram

normally constructors are not being used when deploying implementations since the storage that’s being used is of the implementation. however now there’s theimmutable which stores the value in the bytecode itself instead of the storage. does this mean that we can safely use constructors when deploying implementations if we’re assigning to immutable?

2 Likes

It would be safe, but the value would be shared by all proxies. If this is the desired outcome then it can be used. Our plugins unfortunately don’t support that at the moment. I don’t think this use case will be seen very commonly but I would love to learn of people that have a use for it.

1 Like