Optimally, its 4' of hardware cloth, then either solid surface or ... more hardware cloth.
Ultimately, it depends on your local predators. Some can climb really well, and either complete enclosure with hardware cloth(or greater) or a sufficiently electrified fence are your two reliable options. In other places, 4' is adequate, and you can use lesser materials - poultry netting/chicken wire, etc on the upper portion of the run, or even nothing at all in the case of electrified fencing with no significant avian predators and no overhanging tree branches, etc.
Unless you have big predators like bear, in which case hardware cloth isn't a speed bump.
Don't ignore any likely digging predators, either as you consider your containment/exclusion method.
If there were a one size fits all solution... ...well, lets just accept that there isn't.
Secure the hardware cloth with either screws and washers (preferred) or poultry staples, well and frequently placed.