4

I keep getting these warnings when compiling Solidity code:

Gas requirement of function [...] unknown or not constant.

I know that the gas requirement is not constant, and I've implemented a calculation to set an appropriate gas limit in my DApp's user interface.

Since I have addressed the issue, is there a way to disable this warning for a specific function or globally?

  • I'm not sure that is possible, you could try to disable the checkmarks in the 'analysis tab' related to Gas & Economy, otherwise share the code for us to inspect :-) – phant0m Nov 1 '17 at 1:28
  • Just checking that you are asking about compilation outside of remix - correct? – Thom Ives Nov 24 '17 at 19:11
  • 1
    Related: How to avoid block.timestamp warning? – Richard Horrocks Jan 1 '18 at 11:30
0

This is currently not possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.