0

I have an extremely basic contract, but saw infinite execution cost on Remix. Any insights will be appreciated.

//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Config {

address public a;

constructor (address _a) {
    a = _a;
}

}

Remix gas estimate:

{
    "Creation": {
        "codeDepositCost": "49400",
        "executionCost": "infinite",
        "totalCost": "infinite"
    },
    "External": {
        "personalAddress()": "2489"
    }
}
Richard
  • 1
  • 1

1 Answers1

1

It's probably a bug. Sometimes Remix behave weird.

Check this post, This guy tested it on a testnet and proved that its just a bug Getting infinite gas estimates for simple functions

DevABDee
  • 441
  • 2
  • 11
  • Thanks. I saw the other post. The other contract uses string. The gas usage ineed can be unbounded. Seems reasonable to think it is a remix bug. – Richard Jul 19 '22 at 22:45