You have not mentioned what type of contract it was. Is it a long-duration contract or a short contract for the execution of some services? Have the labor charges been mentioned in the quotation by the contractor?
If the contract is for a short period and it is for providing some services, then generally contractors clearly mention the material cost and labor cost. ESI is payable for the labor charges. If the labor charges are not mentioned, then it is assumed that 40% is the labor cost and ESI is paid accordingly.