Contract deployment using Remix IDE

Hi, I am trying to deploy a sample contract using remix IDE on mainnet, however when I keep on getting "jsonrpc":"2.0","error":"contract creation code storage out of gas","id":888278891666324}" error. I tried increasing gas limit and optimizing it. is there anything I am missing?

hey , this could happen for different reasons. The first one could be the rpc that fails to estimatethe gas. Can you please try using llamarpc?

If you still get that error probably there is an issue with the code. In that case can you share the contrusctor code?

 constructor(address _factory, address _v3Router) {
        factory = IUniswapV2Factory(_factory);
        uniswapV3Router = ISwapRouter(_v3Router);

this is the constructor for the first contract

constructor() {
        pair = IUniswapV2Pair(factory.getPair(DAI, WETH));

this one is the second one. if needed I can share the whole code