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:
InitializableUpgradeabilityProxy.sol:
23: if(_data.length > 0) {
24: (bool success,) = _logic.delegatecall(_data);
25: require(success);
Code to reproduce
bytes memory payload = abi.encodeWithSignature("initialize(address,address,uint256)", _stablecoinAddress, governanceAddress, _initialBorrow);
address FuturesAddress = address(deploy(salt, celestialAddress, admin, payload));
Environment
I am planning to use the upgrades plugin to test the upgradeability of the contracts.