Miners and gold producers have been hammered on the ASX as a Strait of Hormuz attack sent oil prices surging.