Hello, my name is***** am a qualified lawyer and I will be assisting you with your question today.
Legally your contract will be with IES and regardless of who they had a contract with themselves. So your legal rights will be against the contractor alone because you had no legal relationship with the end client so you cannot make a claim against them. If you were to pursue them they can quite easily defend any action by showing that you had no contract with them and that you would not be legally allowed to pursue them.
It is an unfortunate situation but one which would usually be avoidable or at least the repercussions reduced if you had agreed specific payment terms on a more frequent basis where you could stop working if you were not getting paid what you were due. Obviously ll of this in hindsight does not help now but for future reference it may be an idea of how to protect yourself.
I'm sorry if this is not necessarily the answer you were hoping for, however I do have a duty to be honest and explain the law as it actually stands. This does mean delivering bad news from time to time. I hope you understand and would be happy to provide any further clarification if needed. If you are still satisfied with the level of service you have received I would be grateful if you could please take a second to leave a positive rating by selecting 3, 4 or 5 starts at the top of the page. Thank you