[Ethereum] Remix error “gas required exceeds allowance or always failing transaction” on private blockchain

gas-estimateprivate-blockchainremix

I'm trying to test contract interaction using Remix with two basic contract:

  • contract Callee
  • contract Caller

Callee function/variable:

uint[] public values;

function storeValue(uint value) {
    values.push(value);
}

function getValues() view returns(uint) {
    return values.length;
}

Caller function:

function storeAction(address addr) returns(uint) {
    Callee c = Callee(addr);
    c.storeValue(100);
    return c.getValues();
}

If I try to execute function "storeAction" I see a different behavior between:

error "Gas estimation errored with the following message (see below).
The transaction execution will likely fail. Do you want to force
sending? gas required exceeds allowance or always failing transaction"

The deploy seems to works fine for both the environment.

I've already checked my private blockchain gas limit that is over 4700000.

Can someone explain this?

Thanks

Best Answer

I resolve the issue using version of solidity compiler earlier than ^0.4.21.

Related Topic