I have an upgradeable contract (that is a factory) that has the deployable contract as an immutable var, the factory's constructor is setting the immutable var
Code:
import "./IMPL.sol";
contract Factory is OwnableUpgradeable {
address public immutable implementation;
constructor() {
implementation = address(new IMPL());
_disableInitializers()
}
function initialize() initializer public {
__Ownable_init();
}
IMPL is the contract the factory should deploy, and it's in another solidity file that is being imported