Can't initialize proxy contract deployed from factory

I have a factory that is supposed to deploy upgradeable contracts. It inherits from ProxyFactory and uses the deploy function. It reverts when it does a delegatecall to the new proxy on the encoded data. It is unclear to me what salt is too. Right now I just have a state variable that increments with every deployment, and I pass that into deploy. In tests, I deploy a new instance of the logic contract and subsequently call my function to deploy a new upgradeable proxy. The code below is the code for deploying the new proxy. The following is the location of the error when debugging the transaction:


23:     if(_data.length > 0) {
24:       (bool success,) = _logic.delegatecall(_data);
25:       require(success);

:1234: Code to reproduce

bytes memory payload = abi.encodeWithSignature("initialize(address,address,uint256)", _stablecoinAddress, governanceAddress, _initialBorrow);
address FuturesAddress = address(deploy(salt, celestialAddress, admin, payload));

:computer: Environment

I am planning to use the upgrades plugin to test the upgradeability of the contracts.

Nevermind, I just looked back at my code. I was passing too many arguments to initialize.

1 Like