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 max_priority_fee when eth_maxPriorityFeePerGas is unavailable #3002

Merged
merged 3 commits into from Jul 5, 2023

Conversation

sanekto
Copy link
Contributor

@sanekto sanekto commented Jun 22, 2023

Hardhat anwers {'code': -32601, 'message': 'Method eth_maxPriorityFeePerGas not found', 'data': {'message': 'Method eth_maxPriorityFeePerGas not found'}} which raises MethodUnavailable instead of ValueError.

It is not clear to me if the answer of other nodes causes ValueError or now only MethodUnavailable (so to replace the exception).

What was wrong?

Explained above. I did not open an issue because I feel that in this case it is easier to explain the issue showing a possible fix. Sorry if this mess things, also to not provide tests.

How was it fixed?

Todo:

Hardhat sends {'code': -32601, 'message': 'Method eth_maxPriorityFeePerGas not found', 'data': {'message': 'Method eth_maxPriorityFeePerGas not found'}} which raises MethodUnavailable instead of ValueError
@kclowes
Copy link
Collaborator

kclowes commented Jun 26, 2023

Thanks for the PR! I added a test and will add a newsfragment shortly.

web3/_utils/module_testing/eth_module.py Outdated Show resolved Hide resolved
web3/middleware/fixture.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pacrob pacrob left a comment

Choose a reason for hiding this comment

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

lgmt!

@kclowes kclowes changed the title Fix max_pritity_fee when eth_maxPriorityFeePerGas is unavailable Fix max_priority_fee when eth_maxPriorityFeePerGas is unavailable Jul 5, 2023
@kclowes kclowes merged commit 42468bf into ethereum:main Jul 5, 2023
69 checks passed
@kclowes
Copy link
Collaborator

kclowes commented Jul 5, 2023

Thanks @sanekto!

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.

None yet

5 participants