[Ethereum] Transaction not going through in Mist 0.8.6

mist

I have update Mist-wallet to latest 0.8.6 version and I was trying to execute a contract on my Test-network before working on Public net with this version. When I execute contract with fee suggested by Mist, it says

It seems your transaction will fail. If you submit it, it may consume all the gas you send.

I even provided the max available fee in Mist i.e 1.0541272 ether, And on confirmation page I see provide max fee as 0.02550988 ether (121000 gas). But still getting hit by same error message on confirmation page.

Best Answer

This is normally an error detected by the eth.estimateGas(...) function call, where this call returns back a result that gasUsed==gas as you have found in your answer to How to estimate gas for a function without any input parameter?.

You can see the Mist error message at mist.en.i18n.json#L193:

"estimatedGasError": "It seems this transaction will fail. If you submit it, it may consume all the gas you send.",

And this estimatedGasError error message is displayed by the code at sendTransactionConfirmation.html#L56-L66:

{{#if transactionInvalid}}
    <p class="info dapp-error"> {{{i18n "mist.popupWindows.sendTransactionConfirmation.estimatedGasError"}}} </p>
{{else}}
...
{{/if}}

The transactionInvalid status is computed by the code at sendTransactionConfirmation.js#L259-L263:

'transactionInvalid': function() {
    return TemplateVar.get('estimatedGas') == 'invalid' 
            || TemplateVar.get('estimatedGas') == 0
            || typeof TemplateVar.get('estimatedGas') == 'undefined';
}

You may want to check your smart contract code to work out why the an error is being thrown.

Related Topic