Thank you for your reply @frangio . Im running into the "code size exceeds 24576 bytes" warning on remix even using the optimizer. Here is the snippet causing the warning:
function createTargetContract(uint8 _eventNumber, string calldata _seriesName)
external
payable
onlyRole(DEFAULT_ADMIN_ROLE)
returns (address)
{
TargetContract implementation = new TargetContract();
targetContractImplementation = address(implementation);
ERC1967Proxy proxy = new ERC1967Proxy(
targetContractImplementation,
abi.encodeWithSelector(
TargetContract(address(0)).initialize.selector,
_eventNumber,
_seriesName
)
);
contractsToOrganizer[implementation] = msg.sender;
targetContractArray.push(implementation);
emit LomEventDeployed(address(proxy));
return address(proxy);
}
What might be causing this?? I opened a topic regarding this here