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

EIP1559 Send Transaction require to include the field: gasPrice #2071

Closed
cristianberbecaru opened this issue Jul 14, 2021 · 1 comment
Closed

Comments

@cristianberbecaru
Copy link

cristianberbecaru commented Jul 14, 2021

Hi,

When I run this code to send an EIP 1559 transaction, it gives me the following error:

TypeError: Transaction must include these fields: {'gasPrice'}

As I know, we don't need to add gasPrice anymore.

If I add the gasPrice, then it pops:"

TypeError: Transaction must not include unrecognized fields: {'maxFeePerGas', 'maxPriorityFeePerGas'}

Note: I'm using v5.21.0

signed_txn = w3.eth.account.sign_transaction(dict(
nonce=w3.eth.get_transaction_count(public_address_of_senders_account),
maxFeePerGas=3000000000,
maxPriorityFeePerGas=2000000000,
gas=100000,
to='0xd3CdA913deB6f67967B99D67aCDFa1712C293601',
value=12345,
data=b'',
),
private_key_for_senders_account,
)
w3.eth.send_raw_transaction(signed_txn.rawTransaction)
HexBytes('0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331')

@fselmo
Copy link
Collaborator

fselmo commented Jul 14, 2021

@cristianberbecaru Thanks for reporting on this. We have a ticket to track it here. The issue lies in sign_transaction. That had not yet been updated by geth to support the new fields. We reported this to their team and it was included in the new geth that was just released (#23179).

I'm going to work on the changes on our end now and we should have it available in our next release. I'm going to close this but please follow our issue #2065 for updates on when this has been implemented.

Thanks again!

@fselmo fselmo closed this as completed Jul 14, 2021
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

2 participants