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

fix(evm): allow estimateGas with no funds #2885

Merged
merged 1 commit into from
Sep 23, 2023

Conversation

dessaya
Copy link
Collaborator

@dessaya dessaya commented Sep 21, 2023

No description provided.

Comment on lines +330 to +332
if reqctx.vm.task.EstimateGasMode {
return gasBudget, math.MaxUint64
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't this result in "false positive" estimations?

basically in situations where the estimation would result in insufficient funds for gas * price + value

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, certainly. I don't think there is a solution that fits every use case. I'd imagine that it should be possible to estimate the gas before actually depositing the funds, but we should probably adopt the same behavior than other networks.

cc @fijter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it's 'wrong' we should do the same thing other networks are doing here yeah :)

@fijter fijter merged commit da186f5 into iotaledger:develop Sep 23, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants