Let's say i'm programmatically making a transaction to a contract. How can I tell (programmatically) that the confirmed transaction has a Bad Jump Destination? Right now, the only way I know of is it go to etherscan.io and look for the red text. But how can i determine this programmatically?
I'm looking at the response data from a eth_getTransactionByHash call and I can't tell the difference between a Bad Jump Destination and one that worked.
Seems like etherscan has an API that may be able to do this. But shouldn't there be a built in way that doesn't involve etherscan? https://etherscan.io/apis#transactions
My current solution is to check if my transaction has at least 1 confirmation. If it has at least 1 confirmation, then I make an API call to etherscan and check it for errors. Etherscan's response tells me that it's either good or bad jump destination or out of gas. It's pretty amazing, but it seems very round about and hacky. I'll review the other posts you guys have mentioned to see if that solution is better.