2

This question already has an answer here:

down vote favorite I have geth 1.5.2 and work on testnet with Mist-linux64-0-8-7. I stuck at a simple issue when I try to send some ether (value) to my contract by calling any function. For example, even this dummy function does not work with non-zero value but works normally with zero value:

function t() returns (uint){
    return 1;
}

What is surprising here that I can see a warning in Mist with the message "It seems this transaction will fail. If you submit it, it may consume all the gas you send." This does not depend on the gas amount that I provide. Even if I put 500,000 of gas the transaction seem not to complete.

You can see its result here: https://testnet.etherscan.io/tx/0x3206118530079d1b416dc649c6f0a89283f9457e9189f259b3429cf0c6a998d0

There is a message

Warning! Error encountered during contract execution [Bad jump destination]

I tried to run different functions in different contracts. I was even using sendTransaction functionality to do the same from geth console directly but I still can't make it work. I didn't find if anybody had similar problem. Please help me if you have any idea.

marked as duplicate by eth Nov 23 '16 at 7:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Welcome! Are you missing the payable modifier? Like: function t() payable returns (uint) – eth Nov 23 '16 at 7:16
  • Yes, thank you. I suspected there should be some very simple change. – Andriian Nov 23 '16 at 16:10

Browse other questions tagged or ask your own question.