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 formatting for pending blocks #2023

Closed
wants to merge 1 commit into from
Closed

Conversation

mvlabat
Copy link

@mvlabat mvlabat commented Sep 8, 2021

If we fetch a 'pending' block, hash and miner are null. Currently, calling getBlock('pending') fails with the following error:

invalid hash (argument="value", value=null, code=INVALID_ARGUMENT, version=providers/5.4.4)

If we fetch a `'pending'` block, `hash` and `miner` are null. Currently, calling `getBlock('pending')` fails with the following error:

```
invalid hash (argument="value", value=null, code=INVALID_ARGUMENT, version=providers/5.4.4)
```
@molfar
Copy link

molfar commented Oct 10, 2021

I have the same problem. Why this PR is still pending...

@mvlabat
Copy link
Author

mvlabat commented Oct 11, 2021

Hey @ricmoo! Apologies for the ping. Could this PR get reviewed anytime soon? Thanks!

@molfar
Copy link

molfar commented Dec 13, 2021

@ricmoo Ping please

@slowdownitsfine
Copy link

Also happening here. I want to use this to fetch baseFee for the next block.

@ghost
Copy link

ghost commented Jan 25, 2022

Hello @ricmoo, can you merge and release this?

@ricmoo ricmoo added major-bump Planned for the next major version bump on-deck This Enhancement or Bug is currently being worked on. labels Jan 25, 2022
@ricmoo
Copy link
Member

ricmoo commented Apr 13, 2022

This should be fixed now in v5.6.0 (see #2225).

Let me know if you still have problems.

Thanks! :)

@ricmoo ricmoo closed this Apr 13, 2022
@mvlabat mvlabat deleted the patch-1 branch April 13, 2022 07:10
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels May 3, 2022
@mustafa-demirci
Copy link

Hi everyone,

I use ether.js 5.7.0 version, Even transaction is succeed, I have still the same issue when I listen result from provider with provider.waitForTransaction() and provider.on()

The part I used to transfer and check the result from provider :
XToken.transfer(process.env.ACCOUNT2,parseEther("1.0"), options).then(txn => { console.log("Waiting for confirmation on transaction", txn); alchemyProvider.waitForTransaction(txn).then(transaction => { console.log("Transaction mined:", transaction); }); alchemyProvider.on(txn, txon => console.log("Mined transaction:", txon)); }); }

And the error is :

Error: invalid hash (argument="value", value={"type":2,"chainId":5,"nonce":9,"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x1e8480"},"maxFeePerGas":{"type":"BigNumber","hex":"0x1e8480"},"gasPrice":null,"gasLimit":{"type":"BigNumber","hex":"0x989680"},"to":"0x3C64A5DD005D3a842f1F549BA84acC3B20a8F6A1","value":{"type":"BigNumber","hex":"0x00"},"data":"0xa9059cbb0000000000000000000000007e33482929add67e2bcc454fe3b8d5b6cf4ed47b0000000000000000000000000000000000000000000000000de0b6b3a7640000","accessList":[],"hash":"0x633b8a40e41fb50cd08786acba0de97298ea9a2e7dd4994fb37a1fdcbd133621","v":0,"r":"0xf566545b48ef204b69d40ebabbd9cbd8fd78af1e14381262c0b23cd4efe699e8","s":"0x51a800292bf9eb41ac3b800f08fdb866cf903bd38d92f19df67228b9f1fcda55","from":"0xe29F5C62700515B176666c825f774C90a597c929","confirmations":0}, code=INVALID_ARGUMENT, version=providers/5.7.0)

Thanks for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed/complete This Bug is fixed or Enhancement is complete and published. major-bump Planned for the next major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants