Getting an error in executing a token contract:
An error occurred during contract execution: invalid jump destination (PUSH1) 2
http://testnet.etherscan.io/vmtrace?txhash=0xfd2f51d19e32d7b4be5fe63cb46f9207c8f58120b4156d77c20408c1a7ab4dfa
Using this transaction code:
myContractInstance.transferFrom(fromAddress, toAddress, transferValue, {from: web3.eth.accounts[0], gas: 3000000});
Is there an obvious reason I'm overlooking? Thanks
Best Answer
Replicating ERROR: invalid jump destination (PUSH1) 2
I don't know what source code you were executing, but I can replicate the
invalid jump destination (PUSH1) 2
error by running the following function:And executing the function to get the following results:
This error could have been caused by some other parts of your code, but an invalid array index definitely generates this message.
The above snippet was taken from my answer to the question Bad Jump Array solidity and Data location .