Question: why are inner planets made of rock?
Answer: Inner planet are closer to the sun hence,the heat from the sun evaporates the gases like hydrogen or helium. so only heavy weight dense metals such as iron,magnesium were left thus,the surface becomes rocky. whereas,if you see outer planets,they have a thick envelope of lightweight gases.