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: estimate gas #37

Merged
merged 9 commits into from
Feb 27, 2024
Merged

fix: estimate gas #37

merged 9 commits into from
Feb 27, 2024

Conversation

antazoey
Copy link
Member

What I did

NOTE: Is only a POV - I havent tested yet.
fixes: #36

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@antazoey antazoey changed the title Feat/estimate gas fix: estimate gas Feb 22, 2024
@fubuloubu
Copy link
Member

This seems to work well for me, but needs some update to the mock provider

@solarthesis
Copy link
Contributor

does this fix the need to provide gas=0 ?

@antazoey antazoey marked this pull request as ready for review February 23, 2024 20:31
ape_safe/client/mock.py Outdated Show resolved Hide resolved
@antazoey
Copy link
Member Author

the tests fail on main for the same reason; not sure what changed or why that suddenly happens.

@antazoey antazoey requested a review from fubuloubu February 26, 2024 17:35
@antazoey antazoey enabled auto-merge (squash) February 27, 2024 15:18
@antazoey
Copy link
Member Author

shipppppp itttttttttttt

@solarthesis
Copy link
Contributor

this is never gonna ship @antazoey forget about it

@antazoey
Copy link
Member Author

this is never gonna ship @antazoey forget about it

why do you say this?

def estimate_gas_cost(
self, receiver: AddressType, value: int, data: bytes, operation: int = 0
) -> Optional[int]:
return None # Estimate gas normally
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming this works in the tests, but if not I think the issue is likely that the gas prices are nonzero

Copy link
Member Author

Choose a reason for hiding this comment

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

What issue?

@antazoey antazoey merged commit 55c8853 into ApeWorX:main Feb 27, 2024
13 checks passed
@antazoey antazoey deleted the feat/estimate-gas branch February 27, 2024 20:51
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.

Ape cannot compute gas cost estimation if Safe has zero balance
3 participants