I have a huge contract so isolating the cause will be very arduous manually. Is there any way to get an indication automatically of what might be causing an "invalid opcode" error?
Invalid Opcode error occurs mostly when you are performing an mathematical operation and somewhere in the code maybe you are dividing some number (variable) with 0.
Maybe check your calculations to see if this is the case!
Hope this helps someone!