Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas warning for fallback function #411

Closed
chriseth opened this issue Mar 3, 2016 · 7 comments
Closed

Gas warning for fallback function #411

chriseth opened this issue Mar 3, 2016 · 7 comments

Comments

@chriseth
Copy link
Contributor

chriseth commented Mar 3, 2016

https://www.pivotaltracker.com/story/show/114641125

@axic
Copy link
Member

axic commented Dec 22, 2017

@chriseth The gas estimator output includes an estimate for the fallback. I think this issue is more suitable for the static analyzer, which could issue a warning if the estimate is above 2300.

@axic
Copy link
Member

axic commented Jul 30, 2018

Is this still needed or covered by the remix static analyzer?

@axic axic removed this from the 2-safety-warnings milestone Aug 1, 2018
@axic axic removed the accepted label Aug 1, 2018
@chriseth
Copy link
Contributor Author

chriseth commented Aug 3, 2018

This has been implemented in the remix static analyzer.

@chriseth chriseth closed this as completed Aug 3, 2018
@chriseth
Copy link
Contributor Author

chriseth commented Aug 3, 2018

Perhaps to document here: The reason we did not add it to the compiler itself is because gas estimation can only be done after we have the final code and at that point, it is hard to generate an error or warning.

@axic
Copy link
Member

axic commented Dec 13, 2019

I think this can be done in a manner similar to #8008.

@axic axic reopened this Dec 13, 2019
@axic axic self-assigned this Dec 13, 2019
@axic
Copy link
Member

axic commented Aug 5, 2020

The reason it may not be a good idea to add:

  1. the gas estimator may not be correct at all times
  2. if the warning cannot be switched off, users could be annoyed if it is intentionally using more
  3. if we are trying to demote the send/transfer process, may be it is not important to highlight this (as we would suggest users to always send appropriate gas)

@axic axic removed their assignment Aug 5, 2020
@chriseth
Copy link
Contributor Author

chriseth commented Nov 5, 2020

I think this is outdated by now.

@chriseth chriseth closed this as completed Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants