browser-solidity icon indicating copy to clipboard operation
browser-solidity copied to clipboard

Error: Intrinsic gas too low

Open kartojal opened this issue 10 years ago • 4 comments

im trying to "suicide(owner)" via this function

[...]
modifier onlyowner { 
        if (msg.sender != owner) throw;
        _
    }
[...]
function killContract() onlyowner{
        suicide(owner);
    }
[...]

but in browser-solidity when i "press" and call killContract() function , this happens: Error: Intrinsic gas too low

i'm connected to my own geth node with testnet Morden, fully synced. All other functions of the contract works like a charm.

How can i get rid of that error? can be a bug?

kartojal avatar Feb 20 '16 01:02 kartojal

Did you ever figure this out? I'm seeing something similar and my guess is that it's working correctly, if it throw's it should fail right? I think it might just be that it's treating throw like a VERY expensive operation, and failing that way.

msfeldstein avatar Mar 24 '16 07:03 msfeldstein

This should be fixed since eth_estimateGas is called before execution and also there is an option in the UI to set a gas limit.

axic avatar Jul 27 '16 09:07 axic

Please reopen if the issue persists.

chriseth avatar Jul 27 '16 12:07 chriseth

I'm seeing the intrinsic gas too low for the following simple contract. I can add new members to the array but when I try to run "removeHolder" it appears.

contract testA {
    address[] public holders;
    function addHolder(address newHolder) {
        holders.push(newHolder);
    }
    function removeHolder() {
        delete holders[holders.length-1];
    }
}

Note that this is when connected to a local geth node (1.5.0-unstable), and does not occur when running on the browser javascript vm.

brendan87 avatar Aug 12 '16 02:08 brendan87